Go to file
Mihir Motiyani 6c72f8ce96
continuous-integration/drone/push Build is failing Details
Merge pull request 'feat(workflows): add atomic audited order expiry sweeps' (#50) from feat/order-expiry-workflow into main
Reviewed-on: #50
2026-10-08 22:13:43 +05:30
.gitea docs(commerce): document APIs migration policy and security verification 2026-09-10 11:23:24 +05:30
docs feat(workflows): add atomic audited order expiry sweeps 2026-10-08 22:12:43 +05:30
graphify-out chore(graphify): add queryable backend source graph 2026-10-04 00:13:21 +05:30
prisma feat(workflows): add atomic audited order expiry sweeps 2026-10-08 22:12:43 +05:30
scripts feat(data): add timestamped commerce migrations and history checks 2026-09-10 11:23:22 +05:30
src feat(workflows): add atomic audited order expiry sweeps 2026-10-08 22:12:43 +05:30
test feat(workflows): add atomic audited order expiry sweeps 2026-10-08 22:12:43 +05:30
tools chore(graphify): add queryable backend source graph 2026-10-04 00:13:21 +05:30
.dockerignore Add Docker and Drone CI/CD deployment 2026-10-02 10:30:51 +05:30
.drone.yml fix(ci): end Drone config with newline 2026-10-03 00:07:50 +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 chore(graphify): add queryable backend source graph 2026-10-04 00:13:21 +05:30
.gitmodules chore(graphify): add queryable backend source graph 2026-10-04 00:13:21 +05:30
.graphifyignore chore(graphify): add queryable backend source graph 2026-10-04 00:13:21 +05:30
.prettierignore chore(graphify): add queryable backend source graph 2026-10-04 00:13:21 +05:30
.prettierrc.json feat(platform): add validated configuration and Prisma database foundation 2026-09-08 20:33:58 +05:30
Dockerfile Add Docker and Drone CI/CD deployment 2026-10-02 10:30:51 +05:30
README.md feat(workflows): add atomic audited order expiry sweeps 2026-10-08 22:12:43 +05:30
jest.config.cjs fix(test): limit Jest discovery to application sources 2026-10-03 18:40:15 +05:30
package.json feat(workflows): add atomic audited order expiry sweeps 2026-10-08 22:12:43 +05:30
pnpm-lock.yaml fix(deps): patch fast-uri advisory and audit moderate issues 2026-09-30 19:37:55 +05:30
pnpm-workspace.yaml fix(deps): patch fast-uri advisory and audit moderate issues 2026-09-30 19:37:55 +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

Explore the Graphify code graph to trace source-level dependencies and open the interactive backend map.

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. Phase 2B adds purchase-order drafts and issuance. Phase 2C adds partial goods receipts and quality inspection. Phase 2D adds supplier invoice matching and voids. Phase 2E adds supplier payment records and reversals. Material stock movements and production remain later milestones. Phase 2F adds private versioned supplier documents and review. Phase 2G adds versioned product bills of materials. Phase 2H adds production batches. Phase 2I adds material consumption and wastage records. Phase 2J adds versioned packaging BOMs. For a development owner, see local admin setup.

Swagger UI

Open http://localhost:3000/api/docs in development to browse and test the API. See API explorer for authentication and configuration. Packaging execution: see Phase 2K API guide. Cost estimates: see Phase 2L API guide. Batch cost snapshots: see Phase 2M API guide. Warehouse material stock: see Phase 2N API guide. Production material stock posting: see Phase 2O API guide. Packaging material stock posting: see Phase 2P API guide. Finished-goods receipts: see Phase 2Q API guide. Material warehouse transfers: see Phase 2R API guide. Manual material-stock adjustments: see Phase 2S API guide. Business-account profiles and manual verification: see Phase 3A API guide. Partner price lists and minimum quantities: see Phase 3B API guide. B2B quotations and response tracking: see Phase 3C API guide. B2B credit proposals and independent review: see Phase 3D API guide. B2B sample requests, review, and dispatch records: see Phase 3E API guide. B2B branding and artwork approvals: see Phase 3F API guide. B2B partner purchase orders: see Phase 3G API guide. B2B partner partial payments: see Phase 3H API guide.

B2B custom candle requests and staff review: see Phase 3I API guide.

B2B partner reports: see Phase 3J API guide.

Private wishlists: see Phase 4A API guide.

Verified product reviews and moderation: see Phase 4B API guide.

Seasonal campaigns and scheduled collection discovery: see Phase 4C API guide.

Campaign-linked collection discounts: see Phase 4D API guide.

Private idle cart recovery: see Phase 4E API guide.

Explicit messaging consent and eligibility: see Phase 4F API guide.

Blog drafts, publication and SEO metadata: see Phase 4G API guide.

Live customer segments and consent-aware audience checks: see Phase 4H API guide.

Moderated community discussions: see Phase 5A API guide.

Commerce activity analytics: see Phase 5B API guide.

Captured-request forecast baseline: see Phase 5C API guide.

Accounting source events: see Phase 5D API guide.

Indicative batch material contribution: see Phase 5E API guide.

Bounded order expiry automation: see Phase 5F API guide.