feat: auth middleware, brain data layer, Valkey queue (P1-002, P1-003, P1-004)
Auth middleware (P1-002): - DatabaseModule provides Db instance with graceful shutdown - AuthModule mounts BetterAuth at /api/auth/* via toNodeHandler - AuthGuard validates sessions via BetterAuth API - CurrentUser decorator extracts user from request Brain data layer (P1-003): - CRUD repositories for projects, missions, tasks, conversations - createBrain(db) factory returns all repositories - Re-exports drizzle-orm query helpers from @mosaic/db to avoid duplicate package resolution Queue (P1-004): - ioredis-based Valkey client with createQueue/createQueueClient - Enqueue/dequeue, pub/sub, queue length operations Closes #11, Closes #12, Closes #13 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
| P0-008 | done | Phase 0 | Project docs — AGENTS.md, CLAUDE.md, README | #69 | #8 |
|
||||
| P0-009 | done | Phase 0 | Verify Phase 0 — CI green, all packages build | #70 | #9 |
|
||||
| P1-001 | done | Phase 1 | apps/gateway scaffold — NestJS + Fastify adapter | #61 | #10 |
|
||||
| P1-002 | not-started | Phase 1 | Auth middleware — BetterAuth session validation | — | #11 |
|
||||
| P1-003 | not-started | Phase 1 | @mosaic/brain — migrate from v0, PG backend | — | #12 |
|
||||
| P1-004 | not-started | Phase 1 | @mosaic/queue — migrate from v0 | — | #13 |
|
||||
| P1-002 | done | Phase 1 | Auth middleware — BetterAuth session validation | #71 | #11 |
|
||||
| P1-003 | done | Phase 1 | @mosaic/brain — migrate from v0, PG backend | #71 | #12 |
|
||||
| P1-004 | done | Phase 1 | @mosaic/queue — migrate from v0 | #71 | #13 |
|
||||
| P1-005 | not-started | Phase 1 | Gateway routes — conversations CRUD + messages | — | #14 |
|
||||
| P1-006 | not-started | Phase 1 | Gateway routes — tasks, projects, missions CRUD | — | #15 |
|
||||
| P1-007 | done | Phase 1 | WebSocket server — chat streaming | #61 | #16 |
|
||||
|
||||
Reference in New Issue
Block a user