Read between the lines - with honest doubt.
Decoder helps neurodiverse teens interpret ambiguous text messages. Instead of one AI guess, it runs many independent reads, clusters them by meaning, and shows confidence as agreement - with the uncertainty left visible.
Youth Code x AI · Track 03 - AI that actually helps people.
Live: decoder-dun.vercel.app · Try the app · API health
| Typical AI chat | Decoder |
|---|---|
| One completion | 6–16 independent samples |
| Model says “I’m 80% sure” | Code measures sample agreement |
| Hides ambiguity | Empty bar space = doubt |
| Feels like a verdict | Feels like “here are plausible reads” |
Not therapy. Not a diagnosis. A practice tool for messages sent to you, with crisis routing to real helplines when needed.
git clone git@github-dev:shaileshdev4/decoder.git
cd decoder
copy .env.example .env # add ANTHROPIC_API_KEY or GROQ_API_KEY
# Terminal 1 - backend
cd backend
pip install -r ..\requirements.txt
uvicorn server:app --reload --host 127.0.0.1 --port 8001
# Terminal 2 - frontend
cd frontend
npm install
npm run dev # open http://localhost:5173Try on /app: Them: wow great job 🙃 → watch confidence bars converge.
| Doc | Audience | Contents |
|---|---|---|
| ARCHITECTURE.md | Judges / technical reviewers | System design, pipeline, safety, privacy, diagrams |
| docs/DEMO.md | Demo video / live pitch | 3-minute walkthrough script |
flowchart LR
A[Message] --> B[Safety check]
B --> C[N LLM samples]
C --> D[Cluster by meaning]
D --> E[Verify cues in text]
E --> F[Confidence = agreement]
F --> G[Show bars + doubt]
- Safety first - crisis/distress → helplines, no tone-reading
- N independent LLM reads - model never sees previous samples
- Python clusters similar meanings and computes confidence
- Cue verifier drops readings that cite text not in the message
- Abstain when reads don’t agree - or show low-confidence bars
- Optional reply coach - one extra LLM call after readings
Details → ARCHITECTURE.md
decoder/
├── frontend/ React UI (landing, app, privacy)
├── backend/ FastAPI + decoder_core engine
│ ├── server.py
│ ├── decoder_core/
│ └── tests/
├── ARCHITECTURE.md
├── docs/DEMO.md
└── .env.example
- Independent multi-sample decode with adaptive budget (6 → 16)
- Confidence bars + particle convergence animation
- Screenshot upload (Anthropic vision)
- Crisis / distress off-ramps with regional helplines
- On-device voice sample, cues journal, history
- Rumination guard, dyslexia font, reduce motion
- Rate limiting, hashed response cache, EXIF strip on upload
decoder/.env (copy from .env.example):
| Variable | Purpose |
|---|---|
LLM_PROVIDER |
anthropic or groq |
ANTHROPIC_API_KEY |
Production + screenshots |
ANTHROPIC_MODEL |
e.g. claude-haiku-4-5 |
GROQ_API_KEY |
Fast text-only dev |
DECODER_N_SAMPLES |
Default 16 |
| Endpoint | Description |
|---|---|
GET /api/health |
Provider, model, sample budget |
POST /api/decode-text |
{ "conversation", "voice_sample", "region" } |
POST /api/decode-image |
Multipart screenshot |
cd backend && python -m pytest tests/ -q45 tests - clustering, safety, abstention, parser, intake.
Vercel (frontend) + Railway (backend) — full steps in DEPLOY.md.
| Platform | Root dir | Key env vars |
|---|---|---|
| Railway | backend/ |
ANTHROPIC_API_KEY, LLM_PROVIDER, CORS_ORIGINS |
| Vercel | frontend/ |
VITE_API_URL → Railway URL |
Local all-in-one: .\start.ps1 from project root.
- Messages not stored on server after processing
- API keys server-side only
- Personalization data on-device (localStorage)
See /privacy in the app or ARCHITECTURE.md - Privacy.
MIT - LICENSE