From 7d379a9743da87a34a8d21e967b37b97ef11156c Mon Sep 17 00:00:00 2001 From: Bello Qudus Folohunsho Date: Mon, 12 Oct 2026 09:36:18 +0100 Subject: [PATCH] chore(sync): close stack feature and record api error contract --- AGENTS.md | 1 + docs/scope/scope.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e76c6c4..5a062a0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -63,6 +63,7 @@ Stored in `docs/specs/`. Format: `docs/specs/NNNN-title/index.md`, with `rationa - comments only when necessary and single line only - Domain writes go through `backend/src/lib/repository.ts` (UUID v4 ids from `crypto.randomUUID`, an Activity row for created and updated, closed set columns validated against `backend/src/lib/constants.ts`); default reads filter `deletedAt IS NULL`, and reads that cross a relation filter soft deleted parents - Day boundaries come from `backend/src/lib/timezone.ts`, which reads the `TIMEZONE` env var (IANA zone, default UTC, an unparseable value fails config load); no other code builds a Date for domain logic +- API errors answer as JSON `{ error }` from the central handler in `backend/src/app.ts`: a throw in a route becomes that body, a 4xx keeps its message, a 500 is logged by pino and returns "Internal server error" with no internals, so routes do not need their own catch for the envelope ## Git diff --git a/docs/scope/scope.md b/docs/scope/scope.md index 29e7d22..f0700e6 100644 --- a/docs/scope/scope.md +++ b/docs/scope/scope.md @@ -13,7 +13,7 @@ _These are recommendations to keep your build orderly, not requirements. Skip an |---|---------|-------|--------| | A | Client scaffold | Foundation | existing | | B | Backend scaffold | Foundation | in-progress | -| 18 | Stack & architecture | Foundation | in-progress | +| 18 | Stack & architecture | Foundation | done | | 1 | Coding standards & tooling | Foundation | done | | 2 | Data model | Foundation | done | | 3 | Design system & UI foundation | Foundation | planned | @@ -40,7 +40,7 @@ Pre workflow Next.js app: default start page, Tailwind, ESLint, and its own Next ### B. Backend scaffold · in-progress Express and TypeScript started but not running yet: the dev script points at a missing `src/index.ts` and both source files are empty, so it does not boot. Finishing it is the first build job, via `/develop`. code in `backend/` -### 18. Stack & architecture · in-progress +### 18. Stack & architecture · done Execute the stack decision from spec 0001: one git repo at the root, both apps booting locally on the decided services, the database migrated, auth mounted, and the proxy working. **Done when:** both apps run locally against Neon with migrations applied, Better Auth sign in works through the proxy, and the first deploy targets Vercel and Render with the environment variables documented. - [x] Design it (spec): `/architect stack & architecture`