ProjectHub (Scout) · Embeddable AI chat widget for recruiters
An embeddable AI chat widget powered by 'Scout', a free multi-provider recruiter assistant. Vanilla JS frontend on GitHub Pages, Node.js backend on a Google Cloud e2-micro VM, with a JSON knowledge base and automatic failover across five AI providers.User need
I wanted a way for recruiters visiting my portfolio to ask questions about my projects and experience without me being on the other end of a contact form. The widget needed to be embeddable with a single script tag, cost nothing to run, and keep working even if one AI provider went down or hit a rate limit.
What I built
ProjectHub is an embeddable AI chat widget powered by "Scout", a free multi-provider recruiter assistant. The frontend is vanilla JavaScript served from GitHub Pages, embedded with a single script tag. The backend is a Node.js server on a Google Cloud e2-micro VM, with Caddy and Let's Encrypt handling HTTPS. A JSON knowledge base lives in the GitHub repo with bidirectional sync, and Scout rotates across five AI providers — Groq, Cloudflare Workers AI, GitHub Models, Google Gemini, and xAI Grok — with automatic failover.
Widget & backend
- One-script embed:
<script src="https://bradleymatera.github.io/ProjectHub/ProjectHub.js?v=15"></script> - Response cache with 5-minute in-memory cache
- Per-tab memory so conversations stay contextual within a session
- Safety checks and a self-improvement loop (Think mode)
- Analytics dashboard for tracking widget usage
- API endpoints:
/,/health,/api/knowledge-health,/api/chat,/api/think
AI providers & infra
- Multi-provider failover: Groq, Cloudflare Workers AI, GitHub Models, Google Gemini, xAI Grok
- JSON knowledge base in GitHub repo with bidirectional sync
- Fallback to knowledge base if all AI providers fail
- Caddy + Let's Encrypt for automatic HTTPS
- Build process:
cat data.js utils.js logic.js ui.js > ProjectHub.js - 6 comprehensive test suites — 474+ tests total
What I did
- Solo developer — designed and built the widget, backend, and knowledge base
- Built the vanilla JS frontend with a single-script-tag embed model
- Implemented multi-provider failover across five AI services
- Set up the Node.js backend on a Google Cloud e2-micro VM with Caddy and Let's Encrypt
- Built the response cache, per-tab memory, and Think mode self-improvement loop
- Wrote 6 test suites totaling 474+ tests
- Built the analytics dashboard for tracking widget interactions
Real artifacts you can verify
- GitHub repo: github.com/BradleyMatera/ProjectHub
- Live demo: bradleymatera.github.io/ProjectHub
- Created: April 11, 2025
- Contributions: 246 contributions on the main branch
- Embed snippet:
<script src="https://bradleymatera.github.io/ProjectHub/ProjectHub.js?v=15"></script> - API endpoints:
/,/health,/api/knowledge-health,/api/chat,/api/think - Test coverage: 6 test suites, 474+ tests total
- Build process:
cat data.js utils.js logic.js ui.js > ProjectHub.js - Honest limitations: Runs entirely on free tiers (may have rate limits). Fallback to knowledge base if all AI providers fail. Not a production enterprise solution — designed for personal portfolio use.
