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.
Backend
- Python, FastAPI, Uvicorn
- SQLAlchemy (async), asyncpg
- PostgreSQL (JSONB storage)
- Pandas, NumPy, scikit-learn
- Pydantic, python-dotenv
Frontend
- React (Vite)
- Recharts
- Axios
- Python 3.12+
- Node.js
- PostgreSQL
git clone https://github.com/DaringSVM20/student-analytics-dashboard.git
cd student-analytics-dashboardA sample dataset is included at the root of the repo. Use test_data.csv to test the upload and analytics features immediately after setup.
cd backend
python -m venv venv
venv\Scripts\Activate.ps1
pip install -r requirements.txtCreate 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 --reloadAPI at http://127.0.0.1:8000 — Swagger docs at http://127.0.0.1:8000/docs.
cd frontend
npm install
npm run devFrontend at http://localhost:5173.
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
frontend.-.Google.Chrome.2026-06-12.21-45-57.mp4
- 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
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