Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

📅 Smart Interview Scheduler

Node.js Express MongoDB React Vite Tailwind CSS Socket.io License

A production-grade interview scheduling system that automates the entire interview lifecycle — from availability setup to booking, Google Calendar events, Meet links, and email notifications.


🔗 Live Demo


🌟 Features

Core Features

  • 🔐 Google OAuth 2.0 — Interviewers sign in with Google — no passwords
  • 📅 Auto Slot Generation — Set weekly availability with optional start/end date, slots auto-generate for 30 days and refresh daily via cron job
  • 🎯 Atomic Slot Booking — Race condition safe — no double booking ever
  • 📆 Google Calendar Integration — Auto creates calendar events with Google Meet links
  • 📧 Automated Emails — Confirmation, cancellation and reschedule emails via Gmail API
  • 🔔 Real-time Notifications — Instant Socket.io notifications for new bookings and cancellations
  • 🔗 Tokenized Candidate Actions — Cancel or reschedule via email links — no login required
  • 📊 Interviewer Dashboard — Stats, upcoming bookings, past bookings
  • 👤 Interviewer Public Profile — Role, company, bio and display name visible to candidates
  • ✂️ Slot Cancellation — Interviewers can cancel specific slots directly
  • 📅 Availability Date Range — Set start and end date for availability rules

Candidate Features

  • 🌐 Public Booking Flow — No account required
  • 🔍 Interviewer Search — Browse and search interviewers by name
  • 📋 Slot Browser — View all available slots and select a time
  • Instant Confirmation — Booking success screen + confirmation email
  • 📜 Booking History — Candidates can look up all their bookings by email

Background Jobs

  • ⚙️ Daily Slot Generation — Cron job runs at midnight to keep slots 30 days ahead
  • 30-min Reminders — Cron job notifies interviewers before upcoming interviews

🛠️ Tech Stack

Backend

  • Node.js + Express.js
  • MongoDB + Mongoose
  • Socket.io
  • Google Calendar API + Gmail API
  • Google OAuth 2.0 + JWT
  • node-cron

Frontend

  • React + Vite
  • Tailwind CSS
  • Socket.io-client
  • Axios
  • React Router DOM
  • React Hot Toast

📁 Project Structure

smart-interview-scheduler/
├── backend/
│   ├── config/               # DB, OAuth, Socket.io config
│   ├── controllers/          # Route handler logic
│   ├── jobs/                 # Cron jobs
│   ├── middleware/           # Auth middleware
│   ├── models/               # Mongoose schemas
│   ├── routes/               # Express routers
│   ├── services/             # Google Calendar, Gmail, Notification services
│   ├── server.js             # Entry point
│   └── .env.example
├── frontend/
│   ├── src/
│   │   ├── components/       # Reusable UI components
│   │   ├── context/          # Auth context
│   │   ├── pages/            # Page components
│   │   ├── services/         # API service calls
│   │   └── utils/            # Axios instance
│   ├── index.html
│   └── .env.example
└── README.md

🚀 Getting Started

Prerequisites

  • Node.js v18+
  • MongoDB Atlas account
  • Google Cloud Console project

1. Clone the repository

git clone https://github.com/OmOmer19/Smart-Interview-Scheduler.git
cd Smart-Interview-Scheduler

2. Backend setup

cd backend
npm install
cp .env.example .env

Fill in your .env values — see Environment Variables section below.

node server.js

3. Frontend setup

cd frontend
npm install
cp .env.example .env

Fill in your .env values.

npm run dev

🔑 Environment Variables

Backend .env

Variable Description
PORT Server port (default 3000)
FRONTEND_URL Frontend URL for CORS and email links
MONGO_URI MongoDB Atlas connection string
JWT_SECRET Secret key for JWT signing
GOOGLE_CLIENT_ID Google OAuth client ID
GOOGLE_CLIENT_SECRET Google OAuth client secret
GOOGLE_CALLBACK_URL OAuth callback URL

Frontend .env

Variable Description
VITE_API_URL Backend API base URL

🔐 Google OAuth Setup

  1. Go to Google Cloud Console
  2. Create a new project
  3. Go to APIs & ServicesEnable APIs
  4. Enable Google Calendar API and Gmail API
  5. Go to APIs & ServicesCredentials
  6. Create OAuth 2.0 Client ID (Web application)
  7. Add authorized redirect URI:
  8. Copy Client ID and Client Secret to your .env
  9. Go to OAuth consent screen → add your Gmail as a test user

📋 Booking Flow

  1. Interviewer logs in with Google OAuth
  2. Interviewer creates availability rules (days + time window + duration)
  3. System auto-generates bookable slots for next 30 days
  4. Candidate visits /book and searches for an interviewer
  5. Candidate selects a slot and fills in their details
  6. System atomically locks the slot — no double booking possible
  7. Google Calendar event created with Meet link
  8. Confirmation emails sent to both candidate and interviewer
  9. Interviewer receives real-time Socket.io notification
  10. Candidate can cancel or reschedule via links in their email

📡 API Endpoints

Auth

Method Endpoint Description Auth
GET /api/auth/google Initiate Google OAuth Public
GET /api/auth/google/callback OAuth callback Public
GET /api/auth/interviewers Get all interviewers Public
GET /api/auth/profile Get interviewer profile Protected
PATCH /api/auth/profile Update interviewer profile Protected

Availability

Method Endpoint Description Auth
POST /api/availability Create availability rule Protected

Slots

Method Endpoint Description Auth
GET /api/slots/:interviewerId Get available slots Public
DELETE /api/slots/:slotId Cancel a specific slot Protected

Bookings

Method Endpoint Description Auth
POST /api/bookings Book a slot Public
GET /api/bookings/interviewer Get interviewer bookings Protected
GET /api/bookings/candidate/:email Get candidate bookings Public
PUT /api/bookings/cancel/:bookingId Cancel booking Public
PUT /api/bookings/reschedule/:bookingId Reschedule booking Public
GET /api/bookings/:bookingId Get booking by ID Public

Notifications

Method Endpoint Description Auth
GET /api/notifications Get all notifications Protected
PATCH /api/notifications/:id/read Mark as read Protected
PATCH /api/notifications/read-all Mark all as read Protected

Dashboard

Method Endpoint Description Auth
GET /api/dashboard/stats Get stats Protected
GET /api/dashboard/upcoming Upcoming bookings Protected
GET /api/dashboard/past Past bookings Protected

📸 Pages

  • / — Login page with Google OAuth + dashboard preview
  • /dashboard — Interviewer dashboard with stats and bookings
  • /availability — Manage availability rules and view slots
  • /notification — Real-time notifications with unread badge
  • /book — Public interviewer directory for candidates
  • /book/:interviewerId — Slot browser and booking form
  • /cancel/:bookingId — Cancel booking via email link
  • /reschedule/:bookingId — Reschedule booking via email link
  • /profile — Interviewer profile edit page
  • /my-bookings — Candidate booking history lookup

⚠️ Important Notes

  • App is in Google OAuth testing mode — interviewers must be added as test users in Google Cloud Console
  • Access tokens expire after 1 hour — auto refreshed via refresh token
  • Refresh tokens expire after 7 days in testing mode — interviewer must re-login
  • Publishing the app on Google Cloud Console removes the 7-day limit

👨‍💻 Developer

Made by Om Omer

About

A production-grade interview scheduling system that automates the entire interview lifecycle with Google OAuth, Google Calendar & Meet integration, real-time notifications, and email automation — built with React, Node.js, Express, MongoDB, and Socket.io.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages