Skip to content
 
 

Repository files navigation

🎓 Elective Management System

A full-stack Elective Management System designed to streamline subject preference selection, course bucket configuration, elective allotment, and academic entity management for universities.

This system enables administrators, faculty, and students to manage the complete elective lifecycle — from subject creation and preference filling to automated allotments and section management.


📌 Overview

The Elective Management System provides:

  • Structured academic hierarchy (School → Department → Program → Semester)
  • Subject & Course Bucket configuration
  • Student preference submission
  • Allotment management
  • Role-based authentication and authorization
  • Section and seat allocation
  • Administrative controls and analytics support

The system follows a modular, scalable architecture with a TypeScript-based backend and a React frontend.


🏗 System Architecture

1️⃣ Frontend (Client)

  • Built using React + TypeScript
  • State management using Redux
  • Modular page-based architecture
  • Role-based protected routes
  • Structured UI for admin, faculty, and student flows

Key Frontend Modules

  • Authentication Pages
  • Department Management
  • School & Faculty Management
  • Programs & Semesters
  • Course & Course Buckets
  • Subject & Subject Types
  • Student Management
  • Professor Management
  • Subject Preference Filling
  • Allotment Views
  • Profile Management

2️⃣ Backend (Server)

  • Node.js + Express + TypeScript
  • Prisma ORM
  • RESTful API architecture
  • Role-based access control middleware
  • Modular controller-based structure

Backend Responsibilities

  • Authentication & Authorization
  • Academic entity CRUD operations
  • Preference validation
  • Allotment logic
  • Section creation & seat handling
  • Data integrity enforcement
  • Soft delete mechanisms
  • Cascade rules via Prisma

🗄 Database Layer

Managed via Prisma ORM

Includes:

  • Users & Credentials
  • Schools
  • Departments
  • Programs
  • Semesters
  • Courses
  • Course Buckets
  • Subjects
  • Subject Types
  • Professors
  • Students
  • Subject Preferences
  • Standalone & Bucket Allotments
  • Sections
  • Seat mappings

Multiple migrations ensure schema evolution and constraint management.


🔐 Role-Based Access Control

The system supports multiple roles:

  • Admin
  • Faculty
  • Professor
  • Student

Middleware enforces:

  • Authentication validation
  • Role-based route access
  • Authorization checks
  • Response logging & monitoring

✨ Core Features

📚 Academic Structure Management

  • Create Schools, Departments, Programs
  • Configure Semesters
  • Associate Courses with Programs

🗂 Course Buckets

  • Create elective buckets
  • Define number of required courses
  • Assign subject types
  • Enforce credit constraints

📘 Subject Management

  • Subject creation & classification
  • Subject types with soft delete
  • Seat allocation per subject
  • Scope and category management

👨‍🎓 Student Preference System

  • Students fill ranked preferences
  • Validation of bucket constraints
  • Due date enforcement
  • Unique constraints to avoid duplication

🎯 Allotment Engine

  • Standalone allotments
  • Bucket-based allotments
  • Unique constraint enforcement
  • Section creation
  • Seat mapping & distribution

👨‍🏫 Professor & Faculty Management

  • Professor ranks
  • Faculty associations
  • Subject assignment

🛠 Tech Stack

Frontend

  • React
  • TypeScript
  • Redux
  • Vite (or React build toolchain)

Backend

  • Node.js
  • Express.js
  • TypeScript
  • Prisma ORM

Database

  • SQL-based (Configured via Prisma)

Dev Tools

  • Docker support
  • Swagger documentation
  • Custom logging utilities

📁 Project Structure

ElectiveManagementSystemLatest-main/ │ ├── client/ # React frontend │ ├── src/ │ ├── pages/ │ ├── redux/ │ └── utils/ │ ├── server/ # Express backend │ ├── src/ │ │ ├── controllers/ │ │ ├── routes/ │ │ ├── middleware/ │ │ ├── scripts/ │ │ └── utils/ │ ├── prisma/ │ └── package.json


🚀 Getting Started

1️⃣ Clone the Repository

git clone <repository-url>
cd ElectiveManagementSystemLatest-main 

🔧 Backend Setup cd server npm install Configure Environment Variables

Create a .env file based on:

server/.env.example

Add your database URL and other required variables.

Prisma Setup npx prisma generate npx prisma migrate dev Run Backend npm run dev

Server runs on configured port (typically http://localhost:3000).

💻 Frontend Setup cd client npm install npm start

Runs on:

http://localhost:5173

(Port may vary depending on configuration.)

🧪 Development Utilities

The backend includes scripts for:

Seeding data

Creating random preferences

Populating professors & students

Bulk deletion

Section creation

Formatting names

Department renaming

Branch renaming

Example:

npx ts-node src/scripts/seed.ts 📊 Data Integrity & Constraints

Unique constraints on bucket names

Department-based uniqueness

Soft delete support

On-delete cascade rules

Indexed frequently queried fields

Seat allocation safeguards

Preference duplication prevention

📖 API Documentation

Swagger integration available via:

server/src/utils/swagger.ts

Access API docs at the configured /docs endpoint after server startup.

📈 Scalability Considerations

Modular controller structure

Separation of concerns

Prisma migration tracking

Role-based middleware isolation

Script-based database automation

🔮 Future Improvements

Automated optimized allotment algorithm

Real-time preference tracking

Admin dashboard analytics

Notification system

Email integration

Performance monitoring dashboard

Advanced reporting exports (CSV / PDF)

Caching layer for high-scale deployments

👨‍💻 Author

Vivek Kumar Garg Full-Stack Developer SDE Intern | Web Development Lead | AI Systems Builder

📄 License

This project is intended for academic and institutional use. Modify and extend as required for deployment within your university environment.

Releases

Packages

Contributors

Languages