Skip to content

About

Fair access. Smarter booking. Better resource utilizatio

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🚀 One Resource, Many Teams — Fair College Resource Booking Platform

Tagline: Fair access. Smarter booking. Better resource utilization.

A full-stack campus platform that lets college student teams discover, book, use, and release shared institutional resources (GPU servers, robotics bays, 3D printers, cinema cameras, meeting rooms) with server-side conflict detection, FIFO waitlisting, and no-show automated freeing.


🛠 Tech Stack

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS, Lucide Icons, Recharts, Axios
  • Backend: Node.js, Express, TypeScript, Mongoose, bcrypt, jsonwebtoken, node-cron
  • Database: MongoDB (with automatic fallback to in-memory MongoDB for zero-config development)
  • Architecture: Monorepo (/server and /client)

⚡ Quick Start

1. Install Dependencies

# In the root directory:
npm install --workspace=server
npm install --workspace=client

2. Seed Initial Demo Data

Populates demo resources (GPU cluster, 3D printers, cameras, labs, rooms), student teams, and users across all roles:

npm run seed

3. Run Development Servers

Open two terminal windows:

Terminal 1 (Backend API):

npm run dev:server
# API running on http://localhost:5000

Terminal 2 (Frontend Client):

npm run dev:client
# Web app running on http://localhost:5173

👥 Demo Accounts (Pre-configured)

Use the 1-click login buttons on the login page, or sign in manually with:

Role Email Password Access Details
Student alex@student.edu Student@123 Team leader ("Neural Knights"), browses catalog, reserves slots, views QR pass
Student sam@student.edu Student@123 Team leader ("RoboDynamics"), active 3D printer session
Faculty faculty@college.edu Faculty@123 Dr. Evelyn Reed, oversees mentored CS project teams and departmental usage
Admin admin@college.edu Admin@123 Control center, resource CRUD, real-time utilization % and no-show scanner

🧪 Testing Concurrency & Race Condition Safety

To verify server-side conflict detection under simultaneous concurrent requests hitting the same single-unit slot:

npm run test:concurrency

Expected Output: Exactly 1 booking confirmed, and 4 concurrent conflicting requests rejected with 409 Conflict.


📋 Phase 1 Modules Implemented

  1. Scaffolded Monorepo: /server (Express + TS) and /client (React + Vite + TS).
  2. Mongoose Schemas: User, Team, Resource, Booking, Waitlist, Notification.
  3. Authentication & RBAC: JWT access + refresh tokens, bcrypt password hashing, role-guarded routes (student, faculty, admin).
  4. Team Management: Create teams, add/remove members, max-capacity enforcement (6 members), team usage hours tracking.
  5. Resource Management: Admin CRUD with status states (AVAILABLE, BOOKED, MAINTENANCE, DISABLED), unit quantity indexing, and max duration rules.
  6. Availability Engine: /api/resources/:id/availability returning real-time busy intervals and unit availability breakdown.
  7. Race-Condition Safe Booking: Server-side conflict detection utilizing keyed mutex serialization and overlap interval queries.
  8. Cancellation & Waitlist Notification: Releasing a booking immediately updates status to CANCELLED and offers the slot to the top waiting team.
  9. FIFO Waitlist Queue: Teams can join queues for booked slots; offered teams have a claim window to convert directly into a confirmed reservation.
  10. Automated No-Show Scanner: Scheduled background cron job detecting bookings past their start time + grace period with no check-in, freeing the resource and recalibrating reliability score.
  11. Responsive Dark Mode UI: Tailored HSL palette, glassmorphism panels, interactive calendar timelines, Recharts utilization analytics, and quick role switching.

About

Fair access. Smarter booking. Better resource utilizatio

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages