CS-15 — Automation & AI · Backend & integrations · Architecture & performance
This engineering portfolio with an AI assistant
A multilingual portfolio with an experience explorer, case studies and an AI assistant that answers only from an approved knowledge base, with cost controls.
- My role
- Design and implementation, with AI-assisted development.
- Period
- 2026
- Disclosure
- Public project
- Technologies
- TypeScriptNext.jsPostgreSQLDrizzle ORMAnthropic APIVercel
- Last reviewed
- 13 November 2026
Context
A static CV does not show how someone reasons about technical problems. The goal was an explorable portfolio with an assistant that is useful, accurate and very cheap to run.
Challenges
- 01Preventing the assistant from inventing experience or metrics.
- 02Keeping the cost per conversation in cents and protecting it against abuse.
- 03Publishing in three languages without silent or unreliable translations.
Solution & architecture
Version-controlled Markdown compiled at build time (drafts never reach the bundle), deterministic context selection without a vector database, explicit per-mode routing, and atomic usage and budget limits in PostgreSQL.
SELECT ai_reserve(
ARRAY['visitor','global'], ARRAY[$1,'all'], ARRAY[$2,$3],
ARRAY[15,500], ARRAY[NULL,1.00]::numeric[], ARRAY[1,NULL],
$4::numeric
);Key decisions
D-01
No vector RAG in the first version
The knowledge base is small; sending the full approved context or a tag-based selection is simpler, deterministic and cheaper.
D-02
Budget counters in PostgreSQL
An atomic SQL function reserves budget before each call and reconciles it with actual usage, without adding another paid service.
Trade-offs
- The CSP allows inline scripts to keep pages static, at the cost of not using per-request nonces.
Results
Results will be published once verified
Lessons learned
Not documented yet
Ask about this case study
Questions here are answered with the case study “This engineering portfolio with an AI assistant” as context.