MindSprint is a comprehensive wellness tracking application that combines AI-powered chat assistance with detailed mood, energy, stress, and wellness monitoring. Built with React, Node.js, and MongoDB, it provides users with personalized insights and data-driven wellness reports.
MindSprint is designed to help users track their daily wellness metrics, engage with AI-powered mental health assistance, and generate comprehensive reports for better self-awareness and wellness management.
https://www.loom.com/share/17497cae5c9943e59b2455a951ec2c0f?sid=4935b816-a64b-4e13-b853-f21a8bc759c4
- Daily Wellness Tracking: Comprehensive mood, energy, stress, and wellness scoring system
- AI Chat Assistant: Powered by Google Gemini API for personalized mental health support
- Interactive Calendar: Visual representation of wellness data with mood indicators
- PDF Report Generation: Detailed monthly wellness reports with statistics and insights
- User Authentication: Secure MongoDB-based authentication system
- Responsive Design: Mobile-first design with modern UI/UX
Frontend:
- React 18 with Vite
- Tailwind CSS for styling
- Spline for 3D interactive backgrounds
- React Icons for UI elements
Backend:
- Node.js with Express.js
- MongoDB for data storage
- JWT for authentication
- Bcrypt for password hashing
AI Integration:
- Google Gemini API for chat responses
- Dynamic system prompts based on user mood and context
MindSprint/
├── src/
│ ├── components/
│ │ ├── Navbar.jsx # Navigation component
│ │ ├── chat.jsx # AI chat interface
│ │ ├── wellness.jsx # Wellness tracking page
│ │ ├── mindfullness.jsx # Mindfulness activities
│ │ ├── Profile.jsx # User profile and statistics
│ │ ├── TrackingForm.jsx # Daily wellness form
│ │ ├── CalendarWidget.jsx # Calendar visualization
│ │ └── backend.jsx # AI chat backend logic
│ ├── App.jsx # Main application component
│ ├── Login.jsx # Authentication component
│ └── main.jsx # Application entry point
├── backend/
│ └── server.js # Express server and API endpoints
├── public/ # Static assets
└── package.json # Dependencies and scripts
- Node.js (v18 or higher)
- MongoDB (local or cloud instance)
- Google Gemini API key
Create a .env file in the root directory with the following variables:
# Database
MONGODB_URI=mongodb://localhost:27017/mindsprint
# or for MongoDB Atlas: mongodb+srv://username:password@cluster.mongodb.net/mindsprint
# Authentication
JWT_SECRET=your-super-secret-jwt-key
# API Configuration
PORT=5000
FRONTEND_URL=http://localhost:5173
# AI Integration
VITE_GEMINI_API_KEY=your-gemini-api-key-
Clone the repository
git clone <repository-url> cd MindSprint
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start the development servers
# Start both frontend and backend npm run dev:full # Or start individually npm run dev # Frontend only npm run backend:dev # Backend only
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- Sign Up: Create a new account with email and password
- Login: Access your personalized dashboard
- Profile Management: Update personal information and view statistics
- Navigate to Wellness: Click on the Wellness section
- Track Daily Data: Click "Track Daily Wellness" button
- Fill the Form:
- Select your mood (Very Happy to Very Sad)
- Rate energy level (1-10)
- Rate stress level (1-10)
- Rate overall wellness (1-10)
- Select daily activities
- Add sleep hours and notes
- Save Data: Click "Save Data" to store your information
- Access Chat: Click the floating chat button or AI Chat in navigation
- Start Conversation: Ask questions about mental health, wellness, or general support
- Personalized Responses: AI adapts responses based on your mood and context
- Close Chat: Use the close button to minimize the chat interface
- View Calendar: Go to Profile > Calendar tab
- Navigate Months: Use arrow buttons to browse different months
- View Details: Click on any tracked day to see detailed information
- Generate Reports: Click "PDF Report" to create monthly wellness reports
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profile
POST /api/tracking/submit- Submit daily tracking dataGET /api/tracking/data- Get tracking data for date rangeGET /api/tracking/calendar- Get calendar data (last 30 days)GET /api/tracking/statistics- Get comprehensive statisticsPOST /api/tracking/dummy-data- Add test data for development
GET /api/health- Server status check
{
name: String,
email: String (unique),
password: String (hashed),
createdAt: Date
}{
userId: ObjectId,
date: Date,
mood: String (enum: very_happy, happy, neutral, sad, very_sad),
moodScore: Number (1-10),
energy: Number (1-10),
stress: Number (1-10),
wellness: Number (1-10),
notes: String,
activities: [String],
sleepHours: Number,
createdAt: Date
}npm run dev- Start frontend development servernpm run backend- Start backend servernpm run backend:dev- Start backend with nodemonnpm run dev:full- Start both frontend and backend concurrentlynpm run build- Build for production
The application follows a component-based architecture with clear separation of concerns:
- Components: Reusable UI components with props-based communication
- Backend: RESTful API with Express.js and MongoDB
- State Management: React hooks for local state management
- Styling: Tailwind CSS with custom components
For testing the application:
- Add Test Data: Use the "Add Test Data" button in Profile > Settings
- Test Tracking: Submit wellness data for different dates
- Test Reports: Generate PDF reports with sample data
- Test Chat: Interact with the AI assistant
- Password Hashing: Bcrypt for secure password storage
- JWT Authentication: Token-based authentication system
- CORS Configuration: Proper cross-origin resource sharing
- Input Validation: Server-side validation for all inputs
- Environment Variables: Sensitive data stored in environment variables
- Lazy Loading: Components loaded on demand
- Efficient Queries: Optimized MongoDB queries with proper indexing
- Caching: Browser caching for static assets
- Responsive Design: Mobile-first approach for optimal performance
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please refer to the documentation or create an issue in the repository.



