Synapse is a hackathon-focused marketing understanding hub. It predicts how an ad, hook, script, image, URL, or video may light up cortical targets, then turns that read into practical creative feedback.
The product uses:
- Next.js 16 App Router frontend
- Three.js/R3F fsaverage5 hollow mesh brain rendering with drag rotation
- Meta TRIBE v2-inspired cortical analysis with TRIBE Space, Hugging Face/Qwen, and deterministic fallback paths
- Audience matrix and A/B comparison workflows for social ads
- Evidence-first YouTube analysis: public captions/transcript, visual thumbnail captioning through Hugging Face BLIP when available, and no score when evidence is missing
- Optional Supabase history for signed-in users
- Local FastAPI backend with SQLite, WebSocket, and uvicorn support
npm install
npm run devOpen http://localhost:3000.
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000Useful endpoints:
GET /healthPOST /analyzeGET /readingsWS /ws/analyze
The backend writes to backend/synapse.sqlite3. If HACKCLUB_AI_KEY is set it
uses Qwen for stronger creative feedback; otherwise it stays fully local with
deterministic heuristics.
The app can use these keys when present:
HACKCLUB_AI_KEYHACKCLUB_AI_MODELHACKCLUB_VISION_MODELdefaults toqwen/qwen3-vl-235b-a22b-instructTRIBE_SPACETRIBE_JSON_APIHF_TOKENorHUGGING_FACE_TOKENNEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
Meta's TRIBE v2 model expects local text_path, audio_path, or video_path
inputs through TribeModel.get_events_dataframe(...), then returns predictions
as (n_timesteps, n_vertices) on the fsaverage5 cortical mesh. For YouTube
URLs, Synapse first extracts real evidence from the remote page. If it cannot
obtain transcript text or captioned visual evidence, it refuses to produce an
appeal score instead of guessing from the title.
When captions are missing but the video exposes thumbnails, Synapse captions those frames with the configured Qwen3-VL vision model and marks the analysis as visual-only with a transcript warning.
npm run build
vercel deploy --prod