DEV Community

TOQEER AHMED
TOQEER AHMED

Posted on

Building a Self-Hosted School Management System with Python, Flask, and MySQL

Schools and training academies often struggle between expensive monthly SaaS subscriptions and messy manual spreadsheets. To solve this, I built and open-sourced a complete, lightweight School Management System (ERP) using Python (Flask) and MySQL/MariaDB.

It is designed to run smoothly both on a local school network (LAN via XAMPP) and in the cloud using Docker.

πŸ”— GitHub Repository: ://github.com


πŸ“Έ Dashboard Preview

Administrator Dashboard

Teacher Dashboard


✨ Key Architecture & Features

  1. Five Isolated Role-Based Portals:
    Strict permission checks ensure Admins, Teachers, Students, Parents, and Staff only see records scoped to their own classes, children, or assigned duties.

  2. Smart Attendance with Timed 6-Digit Codes:
    Teachers can launch a live attendance session generating a time-limited 6-digit code with live polling, or perform a direct manual roll call. Attendance reports export cleanly to CSV and PDF.

  3. Fee Invoicing & Audit-Safe Finance:
    Supports recurring monthly tuition, one-time exam fees, partial cash payments, payment reference verification, and printable sequential receipts. Voided receipts preserve full audit history rather than deleting financial records.

  4. Conflict-Free Timetables & Assignments:
    Prevents overlapping class or teacher schedules automatically and allows teachers to upload class-scoped learning materials (PDF, DOCX, PPTX, XLSX, images) stored securely outside the public static directory.

  5. Custom Academy Branding & Offline-First Assets:
    Administrators can upload an academy logo, auto-sample theme colors, toggle dark mode, and download/restore database backupsβ€”all without relying on external runtime CDNs.


πŸš€ Quick Start (Docker or Local)

You can spin up the entire stack with Docker Compose in seconds:

git clone https://://github.com.git
cd school-management-system
cp .env.example .env
docker compose up --build -d
docker compose exec app python seed.py
Enter fullscreen mode Exit fullscreen mode

🀝 Feedback & Contributions

The project is licensed under the MIT License and includes a full pytest suite running via GitHub Actions.

If you find this project helpful or plan to use it for an academy, please consider giving it a ⭐ Star on GitHub:
πŸ‘‰ https://://github.com

I would love to hear your thoughts or feature suggestions in the comments!

Top comments (0)