- TypeScript 73.6%
- Dart 12.4%
- PLpgSQL 4.7%
- JavaScript 2.9%
- CSS 2.4%
- Other 3.9%
| apps | ||
| db | ||
| deploy | ||
| docs | ||
| imports/sortly | ||
| infra | ||
| packages | ||
| scripts | ||
| tests/integrity | ||
| .env.example | ||
| .gitignore | ||
| .nvmrc | ||
| architecture.md | ||
| continuation.md | ||
| eslint.config.mjs | ||
| new-session.md | ||
| package-lock.json | ||
| package.json | ||
| pm-rules.md | ||
| README.md | ||
| tsconfig.base.json | ||
Loud Stock
Standalone Loud stock management foundation: NestJS API, React web shell and PostgreSQL development configuration. PM 001 retains project management. Catalogue persistence and database-aware health checks are implemented. Inventory workflows and native platform scaffolding are pending.
Read new-session.md, continuation.md, architecture.md and the assigned task before development. The accepted foundation stack and package boundaries are recorded in ADR 0001; older architecture proposals remain historical context.
TypeScript development
Use Node 22.23.3 (nvm use, if available) and npm 10.9.9. From the repository root:
npm ci
npm run validate
npm run dev:api
# In another terminal:
npm run dev:web
validate runs lint, type checking, tests and builds. Packages build before API/web consumers. After installing or editing shared packages, run npm run build before starting consumers. Individual root commands are npm run lint, npm run typecheck, npm test, and npm run build; type checking/tests build shared packages automatically. API defaults to http://127.0.0.1:3000/ready and web to the local URL printed by Vite. GET /live checks process liveness. GET /ready probes PostgreSQL and returns {"status":"ok","service":"loud-stock-api","database":"ok"} or HTTP 503 if unavailable/unconfigured. Tests open an ephemeral loopback HTTP port and close the application afterward. Production-style local API start: npm run start --workspace=@loud-stock/api after building.
The API reads exported HOST and PORT; it does not automatically load .env. Export DATABASE_URL to enable the bounded PostgreSQL pool; DB_POOL_MAX defaults to 5 (range 1–20). Internal stock commands use the transactional ledger and current database membership authorization; see ADR 0003. There are no public stock routes. Web has no stock actions or API integration yet.
Local PostgreSQL (optional for this scaffold)
Install Docker with Compose v2 separately. Copy .env.example to ignored .env, choose a local-only password and replace the example DATABASE_URL placeholder if using it in future database work. Compose fails explicitly if the password is empty.
cp .env.example .env
# Edit .env locally; keep it out of Git.
docker compose --env-file .env -f infra/dev/compose.yaml config --quiet
docker compose --env-file .env -f infra/dev/compose.yaml up -d --wait
docker compose --env-file .env -f infra/dev/compose.yaml exec postgres pg_isready -U loud_stock_dev -d loud_stock_dev
docker compose --env-file .env -f infra/dev/compose.yaml down
The database binds to loopback and persists in a named volume. down retains data. Ordered SQL migrations and npm run db:migrate / npm run db:verify are documented in db/migrations/README.md and ADR 0002. This is development configuration, not deployment. Never put live credentials into tracked files.
See apps/native/README.md for intentionally deferred Flutter/toolchain work. Imported logos are preserved in packages/design/assets; source design observations remain in docs/specs/loud-design-reference.md.
Administrator-only Sortly preview/commit and private resource staging are documented in Sortly imports and ADR 0008.
Production operations: deployment, backups, recovery and deferred bootstrap.