A web application that collects student stress assessment responses from a Google Form, analyzes stress levels, and provides personalized support through an AI chatbot, mood-based music therapy, and curated articles.
- Frontend: React + Vite
- Backend: Java Spring Boot
- Database: MongoDB Atlas
- AI Chatbot: Google Gemini API
- Music: Freesound API
- Data Source: Google Sheets (via Google Sheets API)
- Student stress level assessment (synced from Google Sheets)
- AI-powered chatbot for mental health support
- Mood-based music recommendations
- Curated wellness articles
- Admin dashboard for monitoring student data
- Java 17+ (ensure
JAVA_HOMEis set) - Node.js v16+
- MongoDB Atlas account
- Google Cloud service account with Sheets API access
- Gemini API key
- Freesound API key
Before running the backend, copy the example config and fill in your credentials:
cp backend/src/main/resources/application.properties.example backend/src/main/resources/application.propertiesEdit application.properties with your actual values. Also create a .env file in the backend/ directory with:
FREESOUND_API_KEY=your_freesound_api_key
Place your Google service account JSON key file in the backend/ directory.
You will need two terminal windows.
cd backend
.\run.ps1Alternatively, if Maven is installed:
mvn spring-boot:run
- Server runs on:
http://localhost:5000
cd frontend
npm install
npm run dev- App runs on:
http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/sync-responses |
Sync data from Google Sheets to MongoDB |
| POST | /api/chat |
Send a message to the AI chatbot |
| GET | /api/user-data?email= |
Get stress data for a user |
| GET | /api/music?stressLevel= |
Get music recommendations |
| GET | /api/articles |
Get wellness articles |
| POST | /api/insights |
Get AI-generated insights for a user |
| GET | /api/chat-history?email= |
Get chat history for a user |