A modern, production-ready frontend for a home services marketplace built with Next.js 14, React, and Tailwind CSS.
ServiceHub features a "Desert Sunset" aesthetic with warm earthy tones, combining:
- Primary: Warm orange (#ed751c) for CTAs and highlights
- Secondary: Sage green (#539556) for success states and accents
- Neutral: Rich charcoal and cream for text and backgrounds
Typography uses elegant serif (Cormorant Garamond) for headings and clean sans-serif (DM Sans) for body text.
servicehub/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── auth/
│ │ │ ├── login/ # Login page
│ │ │ └── register/ # Registration page
│ │ ├── categories/ # Service categories listing
│ │ ├── dashboard/ # User dashboard
│ │ ├── masters/
│ │ │ └── [id]/ # Master profile page
│ │ ├── globals.css # Global styles
│ │ ├── layout.js # Root layout
│ │ └── page.js # Home page
│ │
│ ├── components/
│ │ ├── ui/ # Reusable UI components
│ │ │ ├── Avatar.jsx
│ │ │ ├── Badge.jsx
│ │ │ ├── Button.jsx
│ │ │ ├── Card.jsx
│ │ │ ├── Empty.jsx
│ │ │ ├── Input.jsx
│ │ │ ├── Loading.jsx
│ │ │ ├── Modal.jsx
│ │ │ ├── Rating.jsx
│ │ │ ├── Select.jsx
│ │ │ └── index.js
│ │ │
│ │ ├── layout/ # Layout components
│ │ │ ├── Header.jsx
│ │ │ ├── Footer.jsx
│ │ │ └── index.js
│ │ │
│ │ ├── home/ # Home page sections
│ │ │ ├── HeroSection.jsx
│ │ │ ├── CategoriesSection.jsx
│ │ │ ├── HowItWorksSection.jsx
│ │ │ ├── TestimonialsSection.jsx
│ │ │ ├── CTASection.jsx
│ │ │ └── index.js
│ │ │
│ │ ├── masters/ # Master/Pro components
│ │ │ ├── MasterCard.jsx
│ │ │ ├── PortfolioCard.jsx
│ │ │ ├── JobRequestForm.jsx
│ │ │ ├── ImageUploader.jsx
│ │ │ └── index.js
│ │ │
│ │ └── dashboard/ # Dashboard components
│ │ ├── JobRequestCard.jsx
│ │ ├── NotificationItem.jsx
│ │ └── index.js
│ │
│ ├── context/
│ │ └── AuthContext.js # Authentication context
│ │
│ ├── hooks/
│ │ └── index.js # Custom React hooks
│ │
│ └── lib/
│ ├── api.js # API client
│ ├── constants.js # App constants
│ └── utils.js # Utility functions
│
├── public/
│ └── images/ # Static images
│
├── tailwind.config.js # Tailwind configuration
├── next.config.js # Next.js configuration
└── package.json
-
Home Page (
/)- Hero section with search
- Category cards (asymmetric grid)
- How it works (3-step process)
- Testimonials carousel
- CTA section
-
Categories Page (
/categories)- Filter by search, category, region
- Sort options (rating, experience, etc.)
- Master cards grid
- Empty/loading states
-
Master Profile (
/masters/[id])- Full profile with stats
- Portfolio gallery with image preview
- Reviews section
- About section
- Job request form
-
Authentication (
/auth/login,/auth/register)- Role selection (User/Master)
- Form validation
- Social login buttons (UI only)
-
Dashboard (
/dashboard)- Role-based content
- Job requests management
- Notifications
- Profile completion
- UI Kit: Button, Input, Select, Card, Avatar, Badge, Rating, Modal, Loading states
- Reusable: All components are composable and customizable
- Accessible: Proper ARIA labels, keyboard navigation
- Responsive: Mobile-first design
The app expects a REST API with the following endpoints:
AUTH
├── POST /api/auth/login
└── POST /api/auth/register
USERS
├── GET /api/users
└── GET /api/users/:id/full-info
CATEGORIES
├── GET /api/categories
└── GET /api/categories/active-workers
PORTFOLIOS
├── GET /api/portfolios
└── GET /api/portfolios/:id
PORTFOLIO IMAGES
├── GET /api/portfolio-images?portfolio_id=:id
└── POST /api/portfolio-images/upload
COMMENTS
└── GET /api/comments/:portfolioId
JOB REQUESTS
├── POST /api/job-requests
├── GET /api/job-requests/my
├── PATCH /api/job-requests/:id/accept
└── PATCH /api/job-requests/:id/reject
NOTIFICATIONS
└── GET /api/notifications
# Clone the repository
git clone <repo-url>
cd servicehub
# Install dependencies
npm install
# Copy environment file
cp .env.example .env.local
# Start development server
npm run devnpm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintUsing the new App Router for better layouts, loading states, and server components support.
Most pages use 'use client' for rich interactivity while keeping layout as Server Components.
Single AuthContext provides user state and authentication methods across the app.
Reusable hooks for data fetching, forms, debouncing, media queries, etc.
Extended Tailwind with custom colors, typography, shadows, and animations.
| Feature | USER | MASTER | ADMIN |
|---|---|---|---|
| View profiles | ✅ | ✅ | ✅ |
| Submit job requests | ✅ | ❌ | ❌ |
| Accept/Reject jobs | ❌ | ✅ | ✅ |
| Upload portfolio images | ❌ | ❌ | ✅ |
| Manage categories | ❌ | ❌ | ✅ |
- Mobile: < 640px
- Tablet: 640px - 1023px
- Desktop: 1024px+
/* Primary - Desert Orange */
--primary-500: #ed751c;
/* Secondary - Sage Green */
--sage-500: #539556;
/* Neutrals */
--charcoal-950: #1a1a1a;
--charcoal-500: #6d6d6d;
--cream-50: #fefdfb;MIT License - feel free to use this for your own projects!
Built with ❤️ using Next.js, React, and Tailwind CSS