Skip to content

Run it locally ​

This guide is for people working on Duplan's code. If you want to know how to use Duplan, see the user guide.

What you need ​

Node.js, pnpm and a PostgreSQL database.

Start the app ​

From the root of the repository:

bash
cp .env.example .env              # fill in DATABASE_URL and DIRECT_URL
pnpm install
pnpm exec prisma migrate deploy   # creates the tables
pnpm dev

Then open http://localhost:3000 in your browser.

Environment ​

VariableWhat it is for
DATABASE_URLThe PostgreSQL connection the app uses
DIRECT_URLA direct connection to the same database, used by Prisma for migrations
UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKENRate limiting. Leave both empty to run without it

Check where .env points

The Prisma command line reads .env too. Before running prisma migrate or prisma db push, make sure DATABASE_URL and DIRECT_URL point at the database you mean to change.

Stack ​

Next.js (App Router), TypeScript, Prisma on PostgreSQL, next-intl for French, English and Spanish, and Vitest.

Work on these docs ​

The documentation is a small VitePress site in docs/, with its own dependencies.

bash
pnpm --dir docs install
pnpm docs:dev      # preview while writing
pnpm docs:build    # build the static site into docs/.vitepress/dist