A full Python web app using Flask and SQLite. Same features as before: teacher and student dashboards, students, tasks, complaints with replies, and attendance flow charts.
-
Create a virtual environment (recommended):
python -m venv venv venv\Scripts\activate # Windows # or: source venv/bin/activate # macOS/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Run the app:
python app.py
-
Open http://127.0.0.1:5000 in your browser.
- nixpacks.toml and railway.toml in the repo tell Railway to run:
python -m gunicorn -w 1 -b 0.0.0.0:$PORT app:app
so the app uses a production server (no dev-server warning). - If you still see the Flask dev-server warning, set the Start Command in Railway yourself:
Project → your service → Settings → Deploy → Start Command → set to:
python -m gunicorn -w 1 -b 0.0.0.0:$PORT app:app
then redeploy. - Local runs are unchanged:
python app.pystill uses the dev server on port 5000.
- Login / Signup – Teacher accounts; student accounts are created by teachers when adding a student (optional email/password).
- Teacher dashboard – Total students, pending tasks, low attendance count, open complaints, attendance flow chart, student/task management, complaint replies.
- Student dashboard – Own attendance flow, tasks (mark complete), submit complaints, view teacher replies.
- Data – Stored in
school.db(SQLite) in the project folder. Delete this file to reset all data.
app.py # Flask app, routes, database
requirements.txt # Flask + gunicorn
railway.toml # Railway start command (python -m gunicorn ...)
nixpacks.toml # Nixpacks start command
Procfile # Same for Heroku-style platforms
static/
styles.css # UI styles
templates/
index.html # Login
signup.html # Teacher signup
dashboard.html # Teacher dashboard
student.html # Student dashboard
school.db # Created on first run (SQLite, not in git)