A modern, production-ready School Management System built with FastAPI and React.
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
- PostgreSQL 15+ (for local development)
- Clone the repository
- Navigate to the project directory
- Start the services:
docker-compose up --buildThis will start:
- PostgreSQL database (port 5432)
- Redis (port 6379)
- Backend API (port 8000)
- Frontend (port 5173)
- Nginx (port 80)
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 --reloadcd sms-frontend
npm install
npm run dev- Frontend: http://localhost
- Backend API: http://localhost/api
- API Docs: http://localhost/api/docs
| Role | Password | |
|---|---|---|
| Admin | admin@school.com | password123 |
| Teacher | teacher1@school.com | password123 |
| Student | student1@school.com | password123 |
| Parent | parent@school.com | password123 |
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
- ✅ 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
- ✅ Student Performance Prediction
- ✅ Material Recommendations
- ✅ Teacher Insights & Analytics
- ✅ JWT Authentication with refresh tokens
- ✅ Role-based Access Control (RBAC)
- ✅ Password hashing with bcrypt
- ✅ File upload validation
- ✅ Audit logging
# 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 backendRun backend tests:
cd sms-backend
pytest| 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 |
| Variable | Default | Description |
|---|---|---|
| VITE_API_URL | /api | Backend API URL |
Once the server is running, visit:
- Swagger UI: http://localhost/api/docs
- ReDoc: http://localhost/api/redoc
- Security: Change the
SECRET_KEYin production - SSL/TLS: Configure SSL certificates in nginx
- Database: Use managed PostgreSQL (e.g., RDS, Cloud SQL)
- File Storage: Use S3-compatible storage for production
- Monitoring: Add logging and monitoring (e.g., Datadog, Sentry)
For issues and questions, please create a GitHub issue.
MIT License