- Built a multi-tenant REST API with NestJS, Drizzle ORM, and PostgreSQL + pgvector, enforcing tenant isolation on every query via JWT-derived tenant ID.
- Integrated Cohere embeddings into a RAG pipeline over a Knowledge Base for context-aware AI document generation.
- Designed a per-tenant token economy with row-level locking to prevent race conditions and a budget-based cap to stop generation before overspend.
- Built a document-generation engine that renders AI-produced JSON specs into native .docx and .pptx files server-side via the docx and PptxGenJS libraries — never executing model-generated code.
- Hardened multi-tenant file uploads against magic-byte / polyglot injection with randomized extension-less storage, nosniff + download-only serving, and content-sniff rejection of HTML/SVG/MHTML.
- Built real-time notifications using Postgres LISTEN/NOTIFY for multi-instance SSE delivery, without Redis.
- Developed a SvelteKit frontend with a conversational chat interface and role-based dashboards (superadmin/admin/member).
- Designed a model-agnostic AI layer via Vercel AI Gateway, supporting both cloud (Claude, Cohere) and local (Ollama) providers.
Stack NestJSSvelteKitPostgreSQLpgvectorDrizzle ORMpg-bossCohereLlamaParseOllaman8nVercel AI Gateway