Go to file
Mihir Motiyani d22aa78b6d Merge pull request 'feat(procurement): add supplier and material master data' (#6) from feat/supplier-materials into main
Reviewed-on: #6
2026-09-13 14:35:11 +05:30
.gitea docs(commerce): document APIs migration policy and security verification 2026-09-10 11:23:24 +05:30
docs feat(procurement): add supplier and material master data 2026-09-13 14:32:57 +05:30
prisma feat(procurement): add supplier and material master data 2026-09-13 14:32:57 +05:30
scripts feat(data): add timestamped commerce migrations and history checks 2026-09-10 11:23:22 +05:30
src feat(procurement): add supplier and material master data 2026-09-13 14:32:57 +05:30
test feat(procurement): add supplier and material master data 2026-09-13 14:32:57 +05:30
.env.example feat(docs): add Swagger UI with validation schemas and bearer authentication 2026-09-11 17:15:37 +05:30
.gitattributes feat(identity): add account schema, security primitives and migrations 2026-09-08 21:24:48 +05:30
.gitignore feat(data): add timestamped commerce migrations and history checks 2026-09-10 11:23:22 +05:30
.prettierignore feat(platform): add validated configuration and Prisma database foundation 2026-09-08 20:33:58 +05:30
.prettierrc.json feat(platform): add validated configuration and Prisma database foundation 2026-09-08 20:33:58 +05:30
README.md feat(procurement): add supplier and material master data 2026-09-13 14:32:57 +05:30
jest.config.cjs feat(identity): add account schema, security primitives and migrations 2026-09-08 21:24:48 +05:30
package.json feat(docs): add Swagger UI with validation schemas and bearer authentication 2026-09-11 17:15:37 +05:30
pnpm-lock.yaml feat(docs): add Swagger UI with validation schemas and bearer authentication 2026-09-11 17:15:37 +05:30
pnpm-workspace.yaml feat(docs): add Swagger UI with validation schemas and bearer authentication 2026-09-11 17:15:37 +05:30
prisma.config.ts feat(data): add timestamped commerce migrations and history checks 2026-09-10 11:23:22 +05:30
tsconfig.build.json feat(platform): add validated configuration and Prisma database foundation 2026-09-08 20:33:58 +05:30
tsconfig.json feat(identity): add account schema, security primitives and migrations 2026-09-08 21:24:48 +05:30

README.md

Mani Candles backend

Phase 1A provides the service foundation. Phase 1B adds staff account provisioning, authentication, sessions, recovery, configurable RBAC, and audit records. Phase 1C implements core commerce APIs.

Setup

Use Node 24 LTS and pnpm 11.19.0. Copy .env.example to .env and set a PostgreSQL connection URL. Never commit credentials.

pnpm install --frozen-lockfile
pnpm db:generate
pnpm db:deploy
pnpm check
pnpm build
pnpm start

Development: run pnpm dev to compile on changes and pnpm start:watch in a second terminal after the first compilation. HTTP endpoints: GET /api/v1/health/live and GET /api/v1/health/ready. Readiness returns 503 when the database query fails. Health responses deliberately omit infrastructure details.

Layout

  • src/config: validated configuration, injected once.
  • src/database: Prisma connection lifecycle and database probes.
  • src/health: controller and application service.
  • prisma/migrations: ordered, committed SQL migrations.
  • test: configuration, lifecycle, and HTTP tests.
  • docs: delivery roadmap and engineering workflow.

Production must use a managed secret store, TLS termination, a restricted database account, backups, and the deployment migration command. Do not expose this foundation as a completed commerce platform.

Identity: see API contract and setup/release guide. Phase 1C adds catalog, private addresses and inventory. See commerce API, errors, migrations, security preparation and verification. Phase 1D adds versioned carts, coupons, atomic checkout and private order snapshots. See checkout API and pricing boundary. Payment remains disabled until tax, shipping and payment rules are finalized. Phase 1E provides a provider-independent blueprint and test matrix, configurable pricing snapshots and an operational outbox/API. No real gateway or message delivery is enabled. Phase 2A adds organization-scoped supplier and material master data. Purchase orders, receipts, QC and production remain later milestones.

Swagger UI

Open http://localhost:3000/api/docs in development to browse and test the API. See API explorer for authentication and configuration.