feat: add one-command local development stack

This commit is contained in:
2026-09-08 20:03:40 -04:00
parent 5916ce1ff5
commit 41efdfe041
7 changed files with 293 additions and 9 deletions
+12
View File
@@ -71,6 +71,18 @@ Start future work from [docs/IMPLEMENTATION-STATUS.md](docs/IMPLEMENTATION-STATU
Integration tests reject database names not ending in `_test` and truncate their tables before each test. The Redis limiter test uses a unique temporary key prefix and does not modify application session data.
## Local Development
After creating `.env` and setting the required local SMTP and MFA values, start the complete development stack from the repository root with:
```sh
npm run dev
```
This command starts healthy PostgreSQL and Redis containers, applies migrations, and runs the Fastify API and Vue/Vite web app together. Open `http://localhost:5173/` in a browser. The Vite server proxies `/api` requests to the API on port `3000`.
The command does not provision an administrator automatically. Run `npm run provision:admin` once after setting the initial administrator variables in `.env` when admin access is needed. Stop the application processes with `Ctrl+C`; stop the containers separately with `npm run db:down` when they are no longer needed.
## Initial Administrator
After the development database is migrated, set `INITIAL_ADMIN_EMAIL`, `INITIAL_ADMIN_PASSWORD`, and `INITIAL_SELLER_NAME` in your local `.env`, then run `npm run provision:admin` once. The command creates the only initial administrator and linked Seller; it refuses to run after any User exists.