A comprehensive university management system built with Node.js, Express, MongoDB, and modern web technologies.
- Student registration and admission system
 - Automatic admission letter generation with PDF export
 - Student portal with course registration
 - Unit registration and fee management
 - Graduation and attachment applications
 
- HOD (Head of Department) dashboard
 - Trainer management and assignment
 - Course and unit management
 - Student assignment and monitoring
 
- Forgot password system with OTP and email reset links
 - Professional email templates
 - Notification system
 - Student portal access instructions
 
- Professional admission letters with institute branding
 - PDF export functionality
 - Print-ready documents
 - Portal login credentials included
 
- Full dark mode support
 - Mobile responsive design
 - Professional dashboards
 - Real-time analytics
 
- Node.js (v14 or higher)
 - MongoDB (installed and running)
 - MongoDB Compass (optional, for database management)
 - Git
 
- Clone the repository:
 
git clone https://github.com/Techtoxic/ums.git
cd ums- Install dependencies:
 
npm install- Create environment file:
Create a 
.envfile in the root directory with the following content: 
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/university_management
# Email Configuration (Gmail)
EMAIL_USER=your_email@gmail.com
EMAIL_APP_PASSWORD=your_app_password
# Server Configuration
PORT=5502
NODE_ENV=development- 
Email Setup (Important!):
- Use a Gmail account for sending emails
 - Enable 2-Factor Authentication on your Gmail
 - Generate an App Password: Google Account > Security > 2-Step Verification > App passwords
 - Use the 16-character app password (not your regular password)
 
 - 
Start MongoDB:
- Ensure MongoDB service is running
 - Default connection: 
mongodb://localhost:27017 
 - 
Run the application:
 
node server.js- Access the system:
- Main URL: 
http://localhost:5502 - Student/Trainer Login: 
http://localhost:5502/login - HOD Login: 
http://localhost:5502/hod/login - Registrar Dashboard: 
http://localhost:5502/src/components/registrar/RegistrarDashboardNew.html 
 - Main URL: 
 
- Node.js & Express.js - Server framework
 - MongoDB with Mongoose - Database and ODM
 - Nodemailer - Email service
 - Bcrypt.js - Password hashing
 - Multer - File uploads
 
- HTML5 & CSS3 - Structure and styling
 - Tailwind CSS - Utility-first CSS framework
 - JavaScript (ES6+) - Client-side functionality
 - Chart.js - Analytics and charts
 - html2pdf.js - PDF generation
 
- Students, Trainers, HODs
 - Courses, Units, Unit Registrations
 - Password Resets, Notifications
 - Tools of Trade, Applications
 - System Settings
 
- Automatic generation after student registration
 - Professional template with institute branding
 - Portal access instructions included
 - PDF export and print functionality
 - Dark mode compatibility
 
- Dual method: OTP via email OR reset link
 - Secure token generation with expiration
 - Rate limiting protection
 - Works for all user types: Students, Trainers, HODs
 
- Students: Admission number as username, phone as initial password
 - Trainers: Staff ID as username
 - HODs: Email as username
 - Password change required on first login
 
- 
MongoDB Connection Error:
- Ensure MongoDB service is running
 - Check connection string in 
.env - Verify MongoDB is accessible on port 27017
 
 - 
Email Not Sending:
- Verify Gmail credentials in 
.env - Use App Password, not regular password
 - Check Gmail 2FA is enabled
 
 - Verify Gmail credentials in 
 - 
Port Already in Use:
- Change PORT in 
.envfile - Or kill process using port 5502
 
 - Change PORT in 
 - 
Missing Dependencies:
- Run 
npm installagain - Delete 
node_modulesandpackage-lock.json, then reinstall 
 - Run 
 
The server logs detailed information. Check console output for:
- Database connection status
 - Email service initialization
 - API request logs
 - Error messages
 
- Login with admission number
 - View course information
 - Register for units
 - Check fee status
 - Apply for graduation/attachment
 
- Manage assigned students
 - View course assignments
 - Update student records
 - Access tools of trade
 
- Department overview
 - Trainer management
 - Course approval
 - Student analytics
 
- Student admission
 - Course management
 - System settings
 - Generate reports
 
- Password hashing with bcrypt
 - Rate limiting on sensitive endpoints
 - Session management
 - Input validation and sanitization
 - SQL injection protection
 - CORS configuration
 
Professional email templates included for:
- OTP codes for password reset
 - Reset links for password recovery
 - Welcome emails for new admissions
 - System notifications
 
- β Admission letter auto-generation
 - β PDF export functionality
 - β Complete dark mode support
 - β Forgot password system
 - β Email integration
 - β Mobile responsive design
 - β Professional UI/UX
 
For technical support or questions:
- Check the console logs for errors
 - Verify all environment variables are set
 - Ensure MongoDB and Node.js are properly installed
 - Review this README for setup instructions
 
For production deployment:
- Use MongoDB Atlas for cloud database
 - Configure environment variables for production
 - Set up proper SSL certificates
 - Configure email service with production credentials
 - Set 
NODE_ENV=production 
Happy Coding! π