| Status | Scope |
|---|---|
| Implemented | Local command surface, Docker Compose foundation, Drizzle migration tooling, Auth.js environment examples, deferred infrastructure ADRs, and docs governance. |
| In progress | Deployment narrative defines the intended topology without adding production automation. |
| Planned | Production Next.js deployment, managed PostgreSQL/pgvector operations, OpenAI provider secrets, Langfuse configuration, rollback drills, and environment hardening. |
| Deferred | Kubernetes, Terraform, multi-region production, separate services, Redis, and managed queue infrastructure. |
The v1 deployment target is a single Next.js application boundary backed by PostgreSQL with pgvector.
| Component | Status | Deployment Role |
|---|---|---|
apps/web |
In progress | Browser UI, Auth.js routes, product API routes, and server-side AI runtime. |
| PostgreSQL/pgvector | Implemented locally | Durable auth/account records, source/chunk foundations, embeddings column, and trace reference table. Retrieval behavior remains planned. |
| OpenAI | Planned | Default LLM and embedding provider. |
| Auth.js | Implemented foundation | Local credentials auth, account ownership, JWT credentials sessions, and provider-ready Auth.js tables. |
| Langfuse | Planned | LLM trace and eval metadata references. |
tools/eval-runner |
In progress | Internal CLI for local/CI eval execution, not a deployed service. |
Environment variables should be documented through .env.example files only. Real secrets must stay outside the repo.
Required or planned categories:
DATABASE_URLfor PostgreSQL with pgvector.AUTH_SECRETfor Auth.js signing. Generate a real secret outside the repo for any shared or deployed environment.AUTH_URLfor the application base URL when the deployment platform does not infer it.- OpenAI API key and model configuration.
- Langfuse public/secret keys and host.
- Cost, token, or workflow guardrail settings.
Do not commit real .env files, API keys, trace exports, or provider payloads.
Drizzle migrations are implemented for the auth/account foundation. Migration handling should include:
- Local migration command documentation:
make db-migrateorpnpm --filter @ancora/web db:migrate. - Review of account ownership columns and indexes.
- pgvector extension setup.
- Rollback notes for risky schema changes.
- Synthetic seed data only.
The initial migration creates CREATE EXTENSION IF NOT EXISTS vector, Auth.js tables, accounts, users, account_memberships, sources, source_chunks, and llm_trace_refs. Credentials sessions use JWTs due to Auth.js provider constraints; auth_sessions is still present for future provider-backed sessions.
Secrets must be injected through environment variables or the deployment platform's secret manager. Docs and examples may show variable names, but not real values.
Secret-sensitive changes require human review when they alter provider behavior, auth/account scope, privacy posture, or deployment scope.
For local development only, the web server has non-production fallbacks for DATABASE_URL and AUTH_SECRET. Deployed environments must set real values explicitly.
Planned rollback guidance:
- Keep generated artifacts versioned so failed regeneration does not overwrite accepted card content.
- Separate reversible UI changes from irreversible data migrations.
- Document migration rollback or forward-fix strategy before running production migrations.
- Preserve prompt versions so model and prompt regressions can be traced.
- Keep eval reports tied to prompt versions and model settings.
The following are deferred until the core vertical slice exists and an ADR or roadmap item justifies the work:
- Kubernetes and Terraform.
- Separate backend services.
- Redis queues and background worker infrastructure.
- Multi-region failover.
- Production incident automation and paging.
- Enterprise retention, audit, and compliance controls.