PeerBridge — Anonymous AI Reflection for Youth Inspiration

Youth mental health conversations often stop before they even begin — not because people don’t want help, but because they fear judgment, identity exposure, or being “diagnosed.”

During casual conversations and online communities, we noticed a pattern:

“I just want to write what I feel — without labels, without accounts, without being told what’s wrong with me.”

PeerBridge was inspired by this gap. We wanted to build a quiet, anonymous space where users can pause, write freely, and receive gentle emotional reflection, not advice or diagnosis.

The core inspiration was simple:

Reflection > reaction

Safety > scale

Empathy > automation

What it does

PeerBridge is an anonymous, AI-assisted journaling platform designed for youth mental-health reflection.

When a user writes a journal entry:

The system first checks for high-risk language using rule-based safety logic.

If safe, it performs emotion classification (anger, sadness, fear, joy, etc.).

Based on the detected emotion, an AI model generates a calm, human-like reflective response.

The emotion is shown visually using color + emoji, clearly labeled as contextual, not diagnostic.

Users can submit star-based feedback (no text, no pressure).

All data is stored anonymously, with a random session ID — no login, no identity.

Important boundaries:

No therapy

No diagnosis

No medical advice

No tracking

How we built it Architecture Overview

PeerBridge follows a modular, safety-first pipeline:

User Input ↓ Safety Gate (Rule-based) ↓ Emotion Model (ML) ↓ Reflection Model (LLM) ↓ UI + Feedback ↓ Anonymous DB Storage

Tech Stack

Backend: FastAPI (Python)

Frontend: Jinja2 + Bootstrap 5 (dark mode UX)

Emotion Model: j-hartmann/emotion-english-distilroberta-base (local inference)

Reflection Model: TinyLLaMA via Ollama (local / container-ready)

Database: MySQL (anonymous entries only)

Deployment-ready: Docker + Railway compatible

Safety Layer: Rule-based keyword + negation logic

Key Design Choices

Local model loading to avoid data leakage

Rule-based safety before ML (never the other way around)

Minimal prompts to prevent “SYSTEM / USER” leakage

Visual emotion tags instead of clinical labels

Dark mode + high contrast for calm, focused writing

Challenges we ran into

  1. LLM Output Leakage

Early versions of the reflection model leaked prompt text like SYSTEM: or User: into responses. Solution: We redesigned prompts to be minimal and added output sanitization for judge-safe responses.

  1. Emotion ≠ Mental Health

Showing emotions without implying diagnosis was tricky. Solution: We explicitly labeled emotions as contextual tags and mapped them to calm emojis and colors, not extreme expressions.

  1. Safety Without Overblocking

Keyword-based safety systems often create false positives. Solution: We added negation exceptions (e.g., “I don’t want to harm myself”) to reduce unnecessary blocking.

  1. UX Balance

Too minimal felt empty. Too colorful felt overwhelming. Solution: We used dark backgrounds with high-contrast cards, subtle color accents, and centered layouts to guide focus.

Accomplishments that we're proud of

Built a full safety-first AI pipeline from scratch

Zero-login, zero-identity journaling

Emotion-aware reflection without diagnosis

Clean, judge-readable codebase

Fully hackathon-ready deployment setup

UI that feels calm, not clinical

Clear ethical boundaries enforced in code

What we learned

Safety logic should precede machine learning, not follow it

UX decisions matter as much as model accuracy

Less text can create more emotional space

Anonymous systems still need accountability

AI for mental health must be humble by design

Judges value clarity more than complexity

What's next for PeerBridge — Anonymous AI Reflection for Youth

Future directions we’d like to explore:

Session-level emotion trends (no identity tracking)

Optional grounding prompts during high emotional intensity

Multilingual emotion models

On-device inference for even stronger privacy

Research partnerships to evaluate reflection quality (ethically)

Our goal is not to replace help — but to lower the barrier to reflection, one quiet moment at a time.

Built With

Share this project:

Updates