Portfolio Decisions
Project Setup
- Framework: Next.js 16 App Router with TypeScript (Node 20.9+)
- Styling: Tailwind CSS with original site colors preserved (#32c0f4 cyan, #e97124 orange)
- AI Chat: AI SDK + Inferencia (OpenAI-compatible)
- RAG: GCP Cloud SQL (PostgreSQL + pgvector) optional; falls back to file-based knowledge
- Infrastructure: GCP Cloud Run via Terraform
- CI/CD: Cloud Build (push to
main→ build & deploy to Cloud Run) - Version: Single source of truth in
package.json, read viasrc/lib/version.ts
Key Decisions
- Used original site colors (#32c0f4 cyan for primary, #e97124 orange for secondary) adapted to dark theme
- Implemented AI SDK for streaming chat (Inferencia API)
- Created comprehensive rate limiting (per-IP, session cap, daily budget)
- Pre-seeded cache for common questions to avoid burning API calls
- Chat API uses Node.js runtime (full API access for RAG/inference) — see ADR-003
- Single Cloud Run instance with $20 budget kill switch — see ADR-001
- Page Visibility API for War Room polling — see ADR-002
- Dark theme only — no light mode
- In-memory telemetry resets on cold start (honest dashboard)
- SLOs tracked in War Room: availability, P95 latency, error rate, budget headroom
Architecture Decision Records
See docs/adr/ for formal ADRs.
Quality Gates
-
npm run buildsucceeds -
npm run lintpasses (0 errors, 0 warnings) -
npm run test— Vitest unit tests pass -
npm run test:e2e— Cypress smoke tests pass - All pages render: Home, About, Work, Architecture, Chat, Contact, War Room
- Chat API with rate limiting, prompt injection defense, and caching
- RAG pipeline (file-based; Cloud SQL optional)
- Terraform IaC complete
- Cloud Build CI/CD (push to main → deploy)
- Security headers (CSP, HSTS, X-Frame-Options)
- No secrets in client responses or logs