Skip to content

Repository files navigation

📌 Smart Interview Scheduler (Backend)

A full-stack backend system for managing interview scheduling with role-based access control (RBAC), availability management, and secure booking system.

🔐 Built with Node.js, Express, MongoDB, JWT Authentication, and Role-Based Access Control.


📂 Tech Stack

  • Node.js
  • Express.js
  • MongoDB (Mongoose ODM)
  • JWT Authentication
  • Bcrypt (Password Hashing)
  • Joi (Input Validation)
  • Role-Based Access Control (RBAC)
  • RESTful API design

🎯 Features

🔐 User Authentication

  • Secure Signup & Login using JWT
  • Password hashing using Bcrypt

👥 Role Management (RBAC)

  • Admin
  • Interviewer
  • Candidate
  • Permission-based access control for sensitive endpoints

📅 Interviewer Availability

  • Create interview slots with date & time range
  • Prevent overlapping slots (optional)
  • Manage slot status: available, booked, cancelled, completed

📞 Booking System

  • Candidates can book available slots
  • Prevents double-booking using atomic operations
  • Daily booking limit per interviewer (3 slots/day)
  • Booking cancellation restores availability

🔎 Booking Views

  • View personal bookings (Candidates & Interviewers)
  • Admin can view all bookings

✅ Input Validation

  • Robust input validation using Joi to prevent invalid data

📁 Folder Structure


/config        -> MongoDB connection setup
/controller    -> Business logic for auth, availability, booking
/models        -> Mongoose schemas for User, Availability, Booking
/routes        -> API routes with proper middleware
/middleware    -> JWT auth & RBAC permission middlewares
.env           -> Environment variables (JWT secret, DB URI etc.)
server.js      -> Main server entry


🚀 Deployment

The backend is deployed on Render.
Environment variables handled securely via .env.


🔧 Setup Instructions

1️⃣ Clone the repository

git clone https://github.com/ChaahatL/smart-interview-scheduler.git
cd smart-interview-scheduler

2️⃣ Install dependencies

npm install

3️⃣ Create .env file

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key

4️⃣ Run server (Development)

npm run dev

For production:

npm start

📮 API Endpoints Summary

Method Endpoint Description Access
POST /api/auth/signup User registration Public
POST /api/auth/login User login Public
PUT /api/auth/update Update profile Private
POST /api/availability Create availability Interviewer
GET /api/availability Fetch availability All
POST /api/booking Create booking Candidate
GET /api/booking/my View my bookings Candidate/Interviewer
GET /api/booking/all View all bookings (Admin) Admin
DELETE /api/booking/:id Cancel booking Candidate

👨‍💻 Author

Built by Chahat Lokhande


🏆 Future Enhancements (Optional)

  • Admin dashboard
  • Email notifications
  • Advanced analytics
  • Full automated test suite

🤝 Contributing

PRs and suggestions welcome! This project is built for learning and demonstrating full-stack SDE skills.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages