A comprehensive web-based examination management system built with Next.js, TypeScript, and SQLite.
- Dashboard: Real-time statistics and monitoring
- Exam Management: Create, edit, and manage exams
- Question Bank: Manage questions with difficulty levels and types
- Student Management: Add and manage student records
- Course Management: Assign exams to courses
- Results & Analytics: View and export exam results
- Certificate Generation: Automatic certificate generation for passed exams
- Dashboard: View available exams and performance
- Take Exams: Timed exam interface with auto-save
- View Results: Detailed performance analysis
- Download Certificates: PDF certificates for passed exams
- Frontend: Next.js 16, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: SQLite with better-sqlite3
- Authentication: JWT-based with bcrypt
- PDF Generation: jsPDF for certificates
- Node.js 18+
- npm or pnpm
- Clone the repository
git clone <repository-url>
cd exam-management-system- Install dependencies
npm install- Initialize the database
npm run db:seed- Start the development server
npm run dev- Email:
admin@vitpune.ac.in - Password:
admin123
- Email:
student@vitstudent.ac.in - Password:
student123
See TEST_CREDENTIALS.md for more test accounts.
exam-management-system/
├── app/ # Next.js app directory
│ ├── admin/ # Admin pages
│ ├── student/ # Student pages
│ ├── api/ # API routes
│ └── login/ # Authentication
├── components/ # Reusable components
├── lib/ # Utilities and services
│ ├── db/ # Database setup and schema
│ ├── services/ # Business logic
│ ├── middleware/ # Authentication middleware
│ └── utils/ # Helper functions
├── scripts/ # Database and utility scripts
└── public/ # Static assets
New students are automatically enrolled in courses matching their department and semester.
- Admin: Full system access
- Student: Limited to their own data
- Live statistics
- Auto-refresh every 30 seconds
- Performance analytics
- Assign exams to multiple courses
- View affected students in real-time
- Track enrollment status
See DBMS_CONCEPTS.md for detailed database design and relationships.
users- Authentication and rolescandidates- Student informationsubjects- Academic subjectscourses- Course offeringsquestions- Question bankexams- Exam definitionsexam_attempts- Student exam sessionsresults- Exam resultscertifications- Generated certificates
POST /api/auth/login- User loginPOST /api/auth/logout- User logout
GET /api/admin/courses- List coursesGET /api/admin/questions- List questionsPOST /api/admin/exams- Create examGET /api/admin/analytics- System analytics
GET /api/student/exams- Available examsPOST /api/exams/[id]/start- Start examPOST /api/exams/[id]/submit- Submit examGET /api/student/results- View resultsGET /api/student/certificates- Download certificates
npm run db:seed # Seed database with sample data
npm run db:reset # Reset and reseed databasenpx tsx scripts/enroll-students-in-courses.ts # Enroll students
npx tsx scripts/create-all-semester-courses.ts # Create courses
npx tsx scripts/test-auto-enrollment.ts # Test enrollmentCreate a .env.local file:
JWT_SECRET=your-secret-key-here
NODE_ENV=developmentSQLite database is stored at: data/exam-system.db
npm testnpm run build
npm startnpm run lint
npm run format- Select subject and questions from question bank
- Set duration, passing marks, and schedule
- Assign to courses
- Publish when ready
- Students see available exams on dashboard
- Click "Start Exam" to begin
- Timed interface with auto-save
- Submit when complete or time expires
- Automatic grading on submission
- Results visible immediately
- Certificates generated for passed exams
- PDF download available
- Create student with department and semester
- System finds matching courses
- Student automatically enrolled
- Appears in course rosters immediately
# Reset database
npm run db:reset
# Check database integrity
npx tsx scripts/verify-seed.ts- Clear browser cookies
- Check JWT_SECRET in environment
- Verify user exists in database
# Check course availability
npx tsx scripts/check-durgesh.ts
# Enroll unenrolled students
npx tsx scripts/enroll-students-in-courses.ts- Passwords hashed with bcrypt
- JWT-based authentication
- Role-based access control
- SQL injection prevention (parameterized queries)
- Protected API routes
- Server-side rendering with Next.js
- Optimized database queries
- Efficient pagination
- Auto-save for exams
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Check
DBMS_CONCEPTS.mdfor database design - Check
TEST_CREDENTIALS.mdfor test accounts - Review API documentation above
Built with:
- Next.js
- React
- TypeScript
- Tailwind CSS
- SQLite
- better-sqlite3
- bcrypt
- jsonwebtoken
- jsPDF
Version: 1.0.0
Last Updated: November 2025
Status: Production Ready ✅