A modern, full-stack school management platform built with FastAPI and Next.js. Designed to streamline administrative tasks, manage student records, track grades, and handle school fees efficiently.
Schools often struggle with:
- Fragmented data management across multiple systems
- Manual record keeping prone to errors
- Inefficient communication between staff and parents
- Complex billing and fee tracking
- Limited real-time insights into student performance
This system provides a centralized, web-based platform that consolidates teachers, students, classes, grades, and fees management into one intuitive interface.
- FastAPI β Modern, fast Python web framework
- PostgreSQL β Robust relational database
- Asyncpg β High-performance async PostgreSQL driver
- Uvicorn β ASGI server
- Pydantic β Data validation
- Next.js 16 β React framework with TypeScript
- React Hook Form β Efficient form state management
- Radix UI β Unstyled, accessible UI components
- Tailwind CSS β Utility-first CSS framework
- ESLint β Code quality
- Docker β Containerization
- Docker Compose β Multi-container orchestration
- Docker Swarm Stack β Production deployment
- Real-time statistics and key metrics
- Recent activity feed
- Class schedule widget
- Top-performing students
- Add, edit, and delete student records
- Track enrollment dates and status
- Parent contact information
- Automatic student-to-class assignment
- Manage teacher profiles and contact info
- Track subject assignments
- Monitor employment status
- Create and manage class sections
- Assign teachers to classes
- Track class capacity and enrollment
- Record student grades by subject and term
- Automatic letter grade calculation
- Multiple exam types (End of Term, Midterms, etc.)
- Grade tracking by term
- Track student fees per term
- Monitor payment status (Unpaid, Partial, Paid)
- Calculate remaining balance
- Record payment methods and dates
- Notifications system
- Messaging platform
- Attendance tracking
- Schedule management
- Reports generation
- User settings
- Docker & Docker Compose installed
- Git
- PostgreSQL credentials (for local development)
git clone https://github.com/ahmad-cod/school-management-system.git
cd school-management-systemCreate a .env file in the project root:
Duplicate the template file to create your local environment config:
cp .env.example .envEdit the .env file with your local settings.
docker-compose up --buildThis will:
- Build and start the PostgreSQL database
- Initialize the database schema and seed data
- Build and start the FastAPI backend (http://localhost:8000)
- Build and start the Next.js frontend (http://localhost:3000)
| Component | URL | Purpose |
|---|---|---|
| Frontend | http://localhost:3000 | Main web interface |
| API | http://localhost:8000 | REST API endpoints |
| API Docs | http://localhost:8000/docs | Interactive Swagger UI |
| Alternative Docs | http://localhost:8000/redoc | ReDoc documentation |
The system comes pre-seeded with sample data for classes, teachers, students, and grades. Start managing your school!
school-management-system/
βββ backend/ # FastAPI application
β βββ app/
β β βββ main.py # FastAPI app setup & routes
β β βββ db.py # Database connection pool
β β βββ models.py # Pydantic models
β β βββ routers/ # API endpoint groups
β β βββ students.py
β β βββ teachers.py
β β βββ classes.py
β βββ requirements.txt # Python dependencies
β βββ Dockerfile
β
βββ frontend/ # Next.js application
β βββ app/ # App directory (routing)
β β βββ page.tsx # Dashboard
β β βββ students/
β β βββ teachers/
β β βββ classes/
β β βββ grades/
β β βββ fees/
β β βββ schedule/
β β βββ notifications/
β β βββ [other pages]/
β βββ components/ # React components
β β βββ dashboard/ # Dashboard components
β β βββ ui/ # Reusable UI components
β βββ services/ # API client services
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities
β βββ package.json
β βββ Dockerfile
β
βββ db/ # Database scripts
β βββ schema.sql # Database schema
β βββ seed.sql # Sample data
β βββ init.sql # Initialization
β βββ queries.sql # Common queries
β
βββ docker-compose.yml # Local dev orchestration
βββ docker-stack.yml # Production swarm config
βββ locustfile.py # Load testing
βββ README.md # This file
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm install
npm run devOpen http://localhost:3000 in your browser.
GET /studentsβ List all studentsPOST /studentsβ Create new studentGET /students/{id}β Get student detailsPUT /students/{id}β Update studentDELETE /students/{id}β Delete student
GET /teachersβ List all teachersPOST /teachersβ Create new teacherGET /teachers/{id}β Get teacher detailsPUT /teachers/{id}β Update teacherDELETE /teachers/{id}β Delete teacher
GET /classesβ List all classesPOST /classesβ Create new classGET /classes/{id}β Get class detailsPUT /classes/{id}β Update classDELETE /classes/{id}β Delete class
Full API documentation available at http://localhost:8000/docs
docker stack deploy -c docker-stack.yml school_systempip install locust
locust -f locustfile.py --host=http://localhost:8000- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, suggestions, or questions, please open an issue on GitHub or contact the development team.
Built with β€οΈ for efficient school management