A comprehensive, secure, real-time, role-based School Management System built with modern web technologies.
- Students: View attendance, fees, e-content, timetable, apply for leave, receive notifications
- Teachers: Manage classes, take attendance, upload content, post notices
- Principals: View school-wide reports, approve policies, monitor activities
- Admins: Full CRUD operations, user management, system configuration
- Non-teaching Staff: Specialized modules for transport, library, sports, finance
- Real-time Notifications: Socket.IO powered instant notifications
- Email Alerts: Automated email notifications using Nodemailer
- File Management: Secure file upload and management
- Attendance Tracking: Comprehensive attendance management
- Content Management: E-learning content upload and streaming
- Leave Management: Digital leave application and approval system
- Fee Management: Track and manage student fees
- Timetable Management: Dynamic class scheduling
- Node.js (LTS) + Express.js
- MongoDB (Atlas) + Mongoose ODM
- Socket.IO for real-time communication
- JWT for authentication with refresh tokens
- bcryptjs for password hashing
- Nodemailer for email services
- Multer for file uploads
- Express Rate Limit for API protection
- React 18 with Vite
- React Router for navigation
- Tailwind CSS for styling
- React Query for state management
- React Hook Form for form handling
- Socket.IO Client for real-time features
- Axios for API calls
- JWT access & refresh tokens
- Role-based middleware
- Input validation & sanitization
- Rate limiting
- Helmet.js security headers
- File upload restrictions
- CORS configuration
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- Git
git clone <repository-url>
cd school-management-systemcd backend
npm install
# Configure environment variables
cp .env.example .env
# Edit .env with your configuration
# Start development server
npm run devcd frontend
npm install
# Configure environment variables
cp .env.example .env
# Edit .env with your API URL
# Start development server
npm run dev# Install concurrently for running both servers
npm install
# Run both backend and frontend
npm run devNODE_ENV=development
PORT=5000
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/school_management
JWT_SECRET=your_super_secret_jwt_key_here
JWT_REFRESH_SECRET=your_refresh_token_secret_here
JWT_EXPIRE=15m
JWT_REFRESH_EXPIRE=7d
# Email Configuration
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
FROM_EMAIL=noreply@schoolmanagement.com
FROM_NAME=School Management System
# File Upload
MAX_FILE_SIZE=10485760
UPLOAD_PATH=./uploadsVITE_API_URL=http://localhost:5000/api- Create new web service
- Connect your repository
- Set environment variables
- Deploy
- Connect your repository
- Set build command:
npm run build - Set publish directory:
dist - Set environment variables
- Deploy
- Create MongoDB Atlas cluster
- Configure network access
- Create database user
- Get connection string
Admin: admin@school.com / password123
Teacher: teacher@school.com / password123
Student: student@school.com / password123
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/refresh- Refresh tokenGET /api/auth/profile- Get user profile
GET /api/students/dashboard- Student dashboardGET /api/students/attendance- Attendance recordsGET /api/students/content- Learning contentPOST /api/students/leave- Apply for leave
GET /api/teachers/dashboard- Teacher dashboardGET /api/teachers/students- Assigned studentsPOST /api/teachers/attendance- Mark attendancePOST /api/teachers/content- Upload content
GET /api/admin/dashboard- Admin dashboardGET /api/admin/users- User managementPOST /api/admin/users- Create userGET /api/admin/classes- Class management
- Authentication: JWT with refresh tokens
- Authorization: Role-based access control
- Input Validation: Express-validator
- Rate Limiting: Prevent API abuse
- File Upload Security: Type and size restrictions
- Password Hashing: bcryptjs with salt rounds
- CORS: Configured for specific origins
- Security Headers: Helmet.js implementation
- Live Notifications: Instant alerts for all users
- Socket Authentication: Secure WebSocket connections
- Room-based Communication: Class and role-specific channels
- Real-time Updates: Live data synchronization
cd backend
npm testcd frontend
npm test- Database Indexing: Optimized MongoDB queries
- Caching: Redis integration (optional)
- Compression: Gzip compression enabled
- Image Optimization: File size limits and validation
- Code Splitting: React lazy loading
- Bundle Optimization: Vite build optimization
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
For support, email gauravraaz2005@gmail.com or create an issue in the repository.
- React team for the amazing framework
- MongoDB team for the database
- Socket.IO team for real-time capabilities
- Tailwind CSS team for the utility-first CSS framework
- All contributors and testers