Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 Student Wellness Data Analytics

React Vite Node.js Express MongoDB Chart.js

An intelligent, data-driven wellness monitoring and analytics platform designed to help students track, analyze, and improve their daily habits, mental well-being, and overall lifestyle through interactive visual insights and personalized feedback.


2. Overview

Student Wellness Data Analytics is a modern full-stack wellness tracking application that enables students to monitor key lifestyle indicators such as stress levels, sleep patterns, mood, study hours, water intake, physical activity, screen time, and family/social interactions.

Built using React.js (Vite + Tailwind CSS v4) for the frontend and Node.js + Express.js for the backend, the platform transforms raw wellness data into meaningful insights through advanced analytics and interactive visualizations.

The application features a resilient and adaptive data architecture powered by MongoDB with an automatic fallback mechanism to a local JSON database (data.json), ensuring uninterrupted operation even when database connectivity is unavailable.

Using Chart.js, the platform generates dynamic dashboards, trend analyses, behavioral correlations, wellness balance assessments, and a customized Happiness Index that helps students better understand the relationship between their daily habits and overall well-being.


3. Features

📝 Daily Wellness Check (Survey Form)

  • A responsive and user-friendly wellness assessment form designed to capture 8 essential health and lifestyle indicators.
  • Features intuitive emoji-based interactions and validation for:
    • Stress Levels 😰
    • Sleep Duration 😴
    • Physical Activity 🏃
    • Water Intake 💧
    • Study Hours 📚
    • Family Interaction 👨‍👩‍👧
    • Screen Time 💻
    • Mood Tracking 😊

📊 Predictive Recommendations & Feedback

  • Instant analysis of submitted wellness data against recommended healthy benchmarks.
  • Generates intelligent feedback and actionable recommendations.
  • Dynamic color-coded alerts:
    • 🔴 High-risk habit notifications
    • 🟢 Healthy achievement indicators

📈 Interactive Analytics Dashboard

  • Summary Cards: Displays overall averages for stress, sleep, activity, study, family, and water.
  • Mood Distribution: A colorful Pie Chart displaying mood fluctuations (Happy, Neutral, Stressed, Sad).
  • Sleep Distribution: A Doughnut Chart grouping sleep hours into ranges (0-4h, 5-6h, 7-8h, 9+h).
  • Average vs. Recommended Targets: A grouped Bar Chart comparing student behavior directly against standard targets.
  • Stress Level Trend: A smooth, interactive Line Chart outlining stress progression.
  • Sleep vs. Water Intake: An insightful comparative Bar Chart contrasting actual hydration and sleep against optimal levels.
  • Wellness Balance Overview: A comprehensive Radar Chart mapping out average metrics vs. the ideal balance across 6 axes.
  • Correlation Strengths: Analytical Bar Chart showcasing the mathematical correlation strengths between sleep, stress, activity, and study.
  • Happiness Index: A circular Gauge (Doughnut) Chart computing a holistic wellness score based on balanced lifestyle ratios.

🔄 Resilient Database Fallback System

  • Automatically performs data operations using MongoDB when available.
  • Seamlessly falls back to a local JSON database (server/data.json) if MongoDB becomes unavailable.
  • Ensures continuous functionality and zero data collection interruptions.

4. Tech Stack

🎨 Frontend

  • Core: React.js (v18.3.1) & Vite
  • Styling: Tailwind CSS (v4)
  • Routing: React Router DOM (v7)
  • HTTP Client: Axios
  • Visualization: Chart.js & React Chartjs 2

⚙️ Backend

  • Runtime: Node.js & Express.js
  • Database ODM: Mongoose & MongoDB
  • File Database: Node.js native filesystem modules (fs, path) for local JSON fallback
  • Security: Prepared with bcryptjs and jsonwebtoken for future authentication

5. Installation & Running the Project

Prerequisites

Setup Steps

  1. Clone the Repository:
    git clone https://github.com/David-Antony/Student-Wellness-Analytics.git
    cd Student-Wellness-Analytics

Option A: The Quick Start (Single Command - Recommended) 🚀

This method installs dependencies and runs both the frontend and backend concurrently using a single terminal window.

  1. Install All Dependencies: From the root directory, run the following command to install all packages for the root, client, and server:

    npm run install-all
  2. Start Both Frontend & Backend: Launch both servers simultaneously with:

    npm run dev

Option B: Manual Start (Separate Terminals) 💻

If you prefer to run and view logs for the client and server in separate terminal windows, follow these steps:

1. Start the Backend Server

  1. Navigate to the server directory:
    cd server
  2. Install server dependencies:
    npm install
  3. Run the development server (runs on Port 8000):
    npm run dev

2. Start the Frontend Client

  1. Open a new terminal window and navigate to the client directory:
    cd client
  2. Install client dependencies:
    npm install
  3. Run the development client (launches on Port 5173):
    npm run dev

6. Screenshots

Daily Wellness Check Form Personal Analysis
Daily Wellness Check Pearsonal Analysis
Dashboard Personalised Insights
Dashboard Pearsonalised Insights

7. Future Improvements

  • Deployment: Planned to deploy this with massive dataset and for accurate dashboard analytics
  • User Profiles & Secure Authentication: Fully implement JWT and Bcryptjs for secure logins, allowing students to keep their wellness logs private.
  • Custom Date Range Filtering: Add calendar-based filters to analyze trends over a specific week, month, or semester.
  • Report Generation: Provide an option to export weekly wellness summaries as PDF or CSV reports.
  • Goal Tracking & Streaks: Gamify healthy habits by rewarding students with streaks for hitting water, sleep, and exercise goals.
  • Stress Alerts: Email or push notification prompts when sleep dips too low or stress levels remain high for consecutive days.

About

An interactive full-stack MERN wellness tracker and analytics dashboard for students. Logs daily wellness parameters (stress, sleep, hydration, screen time) and renders rich visual analytics, correlation studies, and predictive recommendations with a local JSON file database fallback.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages