SkillBridge is a full-stack tutoring platform where students can discover expert tutors, book lesson slots, and pay securely via Stripe. This repository contains the Next.js frontend powering the user interface.
π Live Site: https://skillbridge-frontend-plum.vercel.app π Backend Repo: skillbridge-backend
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS v4 |
| UI Components | shadcn/ui (Radix UI primitives) |
| Forms | TanStack React Form + Zod v4 validation |
| Authentication | Better Auth (client SDK with session cookies) |
| State/Fetching | Next.js Server Actions + Server Components |
| Animations | Framer Motion |
| Smooth Scroll | Lenis |
| Charts | Recharts (Bar + Area charts) |
| Notifications | Sonner (toasts) + SweetAlert2 (modals) |
| Carousel | Embla Carousel |
| Theming | next-themes (one-click light/dark toggle) |
| Runtime | Bun |
| Deployment | Vercel |
- Public Tutor Discovery β Browse, search, and filter tutors by name, category, rating, and hourly rate with a sticky sidebar filter panel.
- Rich Tutor Detail Pages β Full tutor profile with cover image, skills/tags, availability schedule, reviews, and a "Related Tutors" recommendation section.
- Role-Based Dashboards β Three parallel dashboard layouts using Next.js parallel routes:
@student,@tutor, and@admin, each with tailored views. - Analytics Charts β Visual dashboard statistics using Recharts AreaCharts and BarCharts, populated from live
/statsbackend endpoints. - Booking System β Students browse tutor availability and book time slots with confirmation modals and real-time status updates.
- Stripe Checkout β Seamless payment flow with redirect to Stripe Checkout (EUR) and a dedicated payment success page with transaction details.
- Edge Middleware Auth β Server-side route protection that validates sessions and enforces role-based access before pages load.
- Redirect Chain Preservation β Login/Register flows preserve the user's intended destination across authentication steps (including the register β login β destination chain).
- Demo Login Buttons β One-click credential fill for Student, Tutor, and Admin demo accounts on the login page.
- Dynamic Subjects Navbar β The "Subjects" dropdown in the navbar is populated dynamically from the categories API at render time, linking directly to filtered tutor listings.
- Floating AI Chatbot (Bridget) β A premium floating chatbot widget visible on all public and dashboard pages, ready for OpenRouter AI integration.
- Dark / Light Mode β Full one-click theme toggle powered by
next-themesand theModeTogglecomponent. - Responsive Design β Fully responsive layout with a collapsible sidebar, mobile sheet navigation, and adaptive grid layouts.
- Micro-Animations β Premium hover effects on tutor cards (lift + image zoom), smooth transitions, and interactive filter states powered by Framer Motion.
- Dynamic Avatars β Integrates the DiceBear API to automatically generate unique, deterministic, and highly colorful vector avatars for students and tutors who do not upload a custom profile picture.
- About & Contact Pages β Fully designed pages with core values, team section, contact form, and support information.
src/
βββ app/
β βββ (auth)/ # Login & Register pages
β β βββ login/
β β βββ register/
β βββ (public)/ # Public pages (homepage, tutors, tutor details)
β β βββ page.tsx # Homepage (8-section landing page)
β β βββ about/ # About Us page
β β βββ contact/ # Contact page
β β βββ tutors/
β βββ (dashboard)/ # Protected dashboard (parallel routes)
β β βββ @admin/ # Admin dashboard views
β β βββ @student/ # Student dashboard views
β β βββ @tutor/ # Tutor dashboard views
β β βββ layout.tsx # Shared sidebar layout
β βββ globals.css
β βββ layout.tsx # Root layout (fonts, providers, metadata)
β βββ not-found.tsx # Custom 404 page
βββ actions/ # Next.js Server Actions
βββ components/
β βββ layout/ # App sidebar, navbar, footer, mode toggle, FloatingChat
β βββ modules/ # Feature-specific components
β β βββ authentication/ # Login/Register forms (with demo login buttons)
β β βββ dashboard/ # Dashboard components (per-role, with charts)
β β βββ home/ # Homepage sections (hero, stats, categories, tutors, etc.)
β β βββ shared/ # Shared components (profile card, logo)
β β βββ tutors/ # Tutor cards, filters, grid, detail page
β βββ ui/ # shadcn/ui primitives
βββ constants/ # Role enums, booking statuses
βββ hooks/ # Custom React hooks
βββ lib/ # Auth client, utilities
βββ middleware.ts # Edge middleware (route protection)
βββ providers/ # Theme & context providers
βββ routes/ # Role-based route definitions
βββ services/ # API service layer (tutor, booking, payment, etc.)
βββ types/ # TypeScript type definitions
| Route | Description |
|---|---|
/ |
Homepage with 8 sections (Hero, Stats, Features...) |
/tutors |
Tutor directory with search, filters, and pagination |
/tutors/:id |
Individual tutor profile with availability & reviews |
/about |
About Us page with values and team |
/contact |
Contact page with form |
/login |
User login (with demo credential buttons) |
/register |
User registration |
| Route | Role | Description |
|---|---|---|
/dashboard |
All | Role-specific overview with charts |
/dashboard/profile |
All | Edit user profile |
/dashboard/bookings |
All | View bookings (role-filtered) |
/dashboard/create-booking |
Student | Book a tutor's availability slot |
/dashboard/payment/payment-success |
Student | Post-payment confirmation page |
/dashboard/tutor-profile |
Tutor | Manage tutor profile |
/dashboard/teaching-categories |
Tutor | Manage teaching categories |
/dashboard/availability |
Tutor | Create/delete availability slots |
/dashboard/manage-tutors |
Admin | Manage all tutors on the platform |
/dashboard/manage-users |
Admin | Manage all users (ban, role change) |
/dashboard/manage-categories |
Admin | CRUD for teaching categories |
A floating AI assistant widget (FloatingChat.tsx) is embedded in both the public and dashboard layouts. It features:
- Animated open/close FAB button with pulse ring
- Typing indicator (bouncing dots)
- Suggested quick-reply questions on first open
- Unread message badge when closed
- Context-aware mock responses for tutors, subjects, booking, and pricing questions
- Ready for OpenRouter AI integration β replace the
getMockResponse()function with a live API call
- Node.js v20+ (or Bun)
- A running skillbridge-backend instance
git clone https://github.com/Rezwan66/skillbridge-frontend.git
cd skillbridge-frontend
npm installCreate a .env file in the project root:
# BACKEND_URL=https://skillbridge-backend-phi.vercel.app
BACKEND_URL=http://localhost:5000
FRONTEND_URL=http://localhost:3000
# NEXT_PUBLIC_BACKEND=https://skillbridge-backend-phi.vercel.app
NEXT_PUBLIC_BACKEND=http://localhost:5000
NEXT_PUBLIC_FRONTEND=http://localhost:3000
# API_URL=https://skillbridge-backend-phi.vercel.app
API_URL=http://localhost:5000
# AUTH_URL=https://skillbridge-backend-phi.vercel.app/api/auth
AUTH_URL=http://localhost:5000/api/auth
NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
# NEXT_PUBLIC_BACKEND_URL=https://skillbridge-backend-phi.vercel.appnpm run devThe app will start at http://localhost:3000.
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
- Users register with name, email, password, and role (Student or Tutor).
- Login creates a session cookie via Better Auth.
- Demo Login buttons on the login page auto-fill credentials for Student, Tutor, and Admin roles.
- Edge Middleware intercepts all
/dashboard/*routes, validates the session against the backend, and enforces role-based access. - Protected route redirects preserve the intended destination through
?redirectPath=query parameters β even across the Register β Login chain.
Deploy to Vercel with zero configuration:
- Push to GitHub
- Import into Vercel
- Set environment variables (point
API_URLandAUTH_URLto your deployed backend) - Deploy
Check out the Next.js deployment docs for more details.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS v4 |
| UI Components | shadcn/ui (Radix UI primitives) |
| Forms | TanStack React Form + Zod v4 validation |
| Authentication | Better Auth (client SDK with session cookies) |
| State/Fetching | Next.js Server Actions + Server Components |
| Notifications | Sonner (toasts) + SweetAlert2 (modals) |
| Carousel | Embla Carousel |
| Theming | next-themes (light/dark mode) |
| Runtime | Bun |
| Deployment | Vercel |
- Public Tutor Discovery β Browse, search, and filter tutors by name, category, rating, and hourly rate with a sticky sidebar filter panel.
- Role-Based Dashboards β Three parallel dashboard layouts using Next.js parallel routes:
@student,@tutor, and@admin, each with tailored views. - Booking System β Students browse tutor availability and book time slots with confirmation modals and real-time status updates.
- Stripe Checkout β Seamless payment flow with redirect to Stripe Checkout (EUR) and a dedicated payment success page with transaction details.
- Edge Middleware Auth β Server-side route protection that validates sessions and enforces role-based access before pages load.
- Redirect Chain Preservation β Login/Register flows preserve the user's intended destination across authentication steps (including the register β login β destination chain).
- Dark Mode β Full light/dark theme toggle powered by
next-themes. - Responsive Design β Fully responsive layout with a collapsible sidebar, mobile sheet navigation, and adaptive grid layouts.
- Micro-Animations β Premium hover effects on tutor cards (lift + image zoom), smooth transitions, and interactive filter states.
- Dynamic Avatars β Integrates the DiceBear API to automatically generate unique, deterministic, and highly colorful vector avatars for students and tutors who do not upload a custom profile picture.
src/
βββ app/
β βββ (auth)/ # Login & Register pages
β β βββ login/
β β βββ register/
β βββ (public)/ # Public pages (homepage, tutors, tutor details)
β β βββ page.tsx # Homepage
β β βββ tutors/
β βββ (dashboard)/ # Protected dashboard (parallel routes)
β β βββ @admin/ # Admin dashboard views
β β βββ @student/ # Student dashboard views
β β βββ @tutor/ # Tutor dashboard views
β β βββ layout.tsx # Shared sidebar layout
β βββ globals.css
β βββ layout.tsx # Root layout (fonts, providers, metadata)
β βββ not-found.tsx # Custom 404 page
βββ actions/ # Next.js Server Actions
βββ components/
β βββ layout/ # App sidebar, navbar, footer, mode toggle
β βββ modules/ # Feature-specific components
β β βββ authentication/ # Login/Register forms
β β βββ dashboard/ # Dashboard components (per-role)
β β βββ home/ # Homepage sections (hero, featured, marquee)
β β βββ shared/ # Shared components (profile card, logo)
β β βββ tutors/ # Tutor cards, filters, grid
β βββ ui/ # shadcn/ui primitives
βββ constants/ # Role enums, booking statuses
βββ hooks/ # Custom React hooks
βββ lib/ # Auth client, utilities
βββ middleware.ts # Edge middleware (route protection)
βββ providers/ # Theme & context providers
βββ routes/ # Role-based route definitions
βββ services/ # API service layer (tutor, booking, payment, etc.)
βββ types/ # TypeScript type definitions
| Route | Description |
|---|---|
/ |
Homepage with featured tutors and testimonials |
/tutors |
Tutor directory with search and filters |
/tutors/:id |
Individual tutor profile with availabilities |
/login |
User login |
/register |
User registration |
| Route | Role | Description |
|---|---|---|
/dashboard |
All | Role-specific overview |
/dashboard/edit-profile |
All | Edit user profile |
/dashboard/bookings |
All | View bookings (role-filtered) |
/dashboard/create-booking |
Student | Book a tutor's availability slot |
/dashboard/payment/payment-success |
Student | Post-payment confirmation page |
/dashboard/tutor-profile |
Tutor | Manage tutor profile |
/dashboard/teaching-categories |
Tutor | Manage teaching categories |
/dashboard/availability |
Tutor | Create/delete availability slots |
/dashboard/manage-tutors |
Admin | Manage all tutors on the platform |
/dashboard/manage-users |
Admin | Manage all users (ban, role change) |
/dashboard/manage-categories |
Admin | CRUD for teaching categories |
- Node.js v20+ (or Bun)
- A running skillbridge-backend instance
git clone https://github.com/Rezwan66/skillbridge-frontend.git
cd skillbridge-frontend
npm installCreate a .env file in the project root:
# BACKEND_URL=https://skillbridge-backend-phi.vercel.app
BACKEND_URL=http://localhost:5000
FRONTEND_URL=http://localhost:3000
# NEXT_PUBLIC_BACKEND=https://skillbridge-backend-phi.vercel.app
NEXT_PUBLIC_BACKEND=http://localhost:5000
NEXT_PUBLIC_FRONTEND=http://localhost:3000
# API_URL=https://skillbridge-backend-phi.vercel.app
API_URL=http://localhost:5000
# AUTH_URL=https://skillbridge-backend-phi.vercel.app/api/auth
AUTH_URL=http://localhost:5000/api/auth
NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
# NEXT_PUBLIC_BACKEND_URL=https://skillbridge-backend-phi.vercel.appnpm run devThe app will start at http://localhost:3000.
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
- Users register with name, email, password, and role (Student or Tutor).
- Login creates a session cookie via Better Auth.
- Edge Middleware intercepts all
/dashboard/*routes, validates the session against the backend, and enforces role-based access. - Protected route redirects preserve the intended destination through
?redirectPath=query parameters β even across the Register β Login chain.
Deploy to Vercel with zero configuration:
- Push to GitHub
- Import into Vercel
- Set environment variables (point
API_URLandAUTH_URLto your deployed backend) - Deploy
Check out the Next.js deployment docs for more details.

