Skip to content

DaringSVM20/student-analytics-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Analytics Dashboard API

A full-stack web application for uploading student grade data (CSV) and performing automated analytics — averages, trends, per-student breakdowns, class rankings, and linear regression predictions.


Technologies Used

Backend

  • Python, FastAPI, Uvicorn
  • SQLAlchemy (async), asyncpg
  • PostgreSQL (JSONB storage)
  • Pandas, NumPy, scikit-learn
  • Pydantic, python-dotenv

Frontend

  • React (Vite)
  • Recharts
  • Axios

Setup & Installation

Prerequisites

  • Python 3.12+
  • Node.js
  • PostgreSQL

Clone the repo

git clone https://github.com/DaringSVM20/student-analytics-dashboard.git
cd student-analytics-dashboard

Sample Data

A sample dataset is included at the root of the repo. Use test_data.csv to test the upload and analytics features immediately after setup.

Backend

cd backend
python -m venv venv
venv\Scripts\Activate.ps1
pip install -r requirements.txt

Create a .env file in backend/:

DATABASE_URL=postgresql+asyncpg://postgres:YOUR_PASSWORD@127.0.0.1:5432/student_analytics

Create the database:

psql -U postgres -c "CREATE DATABASE student_analytics;"

Run the backend:

uvicorn main:app --reload

API at http://127.0.0.1:8000 — Swagger docs at http://127.0.0.1:8000/docs.

Frontend

cd frontend
npm install
npm run dev

Frontend at http://localhost:5173.


Project Structure

student-analytics/
├── backend/
│   ├── main.py              # FastAPI app, CORS, lifespan
│   ├── database.py          # Async SQLAlchemy engine and session
│   ├── models.py            # Dataset DB model
│   ├── schemas.py           # Pydantic request/response schemas
│   ├── test_data.csv        # Sample dataset for testing
│   ├── routers/
│   │   └── datasets.py      # All API endpoints
│   └── services/
│       └── analytics.py     # Averages, trends, predictions, rankings
└── frontend/
    └── src/
        ├── App.jsx
        ├── components/
        │   ├── UploadDataset.jsx
        │   ├── DatasetList.jsx
        │   └── AnalyticsDashboard.jsx
        └── services/
            └── api.js

Preview of Dashboard

frontend.-.Google.Chrome.2026-06-12.21-45-57.mp4

What I Learned

  • Setting up an async Python backend with FastAPI and SQLAlchemy
  • Connecting to PostgreSQL via asyncpg and handling Windows-specific quirks (127.0.0.1 vs localhost, URL-encoding special characters in passwords)
  • Storing flexible CSV data as JSONB in PostgreSQL without rigid schemas
  • Using Pandas for data processing and scikit-learn for linear regression predictions
  • Building a React frontend with Recharts for bar, line, and radar visualizations
  • FastAPI dependency injection for database sessions
  • Pydantic schemas for separating API response shapes from DB models
  • Managing virtual environments and secrets securely with dotenv

MVP Status & Roadmap

Current MVP — Complete

  • CSV upload and storage
  • Subject averages (bar chart)
  • Score trends across students (line chart)
  • Per-student breakdown with rankings and pass/fail status
  • Student radar profile chart
  • Linear regression predictions per subject
  • Delete datasets

Future Roadmap

  • User authentication and per-user dataset isolation
  • Support for varied CSV formats with auto column mapping
  • Advanced ML models (classification, clustering)
  • Export analytics as PDF
  • Real-time data updates
  • LMS integration

About

Full-stack student analytics dashboard — CSV upload, grade analytics, rankings, and ML predictions. Built with FastAPI, PostgreSQL, and React.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages