Skip to content

Morshedul-developer/mediqueue-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ MediQueue Server

The official backend REST API for MediQueue β€” a tutor booking and session management platform. Built with Express.js v5 and MongoDB, it handles all business logic including tutor listings, session bookings, and JWT-authenticated user operations.

πŸ”— Frontend Live Site: https://mediqueue-indol.vercel.app
πŸ“¦ Frontend Repository: mediqueue


✨ Key Features

  • πŸ” JWT Authentication β€” All sensitive routes are protected using jose-cjs for token verification, ensuring only authorized users can access or modify their data.
  • πŸ“‹ Tutor Listing API β€” Provides a clean endpoint to fetch available tutors, consumed by the frontend home page and tutors listing page.
  • πŸ“… Session Booking Management β€” Handles creation and retrieval of tutoring session bookings, scoped per user via email-based queries.
  • ❌ Booking Cancellation β€” Supports PATCH requests to cancel active bookings, with proper status updates persisted in MongoDB.
  • 🌐 CORS Configured β€” Fully configured cross-origin resource sharing to allow secure communication with the deployed frontend.
  • πŸš€ Vercel Ready β€” Includes vercel.json configuration for zero-friction serverless deployment on Vercel.

πŸ› οΈ Tech Stack

Category Technology
Runtime Node.js
Framework Express.js v5
Database MongoDB v7
Authentication jose-cjs (JWT)
Environment dotenv
CORS cors
Deployment Vercel

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB Atlas URI

Installation

# Clone the repository
git clone https://github.com/Morshedul-developer/mediqueue-server.git
cd mediqueue-server

# Install dependencies
npm install

Environment Variables

Create a .env file in the root directory:

MONGODB_URI=your_mongodb_atlas_connection_string
PORT=5000

Run the Server

node index.js

Server will start at http://localhost:5000.


πŸ“‘ API Endpoints

Method Endpoint Description Auth Required
GET /available-tutors Get all available tutors ❌
GET /myBookedSessions?email={email} Get bookings for a specific user βœ…
PATCH /myBookedSessions/:id Cancel a specific booking βœ…

πŸ“ Project Structure

mediqueue-server/
β”œβ”€β”€ index.js          # Entry point β€” Express app, routes, DB connection
β”œβ”€β”€ vercel.json       # Vercel serverless deployment config
β”œβ”€β”€ package.json
└── .env              # Environment variables (not committed)

πŸ”— Related

About

πŸ› οΈ REST API backend for MediQueue β€” built with Express.js v5, MongoDB, and JWT authentication via jose-cjs.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages