College-queue-system

BVM Smart Counter & Queue Management CRM

A comprehensive queue management system for BIRLA VISHVAKARMA MAHAVIDHYALAYA (BVM) to digitize manual queuing for student administrative tasks.

πŸš€ Features

Student Interface

Faculty Interface

πŸ›  Tech Stack

πŸ“¦ Complete Setup Guide (From Scratch)

Prerequisites

Before starting, ensure you have the following installed:


Step 1: Install MongoDB (if not already installed)

Option A: Local MongoDB

  1. Download MongoDB Community Server from the official website
  2. Install with default settings
  3. MongoDB will run automatically as a service on localhost:27017

Option B: MongoDB Atlas (Cloud)

  1. Create a free account at MongoDB Atlas
  2. Create a new cluster (free tier available)
  3. Get your connection string and update server/.env:
    MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/bvm_queue_management
    

Step 2: Install Backend Dependencies

Open a terminal and navigate to the project folder:

cd d:\Project\server
npm install

This will install: express, mongoose, bcryptjs, jsonwebtoken, cors, dotenv, multer, qrcode, dayjs


Step 3: Seed the Database

Run the seed script to create default users and counters:

cd d:\Project\server
npm run seed

You should see:

Connected to MongoDB
Created student: 25ec443@bvmengineering.ac.in
Created faculty: 25ec407@bvmengineering.ac.in
Created faculty: 25ec457@bvmengineering.ac.in
Created faculty: 25ec460@bvmengineering.ac.in
Created counter: Admissions Counter
...
βœ… Database seeded successfully!

Step 4: Start the Backend Server

cd d:\Project\server
npm run dev

You should see:

Server running in development mode on port 5000
MongoDB Connected: localhost

Keep this terminal running!


Step 5: Install Frontend Dependencies

Open a NEW terminal and run:

cd d:\Project\client
npm install

This will install: react, react-router-dom, axios, dayjs, qrcode.react, html5-qrcode, lucide-react


Step 6: Start the Frontend Server

cd d:\Project\client
npm run dev

You should see:

VITE v5.x.x ready in xxx ms

➜  Local:   http://localhost:5173/
➜  Network: use --host to expose

Step 7: Access the Application

Open your browser and go to: http://localhost:5173

You’ll see the login page. Use these credentials:

Role Email Password
Student 25ec443@bvmengineering.ac.in password123
Faculty 25ec407@bvmengineering.ac.in password123

Quick Start Summary (TL;DR)

# Terminal 1 - Backend
cd d:\Project\server
npm install
npm run seed
npm run dev

# Terminal 2 - Frontend (new terminal)
cd d:\Project\client
npm install
npm run dev

# Open browser: http://localhost:5173

πŸ” Default Credentials

Role Email Password
Student 25ec443@bvmengineering.ac.in password123
Faculty 25ec407@bvmengineering.ac.in password123
Faculty 25ec457@bvmengineering.ac.in password123
Faculty 25ec460@bvmengineering.ac.in password123
Parent Mobile: 9876543211 OTP (see console)

🌐 API Endpoints

Authentication

Bookings

Faculty

Emergency Queue

πŸ“ Project Structure

β”œβ”€β”€ client/                 # React Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚   β”‚   β”œβ”€β”€ context/        # React Context
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   β”œβ”€β”€ services/       # API services
β”‚   β”‚   └── styles/         # Global CSS
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/                 # Express Backend
β”‚   β”œβ”€β”€ config/             # Database config
β”‚   β”œβ”€β”€ controllers/        # Route handlers
β”‚   β”œβ”€β”€ middleware/         # Auth middleware
β”‚   β”œβ”€β”€ models/             # MongoDB models
β”‚   β”œβ”€β”€ routes/             # API routes
β”‚   β”œβ”€β”€ seeds/              # Database seeding
β”‚   β”œβ”€β”€ utils/              # Helper functions
β”‚   └── package.json
β”‚
└── README.md

βš™οΈ Configuration

Environment Variables (server/.env)

PORT=5000
MONGODB_URI=mongodb://localhost:27017/bvm_queue_management
JWT_SECRET=your_secret_key
JWT_EXPIRE=24h
NODE_ENV=development

πŸ”’ Key Technical Features

  1. Race Condition Prevention - Atomic updates for slot bookings
  2. Timezone Handling - UTC storage with IST conversion
  3. Fake Enquiry Protection - 5-strike warning system
  4. Auto-rejection - Emergency requests rejected at 5 PM
  5. QR Code Verification - Secure booking verification

πŸ“„ License

This project is created for BVM Engineering College.