Skip to content

About

1-on-1 mentorship and advisory platform connecting students with verified industry mentors, featuring interactive slot booking and Razorpay checkout.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MentorSpace

A 1-on-1 Mentorship & Advisory Platform connecting aspiring software engineers, students, and professionals with verified senior industry mentors for personalized guidance across frontend, backend, AI/ML, system design, and competitive programming.

πŸ”— Live Client: https://mentor-space-phi.vercel.app
πŸ“‘ Live Backend API: https://mentorspace-backend-p9t8.onrender.com


1. Project Overview & Architecture

MentorSpace solves the guidance gap in tech education by providing a structured, secure, and frictionless marketplace for booking 1-on-1 mentorship sessions.

High-Level Architecture Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   React 18 Single Page App                β”‚
β”‚       (Vite + Tailwind CSS + Lucide Icons + Axios)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–²β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚ HTTP Requests (REST)      β”‚ JSON Responses
                β–Ό                           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 Express.js REST API Server                β”‚
β”‚    β”œβ”€β”€ JWT Authentication & Role Guards (Student/Mentor)  β”‚
β”‚    β”œβ”€β”€ Express Rate Limiting & Security Middlewares       β”‚
β”‚    β”œβ”€β”€ Razorpay SDK & HMAC-SHA256 Signature Verification  β”‚
β”‚    └── Mongoose ORM Layer                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–²β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚ Queries & Updates         β”‚ Documents
                β–Ό                           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     MongoDB Database                      β”‚
β”‚        (Users, Mentors, Students, Appointments, Payments) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Core Features & User Workflows

A. Student / Mentee Experience

  • Domain-Based Mentor Discovery: Filter mentors across 10+ core tech specializations (React, Node.js, Python, Java, AI/ML, System Design, DevOps, Cloud Architecture, etc.).
  • Rich Mentor Profiles: View verified experience, industry background, pricing rates, bio, rating metrics, and scheduled availability.
  • Interactive Slot Booking: Visual calendar picker for selecting available date and time slots with session objective notes.
  • Razorpay Checkout: Secure in-app checkout with automated order generation and cryptographically verified payment receipts.
  • Student Dashboard: Manage upcoming and past appointments, access meeting links, and track booking statuses.

B. Mentor Workspace

  • Mentor Console: Dedicated dashboard to view incoming session requests with status transitions (Pending β†’ Accepted / Completed / Rejected).
  • Availability Management: Toggle active status, configure weekly availability slots, and set custom pricing.
  • Earnings & Analytics: Track completed sessions, student feedback, and revenue metrics.

3. Data Models & Database Schema

The database is structured into 5 core collections with relational references:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       1:1       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      User       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  Mentor/Student  β”‚
β”‚ (Auth & Role)   β”‚                 β”‚ (Role Profiles)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                                   β”‚
         β”‚ 1:N                               β”‚ 1:N
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Appointment   │◄─────────────────     Payment      β”‚
β”‚(Booking Status) β”‚                 β”‚(Razorpay Orders) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. User (userModel.js): Base credentials, email, hashed password (bcrypt), role (student | mentor), and profile avatar.
  2. Mentor (mentorModel.js): References User, includes bio, company, experience years, domain tags, hourly rate, availability slots, and ratings.
  3. Student (studentModel.js): References User, educational details, career goals, and enrolled appointment IDs.
  4. Appointment (appointmentModel.js): Tracks session lifecycle between a student and mentor (status: PENDING | ACCEPTED | COMPLETED | CANCELLED), date, timeSlot, session notes, and meeting link.
  5. Payment (paymentModel.js): Records Razorpay orderId, paymentId, signature hash, amount (INR), currency, and status (created | captured | failed).

4. API Endpoints Specification

Authentication & User

Method Endpoint Description Auth Required
POST /api/auth/register Register new student or mentor No
POST /api/auth/login Authenticate user & issue JWT token No
GET /api/auth/me Fetch authenticated user profile Yes (JWT)
GET /api/user Fetch basic user details Yes (JWT)

Mentors & Discovery

Method Endpoint Description Auth Required
GET /api/mentor/all List all active mentors with filters No
GET /api/mentor/:id Get detailed mentor profile & slots No
PUT /api/mentor/profile Update mentor bio, pricing, and domains Yes (Mentor)

Appointments & Booking

Method Endpoint Description Auth Required
POST /api/appointment/book Book a new mentorship session Yes (Student)
GET /api/appointment/student Get logged-in student's bookings Yes (Student)
GET /api/appointment/mentor Get incoming bookings for mentor Yes (Mentor)
PATCH /api/appointment/:id/status Accept, reject, or complete session Yes (Mentor/Student)

Payments & Razorpay

Method Endpoint Description Auth Required
POST /api/payment/create-order Initialize Razorpay payment order Yes (Student)
POST /api/payment/verify Verify HMAC-SHA256 payment signature Yes (Student)

5. Technology Stack

  • Frontend:
    • React 18 / React 19 (Hooks, Suspense, Lazy Routing)
    • Vite (Fast HMR & Optimized Bundling)
    • React Router v7 (Client-side routing with role-based ProtectedRoute wrappers)
    • Tailwind CSS (Modern responsive design system)
    • Lucide React (Clean iconography)
    • Axios (Centralized API client with JWT bearer interceptor)
  • Backend:
    • Node.js (ES Modules syntax)
    • Express.js (Modular route controllers & middleware architecture)
    • MongoDB & Mongoose (Schema validation, indexes, and document relations)
    • JSON Web Tokens (jsonwebtoken) & bcrypt password hashing
    • Razorpay Node SDK & Node crypto for cryptographic verification
    • express-rate-limit for DDoS & brute-force mitigation

6. Getting Started & Local Development

Prerequisites

  • Node.js: v20.20.2 (use nvm use 20.20.2)
  • MongoDB: Running locally on mongodb://127.0.0.1:27017 or MongoDB Atlas URI

1. Environment Configuration

Root / Server (.env):

PORT=5001
MONGO_URL=mongodb://127.0.0.1:27017/mentorspace
JWT_SECRET=your_jwt_secret_here
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
RATE_LIMIT_ENABLED=true
RATE_LIMIT_LOGIN=100:15
RATE_LIMIT_REGISTER=100:15
RATE_LIMIT_PAYMENT=100:15

Client (client/vite.config.js or client/.env):

VITE_API_URL=http://localhost:5001/api
VITE_RAZORPAY_KEY_ID=your_razorpay_key_id

2. Installation & Running

Step A: Backend Server (Terminal 1)

cd server
npm install
npm run seed     # Seeds 8 curated mentors across tech domains & students
npm start        # Starts server on http://localhost:5001

Step B: Frontend Client (Terminal 2)

cd client
npm install
npm run dev      # Starts client on http://localhost:5173 (or 5174)

7. Sample Seed Credentials

All seeded test accounts use the universal password: Admin123@

Role Email Domain / Company
Mentor sarahchen@mentorspace.com React β€” Senior Frontend Engineer at Meta
Mentor michaelchang@mentorspace.com Node.js β€” Backend System Architect at Stripe
Mentor davidmiller@mentorspace.com Java β€” Principal Software Engineer at Oracle
Mentor elenarostova@mentorspace.com Python β€” Full Stack Python Lead at Spotify
Mentor drandrewkim@mentorspace.com Machine Learning β€” Staff AI Researcher at Google DeepMind
Mentor jameswilson@mentorspace.com DevOps β€” Senior DevOps Engineer at Amazon AWS
Mentor emmawatson@mentorspace.com UI/UX β€” Lead Product Designer at Airbnb
Mentor priyasharma@mentorspace.com Data Structures β€” Staff Software Engineer at Microsoft
Student rahul@student.com CS Student exploring Full-Stack Careers
Student ananya@student.com Final year student preparing for System Design
Student karan@student.com Self-taught developer focusing on Web Dev

8. License

Distributed under the ISC License. Designed and developed by Sasank Reddy.

About

1-on-1 mentorship and advisory platform connecting students with verified industry mentors, featuring interactive slot booking and Razorpay checkout.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages