Commit graph

8 commits

Author SHA1 Message Date
5656f1cc1c feat: scaffold Business/Life/Intelligence/Trust Engine tables
Per Blueprint v4.0 §12 canonical data models:
- Business Engine: organizations extended (legal_name, country, registry_id,
  domain, external_ids), transactions (minor-unit amounts, evidence_status),
  documents (metadata only -- binary/OCR stays in Paperless via paperless_id)
- Life Engine: goals (horizon/metric/target/milestones)
- Intelligence Engine: decisions (context/options/assumptions/evidence),
  opportunities, ai_requests (context_manifest_hash for audit without
  storing sensitive payload content in Postgres)
- Trust Engine: observations (generic subject_type/subject_id so any
  entity -- user, org, device -- can feed reputation/trust scores)

Applied directly to Supabase staging Postgres (14 tables total now).
This is also the first drizzle/ migration actually committed -- the
earlier one from the Identity Engine work never made it into git.
2026-07-21 19:44:45 +02:00
0a4ffc41e6 fix: scope tsconfig to src/ so nest build emits dist/main.js
Without an include filter, tsc pulled in drizzle.config.ts from the
repo root too, which widened the inferred rootDir and nested output
under dist/src/main.js instead of dist/main.js -- crashing the
container (Cannot find module '/app/dist/main') since the Dockerfile
CMD expects the standard Nest layout.
2026-07-21 12:07:06 +02:00
fe42a1ae57 fix: force devDependencies install in ceo-api Docker build stage
npm ci silently skips devDependencies when NODE_ENV=production is set
in the environment, which broke the build (nest: not found) once
Coolify injected NODE_ENV=production as a build-time var. --include=dev
makes the build stage robust regardless of that env var; the runtime
stage now does its own --omit=dev install instead of copying the build
stage's node_modules wholesale, keeping the final image prod-only.
2026-07-21 12:03:42 +02:00
4372684f1b fix: correct ceo-api Dockerfile port and dependency install
EXPOSE was 3000 but main.ts defaults PORT to 3001. npm install had no
lockfile/legacy-peer-deps, which now fails on the @nestjs/swagger v8
vs @nestjs/common v11 peer conflict. Also adds .dockerignore so the
build stage's node_modules isn't clobbered by a local one.
2026-07-21 02:50:53 +02:00
722113a359 feat: scaffold Identity Engine (CASL/tenant guard) and Event Fabric (outbox)
Adds tenants/memberships/consent_records tables, a CASL AbilityFactory
keyed on membership role, and a TenantGuard that derives tenant_id from
session only (never client-supplied), per blueprint 8.2/8.3/11.3.

Adds outbox_events + audit_log tables, an OutboxService for transactional
writes, and a Cron-based OutboxDispatcher that publishes pending events
to a BullMQ queue, per blueprint 9.1 (events before intelligence).
2026-07-21 02:46:35 +02:00
Claude
3fe8d24179 feat: add Drizzle ORM, Supabase admin client, Swagger, Helmet, Pino logging, rate limiting 2026-07-20 22:41:09 +02:00
Claude
ce5cf134ae feat: scaffold NestJS API skeleton with health check 2026-07-20 22:26:33 +02:00
407312e9a2 Initial commit 2026-07-20 20:23:56 +00:00