Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

School Management System (SMS) - Deployment Guide

A modern, production-ready School Management System built with FastAPI and React.

🚀 Quick Start

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Python 3.11+ (for local development)
  • PostgreSQL 15+ (for local development)

Option 1: Docker Deployment (Recommended)

  1. Clone the repository
  2. Navigate to the project directory
  3. Start the services:
docker-compose up --build

This will start:

  • PostgreSQL database (port 5432)
  • Redis (port 6379)
  • Backend API (port 8000)
  • Frontend (port 5173)
  • Nginx (port 80)

Option 2: Local Development

Backend Setup

cd sms-backend
pip install -r requirements.txt

# Set environment variables
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_USER=sms_user
export POSTGRES_PASSWORD=sms_password
export POSTGRES_DB=sms_db

# Run the server
uvicorn app.main:app --reload

Frontend Setup

cd sms-frontend
npm install
npm run dev

🌐 Access URLs

🔐 Demo Credentials

Role Email Password
Admin admin@school.com password123
Teacher teacher1@school.com password123
Student student1@school.com password123
Parent parent@school.com password123

📁 Project Structure

sms/
├── sms-backend/           # FastAPI backend
│   ├── app/
│   │   ├── api/           # API routes
│   │   ├── core/          # Config, security, database
│   │   ├── models/        # SQLAlchemy models
│   │   └── schemas/       # Pydantic schemas
│   ├── Dockerfile
│   └── requirements.txt
│
├── sms-frontend/           # React frontend
│   ├── src/
│   │   ├── components/    # React components
│   │   ├── pages/         # Page components
│   │   ├── services/     # API services
│   │   └── context/      # React context
│   ├── Dockerfile
│   └── package.json
│
├── docker-compose.yml     # Docker orchestration
├── nginx.conf            # Nginx configuration
└── SPEC.md              # Technical specification

🔧 Features

Core Modules

  • ✅ User Management (Admin, Teacher, Student, Parent)
  • ✅ Class & Subject Management
  • ✅ Academic Results with GPA calculation
  • ✅ Study Materials (LMS) with file uploads
  • ✅ Assignments & Submissions
  • ✅ Fee Management with payment tracking
  • ✅ Attendance System
  • ✅ Notifications
  • ✅ Parent Portal

AI Features

  • ✅ Student Performance Prediction
  • ✅ Material Recommendations
  • ✅ Teacher Insights & Analytics

Security

  • ✅ JWT Authentication with refresh tokens
  • ✅ Role-based Access Control (RBAC)
  • ✅ Password hashing with bcrypt
  • ✅ File upload validation
  • ✅ Audit logging

🐳 Docker Commands

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop all services
docker-compose down

# Rebuild containers
docker-compose build --no-cache

# Restart a specific service
docker-compose restart backend

🧪 Testing

Run backend tests:

cd sms-backend
pytest

📝 Environment Variables

Backend

Variable Default Description
POSTGRES_HOST localhost Database host
POSTGRES_PORT 5432 Database port
POSTGRES_USER sms_user Database user
POSTGRES_PASSWORD sms_password Database password
POSTGRES_DB sms_db Database name
SECRET_KEY (required) JWT secret key
DEBUG false Debug mode

Frontend

Variable Default Description
VITE_API_URL /api Backend API URL

📄 API Documentation

Once the server is running, visit:

🔨 Production Considerations

  1. Security: Change the SECRET_KEY in production
  2. SSL/TLS: Configure SSL certificates in nginx
  3. Database: Use managed PostgreSQL (e.g., RDS, Cloud SQL)
  4. File Storage: Use S3-compatible storage for production
  5. Monitoring: Add logging and monitoring (e.g., Datadog, Sentry)

📞 Support

For issues and questions, please create a GitHub issue.

📄 License

MIT License

About

A full-featured School Management System that allows teachers to upload results, students to view grades, administrators to manage users and academic records efficiently.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages