A small Flask-based School ERP app with core features for class management, students, exams, attendance, fees, and result exports.
static/css/styles.cssschool.db) as the database (auto-initialized)1) Create an isolated virtual environment (optional, but recommended):
python -m venv venv
.\\venv\\Scripts\\Activate.ps1
2) Install dependencies:
python -m pip install -r requirements.txt
3) Run the app:
python app.py
Open http://127.0.0.1:5000 in your browser.
adminadmin123Note: The database will auto-create a default admin user if none exists on first run. Change the password for production.
app.py β Main Flask application and routes.templates/base.html β Common layout (header, navbar, flash messages and content area).static/css/styles.css β Styles extracted from inline HTML for easier customization.school.db β SQLite database (created on first run).requirements.txt β Project dependencies (Flask, Werkzeug, ReportLab)./login β Sign in (run as admin/teacher)./logout β Logout./ β Dashboard (requires login)./classes β View all classes./add_class β (Admin) Add a class./class/<class_id> β View class details (students, subjects, exams)./add_student/<class_id> β Add student to class./add_subject/<class_id> β Add subject to class./exams/<class_id> β Manage exams and weights for a class./enter_marks/<class_id>?exam_id=<exam_id> β Enter marks for a selected exam./result/<student_id> β View individual studentβs result (choose exam_id optionally)./class/<class_id>/results β View class results and export CSV via /class/<class_id>/results/csv?exam_id=<exam_id>./attendance/<class_id> β Take attendance for a class for a specific date./fees β Fees dashboard and management.
/howto β In-app help page describing common workflows and usage (also see HOWTO.md).reportlab (already present in requirements.txt) β if missing, the app will show a flash message and suggest installation.SECRET_KEY is set in app.py (for sessions). Replace it with a secure value for production.school.db by default; change DB_NAME in app.py if you want a different file.templates/base.html and made the routes render content via render_template("base.html", content=content).static/css/styles.css and included it from base.html via url_for('static', filename='css/styles.css').templates/classes.html) and replace content string with Jinja blocks in that file.get_db() and init_db() functions from app.py to a new db_helpers.py and import them back into app.py if you prefer a cleaner module separation.school.db to let the app reinitialize db tables and default admin.reportlab installed. Install with:python -m pip install reportlab
If youβd like the app further refactored (split each route into dedicated Jinja templates, move DB helpers to db_helpers.py, or convert to a package) β tell me what youβd like and Iβll implement it.
Made with π β enjoy managing your school! π
If you need a more powerful solution, I offer a Pro version of this app with advanced features and additional integrations, such as:
All Rights Reserved Β© 2025 Amit Kadam. No part of this software may be copied, distributed, modified, or used in derivative works without written permission. For permission requests
See the full LICENSE file for details.