Skip to content

rishith-c/synapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

220 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synapse

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

Frontend

npm install
npm run dev

Open http://localhost:3000.

FastAPI Backend

cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

Useful endpoints:

  • GET /health
  • POST /analyze
  • GET /readings
  • WS /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.

Environment

The app can use these keys when present:

  • HACKCLUB_AI_KEY
  • HACKCLUB_AI_MODEL
  • HACKCLUB_VISION_MODEL defaults to qwen/qwen3-vl-235b-a22b-instruct
  • TRIBE_SPACE
  • TRIBE_JSON_API
  • HF_TOKEN or HUGGING_FACE_TOKEN
  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY

TRIBE v2 Notes

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.

Deploy

npm run build
vercel deploy --prod

About

See your brain before you think it. Hackathon app on Meta TRIBE v2 brain encoder via Hugging Face.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors