MailDocs

Get started

Quickstart

Run it on your machine and check a change.

  1. Install the dependencies.

    Terminal
    npm install
  2. Create the local database. It applies every migration to a local copy of D1.

    Terminal
    npm run db:migrate:local
  3. Add local secrets. Create .dev.vars next to package.json.

    .dev.vars
    EDIT_PASSCODE=choose-a-long-passcode
  4. Start the app and open http://localhost:3000.

    Terminal
    npm run dev

Checks before a change

Terminal
npm run typecheck
npm run lint
npm run build

Run and validate

Terminal
npm install
cp .dev.vars.example .dev.vars   # set EDIT_PASSCODE
npm run db:migrate:local
npm run dev
npm run typecheck
npm run lint
npx opennextjs-cloudflare build
npx wrangler deploy --dry-run

To try the email handler locally, run npm run preview and post a raw message:

Terminal
curl -X POST 'http://localhost:8787/cdn-cgi/handler/email?from=sender@example.org&to=admin@appneural.com' \
  --data-binary @message.eml
Last updated 2 November 2026