Modular monolith backend for LifeOS using Node.js, TypeScript, Express, Prisma, and PostgreSQL.
GET /health(liveness)GET /ready(readiness: DB + Redis)POST /auth/registerPOST /auth/loginGET /meGET /tasksPOST /tasksPATCH /tasks/:idDELETE /tasks/:idGET /inventoryPOST /inventoryPATCH /inventory/:idDELETE /inventory/:idGET /food/recipesPOST /food/recipesPATCH /food/recipes/:idDELETE /food/recipes/:idGET /food/recipes/:id/availabilityPOST /food/stock/:id/mutateGET /matrix/roomsPOST /matrix/rooms/bootstrapPOST /matrix/rooms/:roomId/sync-membershipPOST /matrix/rooms/:roomId/relayGET /worktimePOST /worktime/startPOST /worktime/stopPATCH /worktime/:idGET /automation/activityPOST /automation/plan-dayGET /calendar/tasks.ics
Non-v1 placeholder endpoints are intentionally not exposed in runtime.
npm install
cp .env.example .env
npm run prisma:generate
npm run dev- Protected routes require both
x-internal-api-keyandx-user-emailheaders. x-user-emailmust be a valid email; malformed or missing values are rejected at API boundary.- Production startup fails if dev bypass env vars are configured (
ALLOW_DEV_AUTH_BYPASS=trueor non-emptyDEV_AUTH_BYPASS_EMAIL). - Food stock mutations are transaction-backed and emit audit records with actor + delta metadata.
- Matrix routes are household-scoped and persist room/user mappings, membership sync state, and relay unread counters.