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
- π JWT Authentication β All sensitive routes are protected using
jose-cjsfor 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.jsonconfiguration for zero-friction serverless deployment on Vercel.
| Category | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express.js v5 |
| Database | MongoDB v7 |
| Authentication | jose-cjs (JWT) |
| Environment | dotenv |
| CORS | cors |
| Deployment | Vercel |
- Node.js 18+
- MongoDB Atlas URI
# Clone the repository
git clone https://github.com/Morshedul-developer/mediqueue-server.git
cd mediqueue-server
# Install dependencies
npm installCreate a .env file in the root directory:
MONGODB_URI=your_mongodb_atlas_connection_string
PORT=5000node index.jsServer will start at http://localhost:5000.
| 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 | β |
mediqueue-server/
βββ index.js # Entry point β Express app, routes, DB connection
βββ vercel.json # Vercel serverless deployment config
βββ package.json
βββ .env # Environment variables (not committed)
- Frontend Repository: mediqueue
- Live Site: https://mediqueue-indol.vercel.app