Testnet: Monad Testnet, test USDC only, unaudited
Open app
On this page You need
All guide pages

Run it locally

How-to

Run the FairPay appLink to this section

  1. Install dependencies from the repository root.
    bash
    npm install

  2. Start it.
    bash
    npm run dev:fairpay

    This builds the SDK, starts the API on 127.0.0.1:8788 and the web app on http://localhost:5174.

With no settings, the app keeps its data in a built-in local database (apps/fairpay/data) and runs with the relayer and faucet off: you can sign in, split bills and browse FairEats, but private payments and the test USDC faucet are off. To turn them on, put testnet-only RELAYER_KEY, FAUCET_KEY and MERCHANT_ADDRESS in apps/fairpay/.env. If that file doesn't set them, the app reads them from apps/faireats/.env. MERCHANT_ADDRESS also creates the demo restaurant, Saffron Table, on first start. The server refuses to start if the relayer and faucet keys are the same.

Check: open http://localhost:5174. You should see "Split the bill. Everyone pays their part." and the footer should say "Data: local database". Tests: npm run test:fairpay.

Run the standalone FairEats appLink to this section

Careful: use keys that hold only testnet funds. Never paste a key that holds real money into .env, and never commit .env.

  1. Install dependencies from the repository root.
    bash
    npm install

  2. Create your environment file.
    bash
    cp apps/faireats/.env.example apps/faireats/.env

    On Windows PowerShell:

    PowerShell
    Copy-Item apps/faireats/.env.example apps/faireats/.env

  3. Fill in the four required values in apps/faireats/.env:
    apps/faireats/.env
    RELAYER_KEY=0xYOUR_TESTNET_RELAYER_KEY
    FAUCET_KEY=0xYOUR_TESTNET_FAUCET_KEY
    MERCHANT_ADDRESS=0xYOUR_ALLOWLISTED_PAYOUT_ADDRESS
    KITCHEN_PIN=choose-at-least-6-characters

    Optional: PORT (default 8787), RPC_URL (default https://testnet-rpc.monad.xyz), DB_FILE, TRUST_PROXY_HOPS, INDEXER_CONFIRMATIONS. The server refuses to start if a required value is missing or malformed.

  4. Start the app in development mode.
    bash
    npm run dev

    This builds the SDK, starts the API on 127.0.0.1:8787 and Vite on http://localhost:5173.

Check: open http://localhost:5173. You should see "Tonight at Saffron Table" and the menu. The kitchen is at http://localhost:5173/kitchen with your KITCHEN_PIN.

Production build of FairEats locallyLink to this section

bash
npm start

This builds the SDK and the frontend, then serves both on http://127.0.0.1:8787 with the strict Content-Security-Policy.

Build this website and the demo locallyLink to this section

The pages you are reading and the demo at /app/ are one static build. It needs no .env and no keys.

bash
npm install
npm run build:vercel
npm run preview -w site

build:vercel builds the SDK, builds FairEats in demo mode (npm run build:demo -w faireats, output apps/faireats/dist-demo), builds this site into apps/site/dist, then copies the demo into apps/site/dist/app and checks the output for anything that looks like a key.

Check: open http://localhost:5182 for the site and http://localhost:5182/app/ for the demo. Stop the preview with Ctrl+C.

To work on the site with live reload, run npm run dev -w site (port 5181). The demo is not served in this mode; build it as above.