Contributing
The full guide is .github/CONTRIBUTING.md, and it is the one kept current. This page is the shape of the cycle, so you know what you are walking into before you clone. Code, comments and documentation are written in English; the interface ships in French and English, French being the source language.
Get it running
Section titled “Get it running”You need Node 22.12 or newer, pnpm 12.5.1, and Docker for the local PostgreSQL.
-
pnpm install, thendocker compose -f docker-compose.dev.yml up -dfor the database. That stack runs under its own compose project, so it sits beside a self-hosted instance. -
Copy
apps/api/.env.exampletoapps/api/.envand fill in its secrets, or the next step stops on an empty database URL. -
pnpm --filter @badlen/shared build, before anything else typechecks: the API reads that package through its compiled output. -
pnpm --filter @badlen/api exec prisma migrate devfor the schema, thenpnpm dev, which serves the API on:3001and the web app on:5173.
The workspace is five packages: apps/api (NestJS, Prisma), apps/web (React, Vite,
Tailwind), packages/shared (domain types, the import schema, Decimal money),
packages/mcp, and docs (Astro and Starlight), which is this site; tools/ beside them
holds the sweeps run against a live instance.
This site is written in the same repository as the code it describes. Its pages are the
Markdown files under docs/src/content/docs/, nested one level deeper than that path
suggests: the documentation is in docs/src/content/docs/docs/, its French counterpart in
docs/src/content/docs/fr/docs/, and pnpm --filter @badlen/docs dev serves the lot.
English is the master and French follows it; pnpm translations says which pages have
fallen behind. The guide has the rest, under The documentation site.
The gate
Section titled “The gate”The same checks CI runs, from the repository root:
pnpm format:checkpnpm -r lintpnpm -r typecheckpnpm -r testpnpm -r buildThe suites needing a real PostgreSQL skip themselves out of that run, and CI asserts none
of them did. Replay them as CI does, on a port of your own: PG_PORT=55613 pnpm live.
Opening a pull request
Section titled “Opening a pull request”A schema change ships its generated migration under apps/api/prisma/migrations, a new
user-facing string exists in both locales/fr and locales/en with the same keys, and no
real figures, account numbers or secrets go in the diff. Commit subjects are concise and
imperative, as in Add cost basis to positions view. Keep prose in English, keep dashes out of
it, and add no co-author trailer.
Contributions are licensed under AGPL-3.0. You keep the copyright on what you write, and you also grant the maintainer a non-exclusive right to distribute your contribution under other license terms, including commercial ones, so that a hosted offering remains possible; Badlen itself will continue to be available under a free software license. The code of conduct applies. A security problem goes through SECURITY.md, never a public pull request.