An AI-powered self-discovery platform that helps users overcome Solomon's Paradox — the tendency to reason more wisely about others' problems than our own. Zen creates a Digital Twin from your journal entries using RAG and pairs it with a Council of 50+ historical mentors to provide personalized wisdom and guidance.
Built at UofT Hacks 2025.
Write and reflect on journal entries with AI-generated follow-up questions that deepen self-awareness. Entries are embedded and stored for semantic retrieval, allowing the system to learn about you over time.
Chat with a multi-agent system that intelligently routes your conversation through:
- The Empath — initial intake and emotional recognition
- Discovery Agent — clarifying questions to understand your situation
- Wise Mentor — personalized guidance from 50+ historical figures (Marcus Aurelius, Maya Angelou, Steve Jobs, Socrates, and more)
Mentors are auto-selected based on your situation and reference your journal history for context-aware advice.
Personalized meditation sessions (5–30 min) streamed in real-time with:
- 5-stage journey: welcome, breathing, body scan, visualization, closing
- Breathing circle animation and progress tracking
- Content personalized from your journal entries
- Post-meditation reflection capture
AI-generated analysis of your journal patterns and emotional landscape — your Digital Twin's perspective on who you are.
| Layer | Technologies |
|---|---|
| Frontend | Next.js 14 (App Router), React 18, TypeScript, Tailwind CSS, Framer Motion |
| Backend | FastAPI, LangGraph, LangChain, Google Gemini API |
| Database | Supabase (PostgreSQL + pgvector) |
| Streaming | Server-Sent Events (meditation), REST (chat) |
├── backend/
│ ├── app/
│ │ ├── agents/orchestrator.py # LangGraph workflow + mentor personas
│ │ ├── routers/ # journal, chat, meditation, digital_self
│ │ ├── services/ # RAG engine, personalization
│ │ ├── models/schemas.py # Pydantic models
│ │ ├── main.py # FastAPI entry point
│ │ ├── config.py # Settings
│ │ └── database.py # Supabase client
│ ├── requirements.txt
│ └── supabase_schema.sql
├── frontend/
│ ├── app/ # Pages: journal, counsel, meditation, digital-self
│ ├── components/zen/ # ParticleBackground, Navigation
│ └── lib/ # Utilities
- Python 3.10+
- Node.js 18+
- Supabase account
- Google Gemini API key
- Go to your Supabase project dashboard
- Enable the
pgvectorextension - Run
backend/supabase_schema.sqlin the SQL Editor
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .envEdit .env:
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
SUPABASE_SERVICE_KEY=your_supabase_service_role_key
GOOGLE_API_KEY=your_google_gemini_api_key
python -m app.main
# http://localhost:8000cd frontend
npm install
cp .env.local.example .env.localEdit .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
NEXT_PUBLIC_API_URL=http://localhost:8000
npm run dev
# http://localhost:3000User -> Next.js Frontend -> FastAPI Backend -> LangGraph Orchestrator
| |
v v
Supabase Google Gemini
(pgvector RAG) (embeddings + chat)
The LangGraph orchestrator manages a state-based workflow that routes conversations through specialized agents. The RAG pipeline embeds journal entries using Google's text-embedding-004 model and retrieves semantically relevant context via pgvector, injecting it into mentor responses for personalized guidance.
Interactive API docs available at http://localhost:8000/docs when the backend is running.
| Endpoint | Description |
|---|---|
POST /api/journal/ingest |
Submit a journal entry |
POST /api/journal/followup |
Get AI follow-up questions |
POST /api/chat |
Send a message to The Council |
GET /api/meditation/stream |
Stream a guided meditation (SSE) |
POST /api/digital-self/analyze |
Get Digital Twin analysis |
MIT