Version 1.0 | Last Updated: January 2026
OpenMindWell is NOT a substitute for professional mental health care.
This platform provides:
- Peer support and community connection
- Self-help resources and coping strategies
- A safe space to share experiences
This platform does NOT provide:
- Professional therapy or counseling
- Medical diagnosis or treatment
- Emergency crisis intervention
- Licensed mental health services
IF YOU ARE IN CRISIS:
- 🇺🇸 Call/Text 988 (Suicide & Crisis Lifeline)
- 🇺🇸 Text HOME to 741741 (Crisis Text Line)
- Find international helplines: findahelpline.com
- Call emergency services (911/112/999) for immediate danger
- Project Overview
- Features
- Tech Stack
- Architecture
- Folder Structure
- Environment Variables
- Local Development Setup
- Free Service Accounts Setup
- Deployment Guide
- Security & Privacy
- Contributing
- Roadmap
OpenMindWell is a free, open-source mental health support platform designed to provide anonymous peer support, self-help tools, and curated resources. Built with modern web technologies and deployed entirely on free-tier services.
- Accessibility: 100% free to use, no premium features
- Privacy: Anonymous accounts, no personal data required
- Safety: AI-powered crisis detection with automatic resource suggestions
- Community: Peer-to-peer support in moderated chat rooms
- Open Source: Transparent, auditable, and community-driven
- Individuals seeking peer support for mental wellness
- People exploring self-help strategies
- Communities building mental health awareness
- Open-source contributors (GSoC, Hacktoberfest, etc.)
(#TODO: these are proposed features, they will be implemented as we move ahead with the project)
- 6 pre-created support rooms (Anxiety, Depression, PTSD, etc.)
- Real-time WebSocket messaging
- Anonymous/pseudonymous usernames
- Emoji avatars (no photos)
- HuggingFace emotion analysis on every message
- Keyword-based fallback system
- Automatic warning messages with resources
- 4-tier risk levels (low, medium, high, critical)
- End-to-end private entries (only visible to user)
- Mood tracking (1-5 scale)
- Tagging system
- Reflection prompts
- Custom habit creation
- Daily logging with notes
- Streak tracking
- Progress visualization (coming soon)
- Curated mental health articles
- Crisis hotlines (US & International)
- Breathing exercises and guided meditations
- Categorized by type (hotline, article, exercise)
- User reporting functionality
- Moderator dashboard (volunteer-only)
- Flagged message review
- Community guidelines enforcement
- Trained peer support volunteers
- Moderator privileges
- Community safety oversight
- Framework: React 18 with Vite 5
- Router: React Router DOM 6
- Language: TypeScript 5.3
- Styling: Tailwind CSS 3.4
- Auth: Supabase Auth (anonymous sign-in)
- State: React Hooks
- HTTP Client: Fetch API
- WebSocket: Native WebSocket API
- Runtime: Node.js 18+
- Framework: Express.js 4.18
- Language: TypeScript 5.3
- WebSocket: ws library 8.16
- Database: Supabase (PostgreSQL 15)
- Auth: JWT validation
- AI: HuggingFace Inference API
- Security: Helmet, CORS, Rate Limiting
- Service: Supabase (managed PostgreSQL)
- ORM: None (direct SQL queries via Supabase client)
- Security: Row Level Security (RLS) policies
- Tables: 8 (profiles, rooms, messages, journal_entries, habits, habit_logs, resources, reports, volunteers)
- Provider: HuggingFace
- Model:
cardiffnlp/twitter-roberta-base-emotion - Task: Emotion classification (7 emotions)
- Fallback: Keyword-based pattern matching
- Frontend: Vercel (free tier)
- Backend: Render or Railway (free tier)
- Database: Supabase (free tier)
- Version Control: Git/GitHub
- Package Manager: npm
- Linting: TypeScript compiler
- Monorepo: Workspaces with concurrently
┌─────────────────────────────────────────────────────────────────┐
│ USER DEVICES │
│ (Web Browsers - Desktop/Mobile) │
└───────────────────────────┬─────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────┐
│ FRONTEND (React 18 + Vite) │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Routes: / → /onboarding → /dashboard │ │
│ │ Components: RoomsList, JournalForm, HabitTracker, etc. │ │
│ │ API Client: lib/api.ts (REST) + WebSocket client │ │
│ └───────────────────────────────────────────────────────────┘ │
│ Deployed on: Vercel/Netlify │
└───────────┬────────────────────────────────┬───────────────────┘
│ │
│ HTTP/REST │ WebSocket (wss://)
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ BACKEND (Express.js + ws) │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ REST API Routes: │ │
│ │ - /api/journal (GET/POST/PUT/DELETE) │ │
│ │ - /api/habits (GET/POST/PUT/DELETE) │ │
│ │ - /api/rooms (GET rooms, GET messages) │ │
│ │ - /api/resources (GET by category) │ │
│ │ - /api/moderation (GET reports, POST flag) │ │
│ │ │ │
│ │ WebSocket Server: │ │
│ │ - Real-time chat messaging │ │
│ │ - Room join/leave events │ │
│ │ - Crisis detection integration │ │
│ │ │ │
│ │ Services: │ │
│ │ - Crisis Detection (HuggingFace API + keywords) │ │
│ │ - Chat Server (WebSocket management) │ │
│ └────────────────────────────────────────────────────────────┘ │
│ Deployed on: Render or Railway │
└───────────────────────────┬─────────────────────────────────────┘
│
│ Supabase Client SDK
│
▼
┌────────────────────────────────────────────────────────────────┐
│ SUPABASE (Database + Auth) │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ PostgreSQL Database (8 tables): │ │
│ │ - profiles (user info) │ │
│ │ - rooms (chat rooms) │ │
│ │ - messages (chat history + risk_level) │ │
│ │ - journal_entries (private notes) │ │
│ │ - habits (user habits) │ │
│ │ - habit_logs (daily tracking) │ │
│ │ - resources (curated content) │ │
│ │ - reports (moderation flags) │ │
│ │ - volunteers (moderator access) │ │
│ │ │ │
│ │ Row Level Security (RLS): │ │
│ │ - Users can only see/edit their own data │ │
│ │ - Messages visible to room members only │ │
│ │ - Journal entries completely private │ │
│ │ │ │
│ │ Authentication: │ │
│ │ - Anonymous sign-in (no email required) │ │
│ │ - JWT tokens for API authentication │ │
│ └───────────────────────────────────────────────────────────┘ │
│ Managed by: Supabase │
└────────────────────────────┬───────────────────────────────────┘
│
│ HTTPS API Calls
│
▼
┌────────────────────────────────────────────────────────────────┐
│ HUGGINGFACE INFERENCE API │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Model: cardiffnlp/twitter-roberta-base-emotion │ │
│ │ Input: Chat message text │ │
│ │ Output: Emotion scores (anger, fear, sadness, etc.) │ │
│ │ Rate Limit: 1000 calls/day (free tier) │ │
│ └───────────────────────────────────────────────────────────┘ │
│ Managed by: HuggingFace │
└────────────────────────────────────────────────────────────────┘
┌──────┐
│ USER │ Opens app
└───┬──┘
│
▼
┌────────────────┐
│ Landing Page │ Sees disclaimers, clicks "Get Started"
└───┬────────────┘
│
▼
┌────────────────┐
│ Onboarding │ Enters nickname + avatar
└───┬────────────┘
│
▼
┌────────────────┐
│ Frontend │ Calls supabase.auth.signInAnonymously()
└───┬────────────┘
│
▼
┌────────────────┐
│ Supabase Auth │ Creates anonymous user, returns JWT
└───┬────────────┘
│
▼
┌────────────────┐
│ Frontend │ Creates profile (nickname, avatar, user_id)
└───┬────────────┘
│
▼
┌────────────────┐
│ Supabase DB │ Inserts into profiles table (RLS check)
└───┬────────────┘
│
▼
┌────────────────┐
│ Dashboard │ User redirected, sees rooms/journal/habits
└────────────────┘
┌──────┐
│ USER │ Types message in chat room
└───┬──┘
│
▼
┌────────────────┐
│ Frontend │ Sends via WebSocket: {type: 'chat', content: '...'}
└───┬────────────┘
│
▼
┌────────────────┐
│ Backend WS │ Receives message
└───┬────────────┘
│
├──────────────────────────┐
│ │
▼ ▼
┌────────────────┐ ┌──────────────┐
│ Crisis │ │ Supabase DB │
│ Detection │ │ Save message │
│ (AI + Keywords)│ │ with risk │
└───┬────────────┘ └──────────────┘
│
│ Returns: {riskLevel: 'high', isCrisis: true}
│
▼
┌────────────────┐
│ Backend WS │ Broadcasts to all room members
└───┬────────────┘
│
├──────────────────────────┐
│ │
▼ ▼
┌────────────────┐ ┌──────────────┐
│ All Users │ │ Original User│
│ See message │ │ Gets crisis │
│ │ │ alert (private)│
└────────────────┘ └──────────────┘
┌──────┐
│ USER │ Writes journal entry (title, content, mood, tags)
└───┬──┘
│
▼
┌────────────────┐
│ Frontend │ POST /api/journal + JWT token
└───┬────────────┘
│
▼
┌────────────────┐
│ Backend │ Validates JWT, extracts user_id
└───┬────────────┘
│
▼
┌────────────────┐
│ Supabase DB │ INSERT into journal_entries
│ │ RLS: Only if auth.uid() = user_id
└───┬────────────┘
│
▼
┌────────────────┐
│ Backend │ Returns created entry
└───┬────────────┘
│
▼
┌────────────────┐
│ Frontend │ Updates UI, shows success message
└────────────────┘
┌──────┐
│ USER │ Marks habit as complete for today
└───┬──┘
│
▼
┌────────────────┐
│ Frontend │ POST /api/habits/:id/log
└───┬────────────┘
│
▼
┌────────────────┐
│ Backend │ Check if already logged today
└───┬────────────┘
│
├─────── Already logged? ──────► Return error
│
▼
┌────────────────┐
│ Supabase DB │ INSERT into habit_logs (habit_id, date, notes)
└───┬────────────┘
│
▼
┌────────────────┐
│ Backend │ Calculate new streak
│ │ - Check yesterday's log
│ │ - If exists: streak++
│ │ - If not: streak = 1
└───┬────────────┘
│
▼
┌────────────────┐
│ Supabase DB │ UPDATE habits SET current_streak = X
└───┬────────────┘
│
▼
┌────────────────┐
│ Frontend │ Shows updated streak, confetti animation 🎉
└────────────────┘
openmindwell/
│
├── backend/ # Node.js Express backend
│ ├── src/
│ │ ├── config/
│ │ │ └── index.ts # Config validation & export
│ │ ├── lib/
│ │ │ └── supabase.ts # Supabase client & types
│ │ ├── middleware/
│ │ │ └── auth.ts # JWT authentication
│ │ ├── routes/
│ │ │ ├── journal.ts # Journal CRUD endpoints
│ │ │ ├── habits.ts # Habits CRUD + logging
│ │ │ ├── resources.ts # Resource listing
│ │ │ ├── rooms.ts # Room & message queries
│ │ │ └── moderation.ts # Reporting & flagging
│ │ ├── services/
│ │ │ ├── crisisDetection.ts # AI + keyword analysis
│ │ │ └── chatServer.ts # WebSocket server logic
│ │ ├── scripts/
│ │ │ └── setupDatabase.ts # Helper for DB setup
│ │ └── index.ts # Main Express server
│ ├── database/
│ │ └── schema.sql # PostgreSQL schema (CRITICAL)
│ ├── .env.example # Backend env template
│ ├── Dockerfile # Docker container config
│ ├── render.yaml # Render deployment config
│ ├── DEPLOYMENT.md # Backend deploy guide
│ ├── package.json # Backend dependencies
│ └── tsconfig.json # TypeScript config
│
├── frontend/ # Next.js frontend
│ ├── src/
│ │ ├── app/
│ │ │ ├── layout.tsx # Root layout
│ │ │ ├── page.tsx # Landing page
│ │ │ ├── onboarding/
│ │ │ │ └── page.tsx # Anonymous signup
│ │ │ ├── dashboard/
│ │ │ │ └── page.tsx # Main app UI
│ │ │ └── globals.css # Global styles
│ │ └── lib/
│ │ ├── supabase.ts # Supabase client
│ │ └── api.ts # API client functions
│ ├── .env.local.example # Frontend env template
│ ├── next.config.js # Next.js config
│ ├── tailwind.config.ts # Tailwind config
│ ├── postcss.config.js # PostCSS config
│ ├── package.json # Frontend dependencies
│ └── tsconfig.json # TypeScript config
│
├── .github/ # (Future) CI/CD workflows
├── .vscode/
│ └── extensions.json # Recommended extensions
│
├── .env.example # Root env template
├── .gitignore # Git ignore rules
├── package.json # Monorepo scripts
├── README.md # Project README
├── LICENSE # MIT License
├── CONTRIBUTING.md # Contribution guide
├── OPENMINDWELL_PROJECT_GUIDE.md # ← YOU ARE HERE
└── PROJECT_SUMMARY.md # Quick reference checklist
| File | Purpose |
|---|---|
backend/database/schema.sql |
MOST IMPORTANT - Defines all database tables, RLS policies, and seed data. Run this in Supabase SQL editor. |
backend/src/index.ts |
Main backend entry point. Starts Express server and WebSocket server. |
backend/src/services/crisisDetection.ts |
Analyzes messages for mental health crises using HuggingFace AI and keyword patterns. |
backend/src/services/chatServer.ts |
Manages WebSocket connections, room memberships, message broadcasting. |
frontend/src/app/dashboard/page.tsx |
Main application interface with tabs for Rooms, Journal, Habits, Resources. |
frontend/src/lib/api.ts |
HTTP client for backend API calls (journal, habits, etc.). |
.env.example files |
Templates for environment variables. Copy to .env and fill in. |
| Variable | Description | Example | Required? |
|---|---|---|---|
SUPABASE_URL |
Your Supabase project URL | https://abc123.supabase.co |
Yes |
SUPABASE_ANON_KEY |
Supabase anonymous/public key | eyJhbG... |
Yes |
SUPABASE_SERVICE_ROLE_KEY |
Supabase service role key (admin) | eyJhbG... |
Yes |
HUGGINGFACE_API_TOKEN |
HuggingFace API token | hf_abc123... |
Optional* |
FRONTEND_URL |
Frontend domain for CORS | http://localhost:3000 |
Yes |
PORT |
Backend server port | 3001 |
Optional** |
RATE_LIMIT_WINDOW_MS |
Rate limit window (ms) | 900000 (15 min) |
No |
RATE_LIMIT_MAX_REQUESTS |
Max requests per window | 100 |
No |
*Falls back to keyword-based crisis detection if not provided.
**Defaults to 3001 if not set. Render/Railway will auto-set this in production.
| Variable | Description | Example | Required? |
|---|---|---|---|
VITE_API_BASE_URL |
Backend API URL | http://localhost:3001 |
Yes |
VITE_WS_URL |
WebSocket server URL | ws://localhost:3001 |
Yes |
VITE_SUPABASE_URL |
Supabase project URL | https://abc123.supabase.co |
Yes |
VITE_SUPABASE_ANON_KEY |
Supabase anon key | eyJhbG... |
Yes |
Production values:
VITE_API_BASE_URL:https://your-backend.onrender.comVITE_WS_URL:wss://your-backend.onrender.com
- Node.js 18+ (check with
node -v) - npm 9+ (check with
npm -v) - Git (check with
git --version) - Supabase account (free tier)
- HuggingFace account (optional, free tier)
git clone https://github.com/yourusername/openmindwell.git
cd openmindwellnpm installThis installs concurrently for running multiple servers.
cd backend
npm install
cd ..cd frontend
npm install
cd ..- Go to supabase.com and create a free account
- Click "New Project"
- Choose organization, name your project (e.g.,
openmindwell) - Set a strong database password (save it!)
- Select a region (closest to you)
- Wait ~2 minutes for project to provision
- In Supabase dashboard, click "SQL Editor" (left sidebar)
- Open
backend/database/schema.sqlin your code editor - Copy the entire file (it's ~400 lines)
- Paste into Supabase SQL Editor
- Click "Run" (or press
Ctrl+Enter) - You should see success message and 8 tables created
- Click "Table Editor" to verify tables exist
- In Supabase dashboard, click "Project Settings" (gear icon)
- Click "API" in left sidebar
- Copy these values:
- Project URL (under "Config")
- anon public key (under "Project API keys")
- service_role key (under "Project API keys" - click "Reveal")
cd backend
cp .env.example .envEdit backend/.env:
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
HUGGINGFACE_API_TOKEN=hf_YourTokenHere # Optional for now
FRONTEND_URL=http://localhost:3000
PORT=3001cd ../frontend
cp .env.example .envEdit frontend/.env:
VITE_API_BASE_URL=http://localhost:3001
VITE_WS_URL=ws://localhost:3001
VITE_SUPABASE_URL=https://your-project-id.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...From the root directory:
npm run devThis starts:
- Backend on http://localhost:3001
- Frontend on http://localhost:3000
- Open http://localhost:3000 in your browser
- You should see the landing page with disclaimers
- Click "Get Started"
- Enter a nickname (e.g.,
TestUser123) - Select an avatar emoji
- Click "Continue"
- You should see the dashboard with 4 tabs
- Click "Rooms" to see 6 pre-created chat rooms
- Click a room to join (chat interface coming soon)
In Supabase Table Editor, check:
- profiles table has your new user
- rooms table has 6 rooms
- resources table has 8 resources
Free Tier Limits:
- 500 MB database storage
- 2 GB bandwidth/month
- 50,000 monthly active users
- Unlimited API requests
Setup:
- Go to supabase.com
- Click "Start your project"
- Sign up with GitHub (recommended)
- Create new organization (free)
- Create new project
- Save database password
- Wait for provisioning (~2 min)
- Apply schema from
backend/database/schema.sql
Get Credentials:
- Project Settings → API
- Copy URL and both API keys
Free Tier Limits:
- 1,000 API calls/day
- Rate limit: 30 requests/min
- Public models only
Setup:
- Go to huggingface.co
- Click "Sign Up" (use Google/GitHub)
- Verify email
- Click profile icon → Settings
- Click "Access Tokens" (left sidebar)
- Click "New token"
- Name:
openmindwell-crisis-detection - Role: Read
- Click "Generate"
- Copy token (starts with
hf_...) - Save in
backend/.envasHUGGINGFACE_API_TOKEN
Optional: If you skip this, the backend will use keyword-based detection (less accurate but functional).
Free Tier Limits:
- Unlimited bandwidth
- 100 GB/month build time
- 100 deployments/day
- Custom domains (free SSL)
Setup:
- Go to vercel.com
- Click "Sign Up"
- Use GitHub account (recommended)
- Authorize Vercel access
- You're ready to deploy!
Deploy Steps:
- Push code to GitHub
- In Vercel dashboard, click "Import Project"
- Select your GitHub repo
- Framework: Vite
- Root Directory:
frontend - Add environment variables (from
frontend/.env.local) - Click "Deploy"
- Wait ~2 minutes
- Get production URL (e.g.,
openmindwell.vercel.app)
Free Tier Limits:
- 750 hours/month (enough for 1 service)
- Spins down after 15 min inactivity
- 512 MB RAM
- Shared CPU
Setup:
- Go to render.com
- Click "Get Started"
- Sign up with GitHub
- Authorize Render access
- Click "New +" → "Web Service"
- Connect your GitHub repo
- Settings:
- Name:
openmindwell-backend - Runtime: Docker
- Dockerfile Path:
backend/Dockerfile - Plan: Free
- Name:
- Add environment variables (from
backend/.env) - Click "Create Web Service"
- Wait ~5 minutes for build
- Get production URL (e.g.,
openmindwell-backend.onrender.com)
Alternative: Railway
Similar to Render, also has 500 hours/month free tier.
- Go to railway.app
- Sign up with GitHub
- Click "New Project"
- Select "Deploy from GitHub repo"
- Choose your repo
- Railway auto-detects Dockerfile
- Add environment variables
- Deploy!
-
Push to GitHub:
git add . git commit -m "Initial commit" git push origin main
-
Import to Vercel:
- Go to vercel.com/dashboard
- Click "Add New" → "Project"
- Select your GitHub repo
- Framework Preset: Vite
- Root Directory:
frontend - Click "Deploy"
-
Add Environment Variables:
- In Vercel project settings → Environment Variables
- Add all from
frontend/.env:VITE_API_BASE_URL=https://your-backend.onrender.com VITE_WS_URL=wss://your-backend.onrender.com VITE_SUPABASE_URL=https://your-project.supabase.co VITE_SUPABASE_ANON_KEY=eyJ... - Click "Save"
-
Redeploy:
- Deployments tab → Click "..." → "Redeploy"
-
Custom Domain (Optional):
- Settings → Domains
- Add your domain (e.g.,
openmindwell.org) - Follow DNS instructions
cd frontend
npx vercel
# Follow prompts
npx vercel --prod-
Push code to GitHub (must include
backend/render.yaml) -
Create Web Service:
- Go to dashboard.render.com
- Click "New +" → "Web Service"
- Connect GitHub repo
- Render detects
render.yamlautomatically - Click "Apply"
-
Set Environment Variables:
- In service settings → Environment
- Add variables from
backend/.env:SUPABASE_URL SUPABASE_ANON_KEY SUPABASE_SERVICE_ROLE_KEY HUGGINGFACE_API_TOKEN FRONTEND_URL=https://your-frontend.vercel.app PORTis auto-set by Render
-
Manual Deploy:
- Click "Manual Deploy" → "Deploy latest commit"
- Wait ~5 minutes for Docker build
-
Get URL:
- Copy service URL (e.g.,
https://openmindwell-backend.onrender.com) - Update frontend env vars with this URL
- Copy service URL (e.g.,
-
New Web Service:
- Runtime: Docker
- Dockerfile Path:
backend/Dockerfile - Docker Build Context:
backend
-
Build Command: (Leave blank, Dockerfile handles it)
-
Start Command: (Leave blank, Dockerfile has
CMD)
-
New Project:
- railway.app/new
- Select "Deploy from GitHub repo"
-
Settings:
- Root directory:
backend - Builder: Dockerfile
- Root directory:
-
Variables:
- Add all from
backend/.env - Railway auto-generates
PORT
- Add all from
-
Deploy:
- Click "Deploy Now"
- Get public URL
- Frontend loads without errors
- Backend health check passes (
/health) - CORS is configured (frontend can call backend)
- WebSocket connects (
wss://URL) - Database queries work (check Supabase logs)
- Crisis detection triggers (test with keyword)
- Anonymous sign-in works
- Environment variables are set correctly
Frontend won't load:
- Check Vercel logs: Deployments → Click deployment → "Building"
- Verify
VITE_*env vars are set - Ensure
vite.config.tshas correct settings
Backend 500 errors:
- Check Render logs: Service → Logs tab
- Verify Supabase credentials are correct
- Test database connection in Supabase dashboard
- Check
schema.sqlwas applied
WebSocket won't connect:
- Ensure
wss://(notws://) for production - Check backend allows WebSocket upgrades
- Verify CORS allows frontend origin
CORS errors:
- Check
FRONTEND_URLin backend env vars - Ensure it matches Vercel domain exactly
- Include
https://protocol
OpenMindWell uses PostgreSQL Row Level Security to ensure data privacy:
Profiles:
- Users can only read/update their own profile
- Enforced by:
auth.uid() = user_id
Journal Entries:
- Completely private - only visible to entry owner
- No admin access
- Enforced by:
auth.uid() = user_id
Messages:
- Visible to all users in the same room
- Enforced by:
room_id IN (SELECT id FROM rooms)
Habits & Habit Logs:
- Users can only see/edit their own habits
- Enforced by:
auth.uid() = user_id
Resources:
- Public read access for all users
- Only admins can insert/update
Reports:
- Users can create reports
- Only moderators can view all reports
- User clicks "Get Started"
- Frontend calls
supabase.auth.signInAnonymously() - Supabase creates anonymous session (JWT token)
- Frontend receives session with
access_token - All API calls include:
Authorization: Bearer <access_token> - Backend validates JWT using Supabase public key
- Backend extracts
user_idfrom token claims - Database RLS policies enforce access based on
auth.uid()
- Anonymous: No personal data (email, phone, real name)
- Pseudonymous: Users choose a nickname + emoji avatar
- Session-based: If user clears browser data, they lose access (by design for privacy)
- Messages are analyzed for crisis keywords/emotions
- No data is sent to third parties except HuggingFace (temporary processing)
- HuggingFace does NOT store messages
- Risk levels are stored in database for moderation only
- Messages: Kept indefinitely (for moderation/context)
- Journal Entries: Kept until user deletes
- Accounts: Anonymous accounts are permanent (no deletion flow yet)
- Logs: Backend logs rotate after 7 days (Render/Railway default)
- All moderators should complete training (TODO: create guide)
- Review flagged messages within 24 hours
- Escalate critical risk messages to platform admins
- Never share user data outside platform
- Ban users only for severe violations (spam, abuse, illegal content)
- SQL Injection: Mitigated by parameterized queries via Supabase client
- XSS: Mitigated by React's auto-escaping
- CSRF: Mitigated by SameSite cookies + JWT
- Rate Limiting: Implemented in backend (100 req/15min per IP)
- DDoS: Mitigated by Vercel/Render infrastructure
We are committed to:
- Respectful and inclusive communication
- Constructive feedback
- Prioritizing user safety and privacy
- Transparency in decision-making
Zero tolerance for:
- Harassment, hate speech, or discrimination
- Sharing private user data
- Malicious code or security exploits
- Spam or off-topic content
Reporting: Email support@zenyukti.in
- GitHub Discussions: Ask questions, share ideas
- Email: support@zenyukti.in
- Discord: https://go.zenyukti.in/discord
- Anonymous authentication
- Basic chat rooms
- AI crisis detection
- Private journaling
- Habit tracking
- Resource library
- Moderation system
- Deployment configs
- Real-time chat UI (WebSocket client)
- Notification system (new messages, mentions)
- User profiles (bio, status)
- Direct messaging (1-on-1)
- Emoji reactions on messages
- Dark mode toggle
- Mobile-responsive improvements
- Guided meditation audio
- Breathing exercise timer
- Mood tracking visualizations
- Habit streak leaderboard (opt-in)
- Volunteer application flow
- Peer support badge system
- Weekly wellness challenges
- Internationalization (Spanish, French, Hindi, etc.)
- Mobile apps (React Native)
- Advanced moderation (auto-ban repeat offenders)
- Analytics dashboard (aggregate stats)
- Professional referral network
- Integration with external crisis lines
- Offline mode (PWA)
- AI therapy chatbot (ethical, limited scope)
- Video/audio chat rooms
- Support groups with facilitators
- Research partnerships (anonymized data)
- Fundraising for free tier expansion
- Certification program for moderators
- In Crisis? Call 988 (US) or visit findahelpline.com
- Technical Issues: GitHub Issues
- General Questions: support@openmindwell.org (TODO)
Ethical Use Clause:
While this software is open-source, we ask that derivative works:
- Maintain prominent mental health crisis disclaimers
- Do NOT claim to provide professional medical services
- Respect user privacy and anonymity
- Contribute improvements back to the community
- Supabase - For generous free tier and excellent DX
- HuggingFace - For democratizing AI/ML access
- Vercel - For seamless Next.js hosting
- Render/Railway - For free backend hosting
- Mental health advocates - For inspiration and guidance
- Open-source community - For tools and support
- NAMI (National Alliance on Mental Illness): nami.org
- Mental Health America: mhanational.org
- Crisis Text Line: crisistextline.org
- Next.js Docs: nextjs.org/docs
- Supabase Docs: supabase.com/docs
- TypeScript Handbook: typescriptlang.org/docs
- 7 Cups: 7cups.com (peer support chat)
- TalkLife: talklife.com (anonymous community)
- Wysa: wysa.io (AI chatbot)
Last Updated: November 23, 2024
Version: 1.0.0
Maintainers: OpenMindWell Core Team
Built with 💙 by people who care about mental wellness
Remember: It's okay to not be okay. Seeking help is a sign of strength.