Skip to main content

Running locally

Running the example apps locally

Follow these steps to run the example apps locally.

  1. Clone the example apps repo, https://github.com/UnbloktTechnology/ComPilot-Examples.

  2. Copy example-apps/.env.local to example-apps/.env.

  3. Edit example-apps/.env as described in the following table.

    VariableDescription
    NODE_ENVSet to production
    NEXT_PUBLIC_ENVIRONMENTSet to prod
    COMPILOT_API_KEY_DEFI_RULE_ENGINEComPilot API key for the compliant Uniswap app
    COMPILOT_API_KEY_DEFI_OFFCHAIN_ZKPComPilot API key for the gated Uniswap app
    COMPILOT_API_KEY_BANKComPilot API key for the banking app
    COMPILOT_API_KEY_BANK_WEB3ComPilot key for the Web3 banking app
    COMPILOT_API_KEY_KYCComPilot API key for the KYC app
    COMPILOT_API_KEY_BANK_SYGNUM_WEB3ComPilot API key for the Sygnum Web3 app

    You can get the ComPilot API keys for your apps by following the instructions on Getting an API key. You need to set each of the API_KEY variables, even if you only want to use one of the example apps. If necessary, you can set them all to the same value.

    note

    For more information about these variables, see example-apps/src/env.mjs.

  4. Run npm install in example-apps.

  5. Run npm run dev in example-apps.

The example apps can now be accessed at http://localhost:3020.