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

2026-12-04来源 dev.toEnglish
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 

🤝 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!

原文:https://www.a8q9.cn/en/article/building-a-self-hosted-school-management-system-with-python-flask-and-mysql-d26daa.html

相关文章