SkillBridge is a modern, role-based tutoring marketplace that connects students with verified tutors. Built with a modular backend and a responsive Next.js frontend, it provides seamless booking, availability management, reviews, and admin controls.
- Browse and filter tutors by specialty and rating
- Book tutoring sessions with available slots
- Leave reviews and ratings after completed sessions
- Track all bookings and history
- Manage profile and preferences
- Create and manage professional profiles
- Set hourly rates and availability slots
- Accept and complete bookings
- View student reviews and ratings
- Track earnings and booking history
- Manage users and roles
- Monitor all bookings and transactions
- Create and manage course categories
- View analytics and platform stats
- Moderation tools
- RAG-based tutor recommendations
- Embeddings for semantic search
- Intelligent query responses
- Real-time tutor matching
- Node.js + Express.js
- TypeScript
- Prisma ORM
- PostgreSQL (Neon DB)
- Better Auth (Session-based)
- OpenRouter API (LLM for RAG)
- Next.js 16 (App Router)
- TypeScript
- shadcn/ui (Component library)
- Tailwind CSS
- Server Actions
- Sonner (Toast notifications)
- React Hook Form + Zod (Validation)
- Vercel (Frontend & Backend deployment)
- PostgreSQL (Neon) (Database)
- Git (Version control)
skill-bridge/
βββ backend/ # Express API
β βββ src/
β β βββ modules/
β β β βββ auth/ # Authentication
β β β βββ users/ # User management
β β β βββ tutors/ # Tutor listings
β β β βββ tutor-profile/ # Tutor profiles
β β β βββ bookings/ # Booking logic
β β β βββ reviews/ # Reviews & ratings
β β β βββ categories/ # Course categories
β β β βββ admin/ # Admin operations
β β β βββ rag/ # RAG (AI Search)
β β βββ middlewares/
β β β βββ auth.ts # Role guards
β β β βββ errorHandler.ts
β β βββ lib/
β β β βββ prisma.ts
β β β βββ auth.ts
β β βββ app.ts
β β βββ index.ts
β βββ prisma/
β β βββ schema.prisma # Database schema
β βββ package.json
β βββ vercel.json
β
βββ frontend/ # Next.js App
β βββ src/
β β βββ app/
β β β βββ (commonLayout)/
β β β β βββ page.tsx # Landing
β β β β βββ login/
β β β β βββ register/
β β β β βββ tutors/
β β β βββ (dashboardLayout)/
β β β β βββ dashboard/ # Student dashboard
β β β β βββ tutor/ # Tutor dashboard
β β β β βββ admin/ # Admin dashboard
β β β βββ api/
β β β βββ rag/ # Proxy endpoints
β β βββ components/
β β β βββ modules/ # Feature components
β β β βββ shared/ # Reusable components
β β β βββ ui/ # shadcn components
β β βββ services/ # API service layer
β β βββ actions/ # Server actions
β β βββ hooks/ # Custom hooks
β β βββ constants/ # App constants
β βββ package.json
β βββ next.config.ts
β
βββ README.md # This file
βββ .gitignore
- Provider: Better Auth (Session-based)
- Storage: HTTP-only cookies
- Strategy: JWT tokens with session persistence
| Role | Access Level | Default Route |
|---|---|---|
| STUDENT | Public + Student features | /dashboard |
| TUTOR | Public + Tutor features | /tutor/dashboard |
| ADMIN | All features | /admin |
Backend uses middleware to guard routes:
router.get("/me", auth(UserRole.TUTOR), Controller.getMine);Frontend uses proxy.ts for role-based redirects.
GET /api/tutors # List all tutors
GET /api/tutors/:id # Tutor profile
GET /api/categories # All categories
POST /api/auth/sign-up # Register
POST /api/auth/sign-in # Login
GET /api/bookings # My bookings
POST /api/bookings # Create booking
PATCH /api/bookings/:id/cancel # Cancel booking
POST /api/reviews # Leave review
GET /api/users/me # My profile
PATCH /api/users/me # Update profile
GET /api/tutor/profile/me # My profile
POST /api/tutor/profile # Create profile
PATCH /api/tutor/profile # Update profile
GET /api/tutor/availability # My slots
PUT /api/tutor/availability # Set availability
GET /api/tutor/bookings # My bookings
PATCH /api/bookings/:id/complete
GET /api/tutor/reviews # My reviews
GET /api/admin/stats # Dashboard stats
GET /api/admin/users # Manage users
GET /api/admin/bookings # All bookings
GET /api/admin/categories # Categories
POST /api/admin/categories # Create category
PATCH /api/admin/categories/:id
POST /api/rag/query # AI tutor search
POST /api/rag/index # Index profiles
GET /api/rag/stats # RAG stats
1. Student browses tutors
2. Student selects available slot
3. Booking created β CONFIRMED
4. Tutor completes session
5. Booking β COMPLETED
6. Student leaves review
- Reviews only allowed on COMPLETED bookings
- One review per booking
- Auto-calculates tutor
avgRatingandreviewCount
- Tutors set time slots (startTime, endTime)
- Students book from available slots
- System prevents double-booking
| Model | Purpose |
|---|---|
User |
Authentication & profile |
TutorProfile |
Tutor information |
AvailabilitySlot |
Time slots |
Booking |
Session reservations |
Review |
Ratings & feedback |
Category |
Subject categories |
DocumentEmbedding |
RAG vectors |
- User β TutorProfile (1:1)
- User β Booking (1:many)
- TutorProfile β AvailabilitySlot (1:many)
- TutorProfile β Review (1:many)
- Category β TutorCategory (many:many)
- Node.js 18+
- pnpm (or npm)
- PostgreSQL (Neon)
- Git
git clone https://github.com/khokan/skill-bridge.git
cd skill-bridgecd backend
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env
# Edit .env with your credentials:
# DATABASE_URL=postgres://...
# BETTER_AUTH_SECRET=your_secret
# OPENROUTER_API_KEY=your_key
# Run migrations
pnpm prisma migrate dev
# Start development server
pnpm dev
# Backend runs on https://skillbridge-be.vercel.app/cd frontend
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Frontend runs on http://localhost:3000cd backend
pnpm devcd frontend
pnpm dev- Frontend: https://skillbridge-fe.vercel.app
- Backend API: https://skillbridge-be.vercel.app/
cd backend
pnpm buildcd frontend
pnpm build
pnpm startcd backend
vercel --prodcd frontend
vercel --prodBackend Project:
DATABASE_URL=postgres://...
BETTER_AUTH_SECRET=...
OPENROUTER_API_KEY=...
APP_URL=https://skillbridge-be.vercel.app
FRONTEND_URL=https://skillbridge-fe.vercel.app
Frontend Project:
NEXT_PUBLIC_API_URL=https://skillbridge-be.vercel.app/api
- Tutor profiles are indexed with embeddings
- Queries are converted to vectors
- Semantic search finds relevant profiles
- LLM generates recommendations
POST /api/rag/query
Content-Type: application/json
{
"query": "Math tutor for calculus",
"limit": 5
}Response:
{
"answer": {
"recommendations": [
{
"name": "John Doe",
"reason": "Expert in Calculus",
"matchedCategories": ["Math"],
"strengths": ["Patient", "Clear explanations"]
}
],
"summary": "Found 2 highly-rated calculus tutors"
},
"sources": [...],
"contextUsed": true
}- Built on shadcn/ui components
- Tailwind CSS for styling
- Responsive across all devices
- Dark mode compatible
- Booking modal with calendar
- Availability slot picker
- Review dialog
- Admin dashboards
- Tutor profile cards
- Loading animations
- Toast notifications
Premium animated loading screen with rotating rings and pulsing effects.
- Global error handler middleware
- Consistent JSON error responses
- Prisma transaction rollback
- Detailed console logging
- Server Action error boundaries
- Toast notifications for user feedback
- Fallback error pages
- Network error handling
PORT=5000
DATABASE_URL=postgresql://user:password@host/database
BETTER_AUTH_SECRET=your-secret-key
BETTER_AUTH_URL=http://localhost:5000
APP_URL=http://localhost:3000
OPENROUTER_API_KEY=sk-or-v1-...
OPENROUTER_LLM_MODEL=nvidia/nemotron-3-super-120b-a12b:free
OPENROUTER_EMBEDDING_MODEL=nvidia/llama-nemotron-embed-vl-1b-v2:free
NODE_ENV=developmentNEXT_PUBLIC_API_URL=http://localhost:5000/api- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature/your-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- β Real-time messaging between tutor & student
- β Payment gateway integration (Stripe)
- β Video conferencing integration
- β Advanced analytics & reporting
- β Notification system (email, SMS)
- β Tutor verification system
- β Performance optimizations
- β Mobile app (React Native)
- CORS configuration on Vercel (resolved with proxy)
- Rate limiting on OpenRouter API
For questions or issues, please:
- Check existing GitHub issues
- Create a new issue with detailed description
- Contact: [your-email@example.com]
Built with β€οΈ by the SkillBridge Team
Last Updated: May 3, 2026