Skip to content
arkaghosh2005Public

About

A real-time MERN Stack Video Conferencing platform built with React and Node.js and features WebRTC peer to peer connections, screen sharing, live chat, and dynamic participant management. The adaptive grid layouts enable the support of multiple simultaneous screen shares.

Topics

Resources

Stars

96 stars

Watchers

0 watching

Forks

Latest commit

 

History

113 Commits

Folders and files

Repository files navigation

QuickMeet : Real-Time Video Conferencing Platform

QuickMeet

React Node.js WebRTC Socket.io Tailwind CSS MongoDB Express Vite Vitest

A fully-featured, responsive video conferencing platform similar to Zoom/Google Meet, built from scratch using modern web technologies with WebRTC peer-to-peer connections.


📋 Table of Contents


✨ Features

🎥 Core Video & Audio

Feature Description
Real-time Video Calls Ultra-low latency peer-to-peer video using WebRTC with Google STUN + configurable TURN servers
Hardware Release Guarantee Clean media track disposal (track.stop()) on call end, unmount, or tab close — no lingering webcam lights
Screen Sharing Share entire screen or specific application windows with track renegotiation
Audio/Video Controls Toggle camera and microphone on/off during calls with instant peer state synchronization
Speaker Toggle Mute/unmute all incoming audio from remote participants
Pre-Call Setup Preview video, test microphone, configure display name and AV toggles before joining
Auto Aspect Ratio Video preview automatically adjusts to match webcam native aspect ratio
Connection Status Bar Visual indicator for connected, reconnecting, and disconnected states with manual retry

⚙️ In-Call Settings Panel

Feature Description
Settings Panel Accessible via the gear icon in the control bar
Camera Selection Switch dynamically between available system webcams
Microphone Selection Switch dynamically between available microphones
Echo Cancellation Toggle browser-level acoustic echo cancellation
Auto Gain Control Toggle microphone input gain normalization
Noise Suppression Filter out background noise from the microphone feed

👤 User Experience & Accessibility

Feature Description
Smart Code Formatting Automatic dash insertion (AAA-BBBB-CCC) while typing or pasting meeting codes/URLs
Enter-Key Quick Join Press Enter in the meeting code input to join instantly
Dark/Light Theme System and manual dark mode with dark class applied to root <html> and persisted in localStorage
User Authentication Token-based signup & login with bcrypt password hashing and strong password rules
OAuth Login Sign in with Google or Microsoft accounts — automatic account linking if the same email exists locally
Password Visibility Toggle Eye/EyeOff toggle button on all password fields (login, signup, settings)
Guest Access Join any meeting instantly as a guest without an account
Profile Management Update name, email, and password from the Settings page with current-password verification
One-Click Code Copy Copy meeting code or direct pre-call invitation link with toast feedback
Responsive Design Custom adaptive CSS breakpoints supporting desktop, tablet, and mobile

🎮 Meeting Controls & Layout

Feature Description
Waiting Room Host-controlled entry gate — participants wait until manually admitted or denied by the host
Host Identification Distinct badge for room creator vs participants
Participant Panel Real-time attendee list displaying live microphone, camera, and screen share states
Real-time Chat Floating in-call messaging panel with auto-scroll and unread badge count
Adaptive Grid Layout Dynamic responsive grid accommodating 1 to 8+ participants with vertical stacking on mobile
Screen Share Priority Screen shares automatically claim primary layout focus
Participant Overflow Displays +N more indicator when attendees exceed grid slots

📅 Schedule Meeting

Feature Description
Schedule Meeting Page Dedicated page for future meeting scheduling (coming soon for logged-in users)
Guest Detection Displays informational message prompting guest users to sign up for scheduling

📜 Meeting History

Feature Description
History Dashboard View past meetings with date, timestamp, and active indicator
Active Room Detection Shows real-time badge if a past meeting is currently in progress
One-Click Rejoin Direct rejoin button for active meetings
Meeting Deletion Remove individual meetings from user history
Auto-Cleanup (TTL) MongoDB TTL index automatically cleans entries older than 30 days
Duplicate Prevention Rejoining an existing room updates the timestamp instead of duplicating rows

🔒 Security, Reliability & Quality

Feature Description
WebSocket XSS Sanitization Server-side sanitization of user names, chat text, and screen share labels
Strong Password Policy Enforces minimum 8 chars, uppercase, lowercase, numbers, and special characters
DNS Resilience Automatic Google Public DNS (8.8.8.8) fallback in Node.js to resolve Atlas SRV lookups on restrictive networks
Bounded Memory Chat messages capped at 500 per room to prevent unbounded server memory growth
Rate Limiting Strict rate limits on authentication endpoints (5 req/15 min), OAuth (20 req/15 min) and API (100 req/15 min)
Input Validation Strict express-validator rules on all authentication and history endpoints
Security Headers Helmet middleware configured for CSP, HSTS, and X-Frame-Options
Accidental Leave Prevention Browser back navigation trap, beforeunload tab-close warning, and confirmation dialog
Graceful Shutdown Handles SIGTERM/SIGINT to cleanly close HTTP, WebSockets, and MongoDB connections
Automated Tests 70 unit & component tests across 13 test files powered by Vitest and React Testing Library
Linting & Formatting ESLint 9 flat configuration and Prettier formatting

🔍 SEO & Web Optimization

Feature Description
Per-Page Meta Tags Dynamic title, description, and canonical tags via react-helmet-async
Open Graph & Twitter Cards Social link previews powered by og-image.svg matching brand identity
JSON-LD Structured Data WebApplication and Organization schemas for rich Google search results
Sitemap & Robots.txt sitemap.xml for public pages; robots.txt disallows indexing of private rooms
PWA Manifest & Favicon Web app manifest with SVG icons and standalone display capability

🛠 Tech Stack

Frontend Technologies

Technology Version Purpose
React 19.2.3 Declarative UI framework with Hooks
React Router DOM 7.17.0 Client-side routing and navigation
Vite 7.3.5 Modern ESM build tool and development server
Tailwind CSS 3.3.6 Utility-first responsive styling with dark mode
Lucide React 0.562.0 SVG icon library
Socket.io Client 4.8.1 Real-time WebSocket signaling
Axios 1.17.0 HTTP client with authentication interceptors
React Helmet Async 3.0.0 Per-route SEO metadata management
Vitest Latest Next-generation unit test runner
React Testing Library Latest Component testing utilities

Backend Technologies

Technology Version Purpose
Node.js 24.x (>= 18) JavaScript runtime environment
Express.js 5.2.1 HTTP API server framework
Socket.io 4.8.2 Real-time WebRTC signaling server
MongoDB Atlas Cloud Cloud document database
Mongoose 9.6.3 MongoDB Object Data Modeling (ODM)
bcrypt 6.0.0 Salted password hashing
jsonwebtoken 9.0.3 Stateless JWT token issuance and verification
helmet 8.2.0 HTTP security headers middleware
express-validator 7.3.2 Request payload validation and sanitization
express-rate-limit 8.5.2 IP-based request throttling
CORS 2.8.5 Cross-origin resource sharing

🌐 WebRTC Infrastructure (STUN & TURN)

QuickMeet implements standard WebRTC signaling over Socket.io. For NAT traversal, the platform supports both STUN and TURN servers:

                  ┌─────────────────────────────────────────┐
                  │          Signaling (Socket.io)          │
                  │   Offers, Answers & ICE Candidates      │
                  └──────────────────┬──────────────────────┘
                                     │
                 ┌───────────────────┴───────────────────┐
                 ▼                                       ▼
    ┌─────────────────────────┐             ┌─────────────────────────┐
    │     Peer A (Browser)    │◄── P2P ────►│     Peer B (Browser)    │
    └────────────┬────────────┘  Media Flow └────────────┬────────────┘
                 │                                       │
                 ├────────► STUN (Google) ◄──────────────┤ (Direct P2P via STUN)
                 │                                       │
                 └────────► TURN Server   ◄──────────────┘ (Relay for symmetric NATs)
Traversal Type Configuration Behavior
STUN (Default) 5 Google STUN servers (stun.l.google.com:19302 to stun4) Discovers public IP/port for direct peer-to-peer media paths (~80-85% of users).
TURN (Configured) Configured via VITE_TURN_URL, VITE_TURN_USERNAME, VITE_TURN_CREDENTIAL Relays media packets for users behind restrictive firewalls or symmetric NATs.

Need free TURN credentials? You can generate free TURN credentials from metered.ca/tools/openrelay or self-host Coturn.


🏗 System Architecture

┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                    CLIENT (React 19 + Vite 7)                                   │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                                 │
│  ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌───────────┐  │
│  │   Landing   │ │   Login     │ │   Signup    │ │   Meeting   │ │   Meeting   │ │  PreCall  │  │
│  │    Page     │ │    Page     │ │    Page     │ │   Entry     │ │   History   │ │   Page    │  │
│  └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └─────┬─────┘  │
│         │               │               │               │               │              │        │
│         │          Google/Microsoft OAuth Buttons ───► Backend ───► Callback Page      │        │
│         │               │               │               │               │              │        │
│         └───────────────┴───────────────┴───────┬───────┴───────────────┴──────────────┘        │
│                                                 │                                               │
│                                                 ▼                                               │
│  ┌──────────────────────────────────────────────────────────────────────────────────────────┐   │
│  │                              VIDEO CALL PAGE (Main Interface)                            │   │
│  │  ┌────────────────────┐ ┌────────────────────┐ ┌────────────────────┐ ┌───────────────┐  │   │
│  │  │   Video Grid       │ │   Control Bar      │ │   Settings Panel   │ │  Chat Panel   │  │   │
│  │  │  - Local video     │ │  - Mic toggle      │ │  - Camera select   │ │  - Messages   │  │   │
│  │  │  - Remote videos   │ │  - Video toggle    │ │  - Mic select      │ │  - Real-time  │  │   │
│  │  │  - Screen shares   │ │  - Speaker toggle  │ │  - Echo cancel     │ │  - Floating   │  │   │
│  │  │  - Adaptive grid   │ │  - Screen share    │ │  - Auto gain       │ └───────────────┘  │   │
│  │  │  - Overflow (+N)   │ │  - Chat button     │ │  - Noise suppress  │ ┌───────────────┐  │   │
│  │  └────────────────────┘ │  - Settings button │ └────────────────────┘ │  Participants │  │   │
│  │                         │  - End call        │                        │    Panel      │  │   │
│  │                         └────────────────────┘                        └───────────────┘  │   │
│  └──────────────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                                 │
│  ┌──────────────────────────────────────────────────────────────────────────────────────────┐   │
│  │                              CONTEXT PROVIDERS (Global State)                            │   │
│  │  ┌─────────────────────────────────────┐  ┌────────────────────────────────────────────┐ │   │
│  │  │           AuthContext               │  │              ThemeContext                  │ │   │
│  │  │  • userData (name, email, token)    │  │  • isDarkMode state                        │ │   │
│  │  │  • login() / signup() / logout()    │  │  • toggleDarkMode()                        │ │   │
│  │  │  • loginAsGuest()                   │  │  • document.documentElement.classList      │ │   │
│  │  │  • Session expiry toast             │  │  • localStorage persistence                │ │   │
│  │  └─────────────────────────────────────┘  └────────────────────────────────────────────┘ │   │
│  └──────────────────────────────────────────────────────────────────────────────────────────┘   │
└────────────────────────────────────┬────────────────────────────────┬───────────────────────────┘
                                     │                                │
                    ┌────────────────┴────────────────┐  ┌────────────┴────────────────┐
                    │        Socket.io Client         │  │      Axios HTTP Client      │
                    │      (Real-time Signaling)      │  │      (REST API Calls)       │
                    └────────────────┬────────────────┘  └────────────┬────────────────┘
                                     │                                │
═══════════════════════════════════════════════════════════════════════════════════════════════════
                                     │           NETWORK              │
═══════════════════════════════════════════════════════════════════════════════════════════════════
                                     │                                │
                    ┌────────────────┴────────────────┐  ┌────────────┴────────────────┐
                    │        Socket.io Server         │  │       Express Router        │
                    │      (Signaling & Events)       │  │      (HTTP Endpoints)       │
                    └────────────────┬────────────────┘  └────────────┬────────────────┘
                                     │                                │
┌────────────────────────────────────┴────────────────────────────────┴───────────────────────────┐
│                              SERVER (Node.js 24 + Express 5)                                    │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                                 │
│  ┌──────────────────────────────────────────────────────────────────────────────────────────┐   │
│  │                              SOCKET MANAGER (socketManager.js)                           │   │
│  │  • Sanitized inputs (XSS protection)         • Room cleanup timer (1 hour timeout)       │   │
│  │  • Bounded message buffer (500 max/room)     • JWT & Guest handshake authentication      │   │
│  └──────────────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                                 │
│  ┌──────────────────────────────────────────────────────────────────────────────────────────┐   │
│  │                              USER CONTROLLER (userController.js)                         │   │
│  │  • POST /v1/users/signup (409 on duplicate)  • GET /v1/users/history                     │   │
│  │  • POST /v1/users/login (7-day JWT)          • POST /v1/users/history (upsert)           │   │
│  │  • PUT /v1/users/profile                     • DELETE /v1/users/history                  │   │
│  │  • POST /v1/users/verify-password            • DELETE /v1/users/account                  │   │
│  └──────────────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                                 │
│  ┌──────────────────────────────────────────────────────────────────────────────────────────┐   │
│  │                              AUTH CONTROLLER (authController.js)                         │   │
│  │  • GET /v1/auth/google (redirect to consent)  • GET /v1/auth/google/callback             │   │
│  │  • GET /v1/auth/microsoft (redirect)           • GET /v1/auth/microsoft/callback         │   │
│  │  • Auto account linking by email              • JWT token + redirect to frontend         │   │
│  └──────────────────────────────────────────────────────────────────────────────────────────┘   │
└────────────────────────────────────────────────────┬────────────────────────────────────────────┘
                                                     │
                                                     ▼ Mongoose ODM
                                      ┌─────────────────────────────┐
                                      │        MongoDB Atlas        │
                                      │  • Users (local + OAuth)    │
                                      │  • Meetings (30-day TTL)    │
                                      └─────────────────────────────┘

📁 Project Structure

quickmeet/
├── frontend/                                # React Frontend Application
│   ├── public/
│   │   ├── favicon.svg                      # Brand SVG Favicon
│   │   ├── icon-192.svg                     # PWA icon (192x192)
│   │   ├── icon-512.svg                     # PWA icon (512x512)
│   │   ├── manifest.json                    # Web app manifest (PWA)
│   │   ├── og-image.svg                     # Open Graph social preview (1200x630)
│   │   ├── robots.txt                       # Search engine crawl rules
│   │   └── sitemap.xml                      # XML sitemap for SEO
│   ├── src/
│   │   ├── components/
│   │   │   ├── Button.jsx                   # Accessible button with variants
│   │   │   ├── ChatPanel.jsx                # Floating in-call chat
│   │   │   ├── ConfirmModal.jsx             # Accessible modal dialog
│   │   │   ├── DarkModeToggle.jsx           # Theme switch with keyboard support
│   │   │   ├── ErrorBoundary.jsx            # React error boundary with fallback UI
│   │   │   ├── Input.jsx                    # Form input with icon, suffix & validation
│   │   │   ├── LoadingSpinner.jsx           # Animated CSS spinner
│   │   │   ├── ParticipantTile.jsx          # Video call participant tile with audio
│   │   │   ├── SEO.jsx                      # Per-route meta tags
│   │   │   └── Skeleton.jsx                 # Skeleton loading placeholder
│   │   │
│   │   ├── context/
│   │   │   ├── AuthContext.jsx              # JWT & guest authentication
│   │   │   └── ThemeContext.jsx             # Dark mode state & HTML class toggle
│   │   │
│   │   ├── pages/
│   │   │   ├── LandingPage.jsx              # Landing hero & guest join
│   │   │   ├── LoginPage.jsx                # Login form with OAuth & password toggle
│   │   │   ├── SignupPage.jsx               # Registration with OAuth & password toggle
│   │   │   ├── OAuthCallbackPage.jsx        # OAuth redirect handler
│   │   │   ├── MeetingEntryPage.jsx         # Create/Join with auto-dash formatting
│   │   │   ├── MeetingHistoryPage.jsx       # Past meetings list
│   │   │   ├── ScheduleMeetingPage.jsx      # Schedule meeting
│   │   │   ├── SettingsPage.jsx             # Profile, preferences & account management
│   │   │   ├── NotFoundPage.jsx             # Custom 404 page
│   │   │   ├── PreCallPage.jsx              # Hardware preview & setup
│   │   │   └── VideoCallPage.jsx            # Video conferencing interface
│   │   │
│   │   ├── __tests__/                       # Test suite (Vitest + RTL)
│   │   │   ├── components/
│   │   │   │   ├── Button.test.jsx          # Button variants & interactions
│   │   │   │   ├── ChatPanel.test.jsx       # Chat panel rendering & a11y
│   │   │   │   ├── ConfirmModal.test.jsx    # Modal behavior & aria attrs
│   │   │   │   ├── DarkModeToggle.test.jsx  # Toggle rendering & a11y
│   │   │   │   ├── ErrorBoundary.test.jsx   # Error fallback UI
│   │   │   │   ├── Input.test.jsx           # Input with icon, suffix & errors
│   │   │   │   ├── ParticipantTile.test.jsx # Tile, video always in DOM
│   │   │   │   └── Skeleton.test.jsx        # Skeleton loading component
│   │   │   ├── context/
│   │   │   │   └── ThemeContext.test.jsx    # Dark mode toggle + localStorage
│   │   │   ├── pages/
│   │   │   │   ├── MeetingCode.test.js      # Code generation & formatting
│   │   │   │   └── MeetingEntryPage.test.js # formatMeetingCode utility
│   │   │   ├── utils/
│   │   │   │   └── mediaHelpers.test.js     # silence() and black() helpers
│   │   │   ├── all.test.js                  # Test suite documentation
│   │   │   └── test-setup.js                # jsdom polyfills & jest-dom setup
│   │   │
│   │   ├── utils/
│   │   │   └── mediaHelpers.js              # Dummy audio/video track generators
│   │   ├── App.jsx                          # Root routing & route guards
│   │   ├── main.jsx                         # Entry point (HelmetProvider)
│   │   ├── index.css                        # Tailwind styles & reduced motion
│   │   └── opengraph-image.jsx              # OG image SVG generator component
│   │
│   ├── .env                                 # Frontend environment variables
│   ├── index.html                           # HTML document template with SEO
│   ├── package.json                         # Dependencies & test scripts
│   ├── tailwind.config.js                   # Tailwind CSS configuration
│   ├── vite.config.js                       # Vite build configuration
│   ├── vitest.config.js                     # Vitest testing configuration
│   └── vercel.json                          # Vercel deployment rewrites
│
├── backend/                                 # Node.js Backend Server
│   ├── src/
│   │   ├── controllers/
│   │   │   ├── authController.js            # Google & Microsoft OAuth handlers
│   │   │   ├── socketManager.js             # WebSocket signaling & XSS sanitize
│   │   │   └── userController.js            # Auth & meeting history handlers
│   │   ├── models/
│   │   │   ├── userModel.js                 # User schema (local + OAuth providers)
│   │   │   └── meetingModel.js              # Meeting schema (30-day TTL index)
│   │   ├── routes/
│   │   │   ├── authRoutes.js                # OAuth redirect & callback routes
│   │   │   └── users.routes.js              # Express routes & express-validator
│   │   ├── middleware/
│   │   │   └── auth.js                      # JWT authentication middleware
│   │   └── app.js                           # Express app & DNS fallback setup
│   │
│   ├── .env                                 # Backend environment variables
│   └── package.json                         # Backend dependencies & engines
│
├── eslint.config.js                         # ESLint 9 Flat Config (React + Node)
├── .prettierrc                              # Prettier code formatting rules
├── .prettierignore                          # Prettier ignore paths
├── .gitignore                               # Git ignore definitions
├── LICENSE                                  # MIT License
└── README.md                                # Project documentation

🚀 Getting Started

Prerequisites

  • Node.js >= 18.0.0 (Recommended: 24.x)
  • MongoDB Atlas account or a local MongoDB database
  • npm package manager

1. Clone the repository

git clone https://github.com/arkaghosh2005/QuickMeet.git
cd quickmeet

2. Configure Environment Variables

Create and configure your .env files in both directories:

Backend (backend/.env):

PORT=3000
NODE_ENV=development
CLIENT_URL=http://localhost:5173
SERVER_URL=http://localhost:3000
MONGO_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/QuickMeet
JWT_SECRET=your_super_secret_key_minimum_64_characters_recommended

# OAuth (optional — set VITE_OAUTH_BUTTONS_CHECK=true in frontend to enable)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
MICROSOFT_CLIENT_ID=your_microsoft_client_id
MICROSOFT_CLIENT_SECRET=your_microsoft_client_secret

Frontend (frontend/.env):

VITE_SERVER_URL=http://localhost:3000
VITE_STUN_URL_1=stun:stun.l.google.com:19302
VITE_STUN_URL_2=stun:stun1.l.google.com:19302
VITE_STUN_URL_3=stun:stun2.l.google.com:19302
VITE_STUN_URL_4=stun:stun3.l.google.com:19302
VITE_STUN_URL_5=stun:stun4.l.google.com:19302

# Optional TURN server for symmetric NAT traversal
VITE_TURN_URL=turn:your-turn-server.com:3478
VITE_TURN_USERNAME=your_username
VITE_TURN_CREDENTIAL=your_credential

# OAuth Buttons (set to true once Google/Microsoft credentials are configured)
VITE_OAUTH_BUTTONS_CHECK=false

3. Install Dependencies & Start Backend

In your first terminal:

cd backend
npm install
npm run dev

The backend starts listening on http://localhost:3000.

4. Install Dependencies & Start Frontend

In your second terminal:

cd frontend
npm install
npm run dev

Open your browser at http://localhost:5173.


🧪 Running Tests

QuickMeet includes 70 automated tests across 13 test files using Vitest and React Testing Library — covering components, context providers, page utilities, and media helpers.

To run the test suite:

# Run tests once in terminal
cd frontend
npm run test:run

# Run tests in interactive watch mode
npm test

⚙️ Environment Variables Reference

Backend (backend/.env)

Variable Description Example
PORT HTTP & WebSocket server port 3000
NODE_ENV Environment mode (development or production) development
CLIENT_URL Allowed CORS origins (comma-separated for multiple) http://localhost:5173
SERVER_URL Backend's own public URL (used for OAuth callback URIs) http://localhost:3000
MONGO_URL MongoDB Atlas or local connection string mongodb+srv://...
JWT_SECRET Secret key used to sign and verify JWT tokens 64+ char random hex
GOOGLE_CLIENT_ID (Optional) Google OAuth 2.0 Client ID From Google Cloud Console
GOOGLE_CLIENT_SECRET (Optional) Google OAuth 2.0 Client Secret From Google Cloud Console
MICROSOFT_CLIENT_ID (Optional) Microsoft Entra App (client) ID From Azure Portal
MICROSOFT_CLIENT_SECRET (Optional) Microsoft Entra Client Secret value From Azure Portal

Frontend (frontend/.env)

Variable Description Example
VITE_SERVER_URL Base URL of the backend server http://localhost:3000
VITE_STUN_URL_1–5 Google public STUN server endpoints stun:stun.l.google.com:19302
VITE_TURN_URL (Optional) TURN server URI turn:openrelay.metered.ca:80
VITE_TURN_USERNAME (Optional) TURN authentication username openrelayproject
VITE_TURN_CREDENTIAL (Optional) TURN authentication credential openrelayproject
VITE_OAUTH_BUTTONS_CHECK Enable (true) or disable (false) Google/Microsoft OAuth buttons false

📚 API Reference

All endpoints are prefixed with /v1. Three rate limiters protect the API:

Limiter Applies To Limit
Auth /v1/users/login, /v1/users/signup 5 requests / 15 min per IP
OAuth /v1/auth/* 20 requests / 15 min per IP
General All other routes 100 requests / 15 min per IP

Authentication Endpoints

POST /v1/users/signup

Registers a new user account with auto-login. Returns a 7-day JWT token.

Request Body:

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "password": "Password123!"
}

Validation Rules:

  • name — Required, letters and spaces only, must include both first and last name
  • email — Required, valid email format
  • password — Min 8 chars, at least one uppercase, one lowercase, one digit, one special character

Responses:

  • 201 Created — Account created and auto-logged in:
    {
      "message": "Account created successfully!",
      "token": "eyJhbGciOiJIUzI1NiIs...",
      "user": {
        "id": "64abc123...",
        "name": "Jane Doe",
        "email": "jane@example.com"
      }
    }
  • 400 Bad Request — Validation error (e.g., weak password, missing last name)
  • 409 Conflict — User with this email already exists
  • 500 Internal Server Error — Server error

POST /v1/users/login

Authenticates a user and returns a 7-day JWT token.

Request Body:

{
  "email": "jane@example.com",
  "password": "Password123!"
}

Validation Rules:

  • email — Required, valid email format
  • password — Required, non-empty

Responses:

  • 200 OK — Authentication successful:
    {
      "token": "eyJhbGciOiJIUzI1NiIs...",
      "user": {
        "id": "64abc123...",
        "name": "Jane Doe",
        "email": "jane@example.com"
      }
    }
  • 400 Bad Request — Validation error
  • 401 Unauthorized — Invalid password
  • 404 Not Found — User not found
  • 500 Internal Server Error — Server error

OAuth 2.0 Endpoints

GET /v1/auth/google

Redirects to Google's OAuth 2.0 consent screen with openid email profile scopes.

GET /v1/auth/google/callback

Handles the Google OAuth callback. Exchanges the authorization code for an access token, retrieves user info, and either creates a new account or links to an existing account with the same email. Redirects to the frontend /auth/callback page with a JWT token and user data as query parameters.

GET /v1/auth/microsoft

Redirects to Microsoft's OAuth 2.0 consent screen with openid profile email User.Read scopes.

GET /v1/auth/microsoft/callback

Handles the Microsoft OAuth callback. Same flow as Google — exchanges code, retrieves profile from Microsoft Graph API, creates or links user, and redirects to the frontend with JWT.

Account Linking: If a user signs up with email/password and later uses OAuth with the same email (or vice versa), the accounts are automatically linked. The authProvider field is updated accordingly.

Note: OAuth buttons are hidden by default. Set VITE_OAUTH_BUTTONS_CHECK=true in the frontend .env after configuring your Google/Microsoft OAuth credentials.


Profile & Account Endpoints

All profile and account endpoints require the Authorization: Bearer <token> header (JWT authentication middleware).

PUT /v1/users/profile

Updates the authenticated user's name, email, and optionally password. Issues a new JWT token with the updated user info.

Request Body:

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "currentPassword": "Password123!",
  "newPassword": "NewPassword456!"
}

Validation Rules:

  • name — Required, letters and spaces only
  • email — Required, valid email format
  • currentPassword — Required for verification
  • newPassword — Optional, minimum 8 characters if provided

Responses:

  • 200 OK — Profile updated, returns new token:
    {
      "message": "Profile updated successfully.",
      "token": "eyJhbGciOiJIUzI1NiIs...",
      "user": {
        "id": "64abc123...",
        "name": "Jane Doe",
        "email": "jane@example.com"
      }
    }
  • 400 Bad Request — Validation error or new password too short
  • 401 Unauthorized — Current password is incorrect
  • 404 Not Found — User not found
  • 409 Conflict — New email already in use by another account
  • 500 Internal Server Error — Server error

POST /v1/users/verify-password

Verifies the user's current password. Used in the delete account confirmation flow.

Request Body:

{
  "password": "Password123!"
}

Responses:

  • 200 OK — { "message": "Password verified." }
  • 400 Bad Request — Password field is missing
  • 401 Unauthorized — Incorrect password
  • 404 Not Found — User not found
  • 500 Internal Server Error — Server error

DELETE /v1/users/account

Permanently deletes the user account and all associated meeting history entries.

Request Body:

{
  "password": "Password123!"
}

Responses:

  • 200 OK — { "message": "Account deleted successfully." }
  • 400 Bad Request — Password field is missing
  • 401 Unauthorized — Incorrect password
  • 404 Not Found — User not found
  • 500 Internal Server Error — Server error

Meeting History Endpoints

All history endpoints require the Authorization: Bearer <token> header.

GET /v1/users/history

Returns all meetings for the logged-in user, sorted by date (newest first). Each entry includes a computed isActive field indicating whether the meeting room currently has active WebSocket connections.

Response: 200 OK

[
  {
    "_id": "64abc123...",
    "user_id": "jane@example.com",
    "meetingCode": "ABC-1234-XYZ",
    "date": "2026-11-01T10:00:00.000Z",
    "isActive": true
  }
]

Note: Meeting entries are automatically deleted after 30 days via a MongoDB TTL index.


POST /v1/users/history

Saves a meeting to the user's history. If the same user + meeting code combination already exists, the timestamp is updated instead of creating a duplicate (upsert behavior).

Request Body:

{
  "meeting_code": "ABC-1234-XYZ"
}

Validation Rules:

  • meeting_code — Must match the format ^[A-Z0-9]{3}-[A-Z0-9]{4}-[A-Z0-9]{3}$

Responses:

  • 201 Created — { "message": "Meeting added to history" }
  • 400 Bad Request — Invalid meeting code format
  • 500 Internal Server Error — Server error

DELETE /v1/users/history

Deletes a specific meeting record from the user's history. Only the owner of the record can delete it.

Request Body:

{
  "meeting_id": "64abc123..."
}

Validation Rules:

  • meeting_id — Required, non-empty

Responses:

  • 200 OK — { "message": "Meeting deleted from history" }
  • 400 Bad Request — Meeting ID is missing
  • 404 Not Found — Meeting not found or does not belong to this user
  • 500 Internal Server Error — Server error

Monitoring

GET /health

Uptime health check endpoint for monitoring probes. Not rate-limited beyond the general limiter.

Response: 200 OK

{
  "status": "ok",
  "uptime": 3600.42
}

📱 Application Flow

Landing Page (Guest Join / Login / Signup)
         │
         ├── Email/Password Login
         │        │
         ├── Google / Microsoft OAuth
         │        │
         │        ▼
         │   OAuth Callback Page
         │   (Auto-login & redirect)
         │        │
         ▼        ▼
  Meeting Entry Page ◄────────────┐
  (Create or Join Meeting)        │
         │                        │
         ├────────────────────────┤
         │                        │
         ▼                        │
    Pre-Call Page         Meeting History Page
  (Preview & Settings)    (View/Rejoin/Delete)
         │
         ▼                 Schedule Meeting Page
    Waiting Room           (Coming Soon)
  (If host enabled)
         │                 Settings Page
         ▼                (Profile & Account)
    Video Call Page
  (Full Meeting Experience)

💖 Sponsor

If you find QuickMeet helpful and would like to support its continued development, consider sponsoring!

GitHub Sponsors Buy Me A Coffee

Your support helps cover hosting costs, development time, and enables new features. Every contribution is greatly appreciated! ☕✨


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ using React, Node.js and WebRTC by Arka Ghosh

About

A real-time MERN Stack Video Conferencing platform built with React and Node.js and features WebRTC peer to peer connections, screen sharing, live chat, and dynamic participant management. The adaptive grid layouts enable the support of multiple simultaneous screen shares.

Topics

Resources

Stars

96 stars

Watchers

0 watching

Forks

Sponsor this project

Contributors

Languages