Skip to content

ahmad-cod/school-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

School Management System

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.


πŸ“‹ Problem Statement

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.


πŸ›  Tech Stack

Backend

  • FastAPI β€” Modern, fast Python web framework
  • PostgreSQL β€” Robust relational database
  • Asyncpg β€” High-performance async PostgreSQL driver
  • Uvicorn β€” ASGI server
  • Pydantic β€” Data validation

Frontend

  • 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

DevOps & Infrastructure

  • Docker β€” Containerization
  • Docker Compose β€” Multi-container orchestration
  • Docker Swarm Stack β€” Production deployment

✨ Features

Dashboard

  • Real-time statistics and key metrics
  • Recent activity feed
  • Class schedule widget
  • Top-performing students

Student Management

  • Add, edit, and delete student records
  • Track enrollment dates and status
  • Parent contact information
  • Automatic student-to-class assignment

Teacher Management

  • Manage teacher profiles and contact info
  • Track subject assignments
  • Monitor employment status

Classes

  • Create and manage class sections
  • Assign teachers to classes
  • Track class capacity and enrollment

Grades & Academic Performance

  • Record student grades by subject and term
  • Automatic letter grade calculation
  • Multiple exam types (End of Term, Midterms, etc.)
  • Grade tracking by term

Fee Management

  • Track student fees per term
  • Monitor payment status (Unpaid, Partial, Paid)
  • Calculate remaining balance
  • Record payment methods and dates

Additional Features

  • Notifications system
  • Messaging platform
  • Attendance tracking
  • Schedule management
  • Reports generation
  • User settings

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose installed
  • Git
  • PostgreSQL credentials (for local development)

1. Clone the Repository

git clone https://github.com/ahmad-cod/school-management-system.git
cd school-management-system

2. Configure Environment Variables

Create a .env file in the project root: Duplicate the template file to create your local environment config:

cp .env.example .env

Edit the .env file with your local settings.

3. Start with Docker Compose

docker-compose up --build

This will:

4. Access the Application

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

5. Login & Explore

The system comes pre-seeded with sample data for classes, teachers, students, and grades. Start managing your school!


πŸ“ Project Structure

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

πŸ”§ Development

Backend Development

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 8000

Frontend Development

cd frontend
npm install
npm run dev

Open http://localhost:3000 in your browser.


πŸ“Š API Endpoints

Students

  • GET /students β€” List all students
  • POST /students β€” Create new student
  • GET /students/{id} β€” Get student details
  • PUT /students/{id} β€” Update student
  • DELETE /students/{id} β€” Delete student

Teachers

  • GET /teachers β€” List all teachers
  • POST /teachers β€” Create new teacher
  • GET /teachers/{id} β€” Get teacher details
  • PUT /teachers/{id} β€” Update teacher
  • DELETE /teachers/{id} β€” Delete teacher

Classes

  • GET /classes β€” List all classes
  • POST /classes β€” Create new class
  • GET /classes/{id} β€” Get class details
  • PUT /classes/{id} β€” Update class
  • DELETE /classes/{id} β€” Delete class

Full API documentation available at http://localhost:8000/docs


πŸš€ Deployment

Production with Docker Swarm

docker stack deploy -c docker-stack.yml school_system

Load Testing

pip install locust
locust -f locustfile.py --host=http://localhost:8000

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“§ Support

For issues, suggestions, or questions, please open an issue on GitHub or contact the development team.


Built with ❀️ for efficient school management

About

πŸŽ“ High-performance School ERP. FastAPI (Async-first) + React + PostgreSQL. Features connection pooling, normalized relational mapping, and Docker-ready architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors