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
# fill in DATABASE_URL and DIRECT_URL
cp .env.example .env
pnpm install
# creates the tables
pnpm exec prisma migrate deploy
pnpm devThen open http://localhost:3000 in your browser.
Environment
| Variable | What it is for |
|---|---|
DATABASE_URL | The PostgreSQL connection the app uses |
DIRECT_URL | A direct connection to the same database, used by Prisma for migrations |
UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN | Rate 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. English is at the root, French in docs/fr/ and Spanish in docs/es/.
bash
pnpm --dir docs install
# preview while writing
pnpm docs:dev
# build into docs/.vitepress/dist
pnpm docs:build