A complete SaaS MVP for service businesses with job booking, team management, and integrated payments.
- User Authentication: Role-based access control (Customer, Owner, Team)
- Job Booking: Customers can book services with date/time selection
- Team Management: Owners can assign jobs to team members
- Job Tracking: Complete visibility into job status from booking to completion
- Payment Integration: Stripe Checkout for secure payments
- Responsive Design: Modern UI built with TailwindCSS and shadcn/ui
- Frontend: Next.js 15 (TypeScript) + TailwindCSS + shadcn/ui
- Backend: Next.js API Routes
- Database: Supabase (PostgreSQL + Auth)
- Payments: Stripe Checkout
- Deployment: Vercel
/- Landing page with hero, features, and CTA/login- Authentication (sign up/sign in with role selection)/book- Customer booking page/dashboard/owner- Owner dashboard for job management/dashboard/team- Team dashboard for assigned jobs
/api/services- Fetch available services/api/book- Create job and Stripe checkout session/api/assign- Assign job to team member/api/complete- Mark job as completed
Create a .env.local file in the root directory with:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Stripe Configuration
STRIPE_SECRET_KEY=your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
# Application Configuration
NEXT_PUBLIC_BASE_URL=http://localhost:3000- Create a new Supabase project
- Set up the following tables:
CREATE TABLE profiles (
id UUID REFERENCES auth.users(id) PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
full_name TEXT,
role TEXT CHECK (role IN ('customer', 'owner', 'team')) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);CREATE TABLE services (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
price DECIMAL(10,2) NOT NULL,
duration_minutes INTEGER,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);CREATE TABLE jobs (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
customer_id UUID REFERENCES profiles(id) NOT NULL,
assigned_to UUID REFERENCES profiles(id),
service_id UUID REFERENCES services(id) NOT NULL,
status TEXT CHECK (status IN ('pending', 'assigned', 'completed', 'cancelled')) DEFAULT 'pending',
stripe_payment_intent_id TEXT,
stripe_session_id TEXT,
scheduled_date TIMESTAMP WITH TIME ZONE,
completed_at TIMESTAMP WITH TIME ZONE,
notes TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);- Enable Row Level Security (RLS) and create policies
- Set up Supabase Auth with email confirmation
- Create a Stripe account
- Get your API keys from the Stripe dashboard
- Set up webhook endpoints for payment confirmation
npm install
npm run devAdd some sample services to get started:
INSERT INTO services (name, description, price, duration_minutes) VALUES
('House Cleaning', 'Complete home cleaning service', 150.00, 120),
('Lawn Maintenance', 'Weekly lawn care and maintenance', 75.00, 60),
('Plumbing Repair', 'Emergency plumbing services', 200.00, 90);- Sign up with "customer" role
- Browse available services
- Book a service with preferred date/time
- Complete payment via Stripe
- Track job progress
- Sign up with "owner" role
- View all pending jobs
- Assign jobs to team members
- Monitor job completion
- Manage team and services
- Sign up with "team" role
- View assigned jobs
- Mark jobs as completed
- Track work history
- Run
npm run devfor development server - Run
npm run buildfor production build - Run
npm run lintfor code linting
- Push code to GitHub
- Connect repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details