How sarathi377/mindmate works
MINDMATE is a mental-health support web app: users access browser features, authenticate, chat for AI-generated support, and can track mood or submit feedback. The main backend is an Express/Mongoose application; a separate SQLite server provides an alternative API. Chat history and user state are persisted in MongoDB, while sentiment analysis is delegated to a Python process. The README documents additional journaling, relaxation, reporting, and crisis-support capabilities, but their implementation links are not established by the sampled source.
Main entry points: server.js Express application · chat.js Chat and mood API · app.js Browser client · User.js User records
Components 20
Web experience
- Browser client
public/js/app.js - Authentication UI
public/js/login.js - Chat interface
public/js/chat.js - Mood tracking
public/js/dashboard.js - Wellness tools
public/js/relaxation.js - Journal
public/js/journal.js - Reports
public/js/report.js
Application API
- Express application
server.js - Chat and mood API
src/routes/chat.js
Support services
- Sentiment analysis
src/services/sentimentService.js - Gemini AI
Persistence
- User records
src/models/User.js - Chat messages
src/models/Message.js - Feedback records
src/models/Feedback.js - Mood records
src/models/Mood.js - Progress reports
src/models/Report.js
SQLite alternative
- SQLite API
database/server.js - SQLite database
Other components
- User
- MongoDB
Connections 18
- User → Browser client: uses
README.md - User → Authentication UI: registers or logs in
README.md - User → Chat interface: seeks support
README.md - User → Mood tracking: tracks mood
README.md - User → Wellness tools: uses tools
README.md - User → Journal: journals
README.md - User → Reports: reviews progress
README.md - Express application → Browser client: serves assets
server.js - Express application → Chat and mood API: mounts routes
server.js - Express application → User records: authenticates users
server.js - Express application → Feedback records: stores feedback
server.js - Express application → Chat messages: reads admin logs
server.js - Express application → MongoDB: connects to
server.js - Chat and mood API → Chat messages: reads and writes
src/routes/chat.js - Chat and mood API → User records: updates mood
src/routes/chat.js - Chat and mood API → Sentiment analysis: analyzes text
src/routes/chat.js - Chat and mood API → Gemini AI: generates replies
src/routes/chat.js - SQLite API → SQLite database: reads and writes
database/server.js