PocketRAG: RAG Portfolio on Shared PHP Hosting
Interactive AI portfolio that answers questions about my career from real knowledge — on shared hosting that cannot run Python, Docker, or a vector database.
Goal
Ship an interactive AI portfolio that answers questions about my career using real knowledge — on shared hosting that cannot run Python apps, Docker, or a vector database.
Constraints
- HostGator shared hosting: PHP + Apache only; no Passenger Python, no Composer packages for retrieval
- Outbound HTTPS available to Groq; secrets must live outside the docroot
- Corpus is small (~markdown knowledge files), so embeddings can add cost without clear benefit
Architecture
Static frontend — HTML/CSS/JS chat UI with bilingual EN/ES routes
Retrieval — BM25 over knowledge/*.md with synonym expansion; flow shortcuts for recruiter/builder paths
Generation — Groq via plain PHP cURL (hybrid BM25 + embeddings when available)
Hardening — IP rate limits, message/history clamps, CORS allowlist, secrets outside public web root
Outcome
A zero-dependency stack that stays maintainable on commodity hosting, rebuilds the index per request, and keeps the “chat portfolio” experience without blocking SEO behind an empty SPA — professional content also lives in static HTML flows.