A complete, lightweight, and expandable Student Record Management System built with HTML, CSS, vanilla JavaScript (frontend) and Node.js + Express (backend) with file-based storage.
- Add, edit, and delete students and teachers
- View comprehensive student data (attendance %, marks, fee status)
- Monitor all payment transactions
- Search and filter students by ID, name, branch, year, club, hostel
- Real-time fee summary and statistics
- Mark daily attendance (bulk or individual)
- Add marks per student/subject/term
- Filter students by class (year/branch/section)
- Change password
- View personal profile with all details
- Check attendance history and percentage
- View marks by subject and term
- Monitor fee balance
- Change password
- View child's complete profile
- Monitor attendance and marks
- Check fee status and payment history
- Make fee payments (online/cash/cheque)
- Real-time balance updates
SRMS/
βββ server/
β βββ server.js # Main Express server
β βββ routes/
β β βββ auth.js # Login & password change
β β βββ admin.js # Admin operations
β β βββ teacher.js # Teacher operations
β β βββ student.js # Student data
β β βββ parent.js # Parent operations & payments
β βββ utils/
β β βββ fileOps.js # File I/O operations
β β βββ auth.js # Password hashing (bcrypt)
β βββ data/ # JSONL storage files
β βββ students.txt
β βββ teachers.txt
β βββ attendance.txt
β βββ marks.txt
β βββ payments.txt
βββ public/
β βββ index.html # Single-page application
β βββ css/
β β βββ styles.css # Modern, responsive design
β βββ js/
β βββ landing.js # Role selection & login
β βββ admin.js # Admin dashboard
β βββ teacher.js # Teacher dashboard
β βββ student.js # Student dashboard
β βββ parent.js # Parent dashboard
βββ package.json
βββ README.md
- Node.js (v14 or higher)
- npm
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Access the application: Open your browser and navigate to:
http://localhost:3000
- ID:
admin - Password:
admin123
- ID:
S1001 - Password:
student123
- ID:
T101 - Password:
teacher123
- Phone:
9876543210 - Password:
parent123
All data is stored in newline-delimited JSON files:
{"studentId":"S1001","name":"John Doe","dob":"2005-05-15","year":"2","branch":"CSE","section":"A","club":"Robotics","hostel":"H1","password":"<hashed>","parentPhone":"9876543210","feeTotal":20000,"feePaid":5000,"feeStatus":"pending"}{"teacherId":"T101","name":"Dr. Smith","subject":"Mathematics","password":"<hashed>"}{"date":"2025-12-01","studentId":"S1001","status":"present"}{"studentId":"S1001","subject":"Mathematics","term":"Mid1","marks":85}{"paymentId":"P0001","studentId":"S1001","parentPhone":"9876543210","amount":5000,"date":"2025-12-01","mode":"online","note":"Semester fee"}POST /api/auth/login- Login for all rolesPUT /api/auth/change-password- Change password (student/teacher)
POST /api/admin/add-student- Add new studentPOST /api/admin/add-teacher- Add new teacherPUT /api/admin/edit-student/:id- Edit studentPUT /api/admin/edit-teacher/:id- Edit teacherDELETE /api/admin/delete-student/:id- Delete studentDELETE /api/admin/delete-teacher/:id- Delete teacherGET /api/admin/students- Get all students with statsGET /api/admin/teachers- Get all teachersGET /api/admin/payments- Get all payments
POST /api/attendance- Mark attendance (single)POST /api/attendance/bulk- Mark attendance (bulk)POST /api/marks- Add marksGET /api/teacher/students- Get students by classGET /api/teacher/attendance/:studentId- Get student attendance
GET /api/student/:id- Get complete student profile
GET /api/parent/:phone- Get child's dataPOST /api/parent/payment- Make fee payment
- Modern UI: Vibrant gradients, glassmorphism effects, smooth animations
- Dark Theme: Eye-friendly dark mode with carefully chosen colors
- Responsive: Works perfectly on desktop, tablet, and mobile
- Interactive: Hover effects, smooth transitions, micro-animations
- Premium Feel: Professional design with attention to detail
- Password Hashing: All passwords are hashed using bcrypt (10 salt rounds)
- Input Validation: Both client-side and server-side validation
- Role-Based Access: Middleware ensures users can only access their authorized data
- Session Management: Uses sessionStorage for client-side session handling
Note: This is a development version. For production:
- Implement proper JWT-based authentication
- Add HTTPS
- Use environment variables for sensitive data
- Implement rate limiting
- Add CSRF protection
- Use a proper database (MongoDB, PostgreSQL, etc.)
The system comes with sample data. To add more:
-
Add a Student:
- Login as admin
- Go to "Add Student" tab
- Fill in the form
- Password will be automatically hashed
-
Add a Teacher:
- Login as admin
- Go to "Add Teacher" tab
- Fill in the form
-
Manual Data Entry: You can also manually edit the
.txtfiles inserver/data/, but remember to:- Hash passwords using bcrypt
- Follow the JSONL format (one JSON object per line)
- Ensure data consistency
-
Admin Flow:
- Login as admin
- Add a new student
- Edit student details
- View student list with stats
- Check payment transactions
-
Teacher Flow:
- Login as teacher
- Select class and load students
- Mark attendance
- Add marks for students
- Change password
-
Student Flow:
- Login as student
- View profile and stats
- Check attendance history
- View marks
- Change password
-
Parent Flow:
- Login as parent
- View child's profile
- Check attendance and marks
- Make a fee payment
- Verify payment in history
This system is designed to be easily expandable:
-
Database Migration:
- Replace file operations in
utils/fileOps.jswith database queries - Keep the same API structure
- No frontend changes needed
- Replace file operations in
-
Additional Features:
- Email notifications
- SMS alerts for attendance
- Report card generation (PDF)
- Timetable management
- Library management
- Hostel management
-
Advanced Analytics:
- Attendance trends
- Performance analytics
- Fee collection reports
- Export to Excel/CSV
This project is open-source and available for educational purposes.
- All file operations are atomic (read-modify-write)
- Concurrent access is handled safely
- Code is modular and well-commented
- Easy to understand and extend
- Follows best practices for maintainability
Server won't start:
- Check if port 3000 is available
- Run
npm installto ensure all dependencies are installed
Login fails:
- Verify credentials match the seed data
- Check browser console for errors
- Ensure server is running
Data not persisting:
- Check file permissions in
server/data/directory - Verify files are being created/updated
Password change not working:
- Ensure current password is correct
- Check that new password meets requirements
- Verify server logs for errors
feel free to fork and enhance the project