An elegant, interactive, and premium mental wellness monorepo built to restore focus, monitor emotional trends, and guide users through cognitive rejuvenation using advanced generative AI.
Below is a visual flow of how the monorepo modules communicate with each other, separating client views, data-persistence layers, and prompt orchestration.
graph TD
%% Styling
classDef client fill:#38b2ac,stroke:#333,stroke-width:2px,color:#fff;
classDef server fill:#4299e1,stroke:#333,stroke-width:2px,color:#fff;
classDef engine fill:#9f7aea,stroke:#333,stroke-width:2px,color:#fff;
classDef db fill:#f6ad55,stroke:#333,stroke-width:2px,color:#fff;
subgraph Client Space [Frontend App]
UI[Vite + React 18 UI]:::client
State[App Store / Query]:::client
UI <--> State
end
subgraph API Space [Backend Monorepo]
API[Express REST API Router]:::server
Auth[JWT Auth Middleware]:::server
API <--> Auth
end
subgraph Intelligence [AI Engine]
Orch[Prompt Orchestrator]:::engine
Detect[Emotion & Crisis Detector]:::engine
Memory[Shaped Conv Memory]:::engine
Orch --> Detect
Orch --> Memory
end
subgraph Storage [Persistence]
JSONDB[(Local JSON Pool)]:::db
PGDB[(PostgreSQL Store)]:::db
end
%% Connections
UI <-->|HTTPS Request / CORS| API
API <-->|Local Json Pool / PG Pool| Storage
API <-->|SDK Call| Orch
Orch <-->|SDK Call| Gemini[Google Gemini API]:::engine
🤖 AI Companion (Emotion-Aware Chat)
Interactive, emotion-aware cognitive guidance powered by Google Gemini. Active sentiment classifiers detect stress triggers and shift context dynamically to guide users through custom grounding exercises like box-breathing.
🌌 Zen Space (Sensory Particle Canvas)
Draw custom paths and manipulate ambient states (Water Ripple, Neon Trails, Sand physics) using an HTML5 Canvas sandbox. Incorporates breathing paces, tranquil sound models, and neon configurations.
⏱️ Focus Timer (Pomodoro Sandbox)
A productivity sandbox featuring customized breakdown schedules generated dynamically by Gemini. Track Pomodoro cycles, session notes, and break structures.
📊 Behavioral Analytics & Logs
Deep emotional insight reports compiled using daily mood logs, focus trends, and Zen effectiveness. Recharts renders mood distributions and tracks daily energy cycles.
👥 Community Safe Space
Share progress milestones, supportive reminders, and kind words anonymously in our positive-feedback community stream.
├── frontend/ # React 18 UI with Vite, Tailwind CSS, TanStack Query, Recharts
│ ├── src/features # Feature modules (Zen Space, AI chat, Focus, Analytics)
│ └── src/state # React context state and query clients
├── backend/ # Node.js/Express REST API with JWT Auth and rate limiting
│ ├── src/routes # REST router mapping (AI, mood logs, community)
│ └── src/db # LocalJsonPool fallback for developer environments
├── ai-engine/ # Prompt orchestration, memory shaping, and crisis safety guards
├── database/ # Seed files & PostgreSQL database schemas
├── deployment/ # Docker configuration & Nginx setup
└── docs/ # Architecture specifications & system design
Follow these steps to spin up the local development environment:
npm installCreate a copy of .env.example in the root and name it .env:
DATABASE_URL=sqlite://../mindease.db
GEMINI_API_KEY=your_gemini_key_here
GEMINI_MODEL=gemini-2.5-flashnpm run dev:backendnpm run dev:frontendOpen http://localhost:5173 in your browser to experience MindEase.
The core ai-engine features active crisis heuristics. Any prompt indicative of self-harm or acute distress bypasses normal LLM parameters to instantly serve helpline info, grounding techniques, and supportive recommendations.
This repository is developed and maintained by:
- beast6713 (Lead Developer)
- nikhil072705 (Contributor)
- jaikarthick136 (Contributor)





