feat(appview): scaffold Fastify backend with Drizzle, Valkey, and health checks (#5)
* feat(appview): scaffold Fastify backend with Drizzle, Valkey, and health checks
Phase 3 M1: Initialize the atgora-api project with all foundational
infrastructure. Establishes patterns for subsequent milestones.
- Fastify 5 with Helmet (CSP, HSTS), CORS, and rate limiting
- Drizzle ORM with PostgreSQL (pgvector image), initial schema
(users + firehose_cursor tables), and generated migration
- Valkey cache client (ioredis) with retry strategy
- Zod environment variable validation (fail fast on invalid config)
- Pino structured logging via Fastify with GlitchTip/Sentry integration
- Health check endpoints: GET /api/health (liveness), GET /api/health/ready
(readiness with db + cache checks)
- @atgora-forum/lexicons imported from workspace
- TypeScript strict mode with zero errors
- Vitest unit tests (14) and integration tests (2) against real services
- GitHub Actions CI (lint, typecheck, test, integration, build, security)
* fix(ci): make repo self-contained for standalone CI checkout
Each GitHub Actions job checks out only this repo, so workspace-level
references (pnpm-lock.yaml cache, tsconfig.base.json, eslint.config.base.js,
workspace:* dependencies) all fail. Inline base configs, remove workspace
dependency (lexicons not imported yet), and drop --frozen-lockfile until a
repo-local lockfile is committed.
authored by