Professional work · RAG assistant · Custom CMS · 3D web
Agency Website + AI CMS
A 3D, scroll-animated agency website with a custom CMS and an AI assistant that only answers from published content.
- chat providers
- 4
- chat providers
- source: src/server/ai/providers/*
- dimension vectors
- 1536
- dimension vectors
- source: drizzle/0004_ai_assistant.sql

The problem
Marketing teams need to edit everything themselves, and visitors increasingly ask questions instead of browsing. A generic chatbot would make up services and prices.
My role
- Engineered the system: full-stack development, custom CMS, RAG assistant and AI integration
Engineered during my role as AI & Software Engineer at Elenor Marketing Agency, Cairo (Jan 2026 – present). Screenshots come from sanitized demo environments: client and business data are replaced with demo data.
What it is
A Next.js site with React Three Fiber, GSAP and Lenis, structured for search and AI engines (JSON-LD, sitemap, llms.txt). A custom CMS covers pages, services, case studies, a scheduled blog, FAQ, media, navigation, theme and users. The AI assistant retrieves from published CMS content only (pgvector embeddings, re-indexed on publish), streams answers, and captures and scores leads.
Key features
- Retrieval-augmented assistant grounded only in published content
- Provider switch: Claude, OpenAI, OpenRouter, Gemini; embeddings OpenAI or Gemini
- Knowledge-health dashboard: indexed sources, gaps, top questions
- Lead capture and scoring from chat
- Full CMS with roles, scheduling (Vercel cron), drag-and-drop navigation, Tiptap editor
Architecture
Visitors
- 3D site
- Chat widget
Next.js
- Public pages
- Admin CMS
- /api/ai/chat
AI
- Retriever
- LLM provider
- Lead scorer
Data
- Postgres + pgvector
- Blob storage
- Cron publish
AIRAG over CMS content with pgvector (real[] fallback)
AIStreaming answers
AILead extraction and scoring
Stack
Web
CMS
AI
Engineering challenges
01
Grounding by construction
The assistant can only see chunks indexed from published CMS records. When an answer is missing, it appears as a content gap in the admin dashboard instead of a guess.
Screens
Run locally against an anonymized copy of the seed content. No AI keys were connected, so the assistant admin shows its “not configured” state.
Next project
Operations OS