Skip to content

Kingsolima/MVP-for-Zweelie

Repository files navigation

MVP for Zweelie feature - Job Booking & Assignment Platform

A complete SaaS MVP for service businesses with job booking, team management, and integrated payments.

Features

  • 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

Tech Stack

  • Frontend: Next.js 15 (TypeScript) + TailwindCSS + shadcn/ui
  • Backend: Next.js API Routes
  • Database: Supabase (PostgreSQL + Auth)
  • Payments: Stripe Checkout
  • Deployment: Vercel

Pages & Routes

  • / - 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 Routes

  • /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

Setup Instructions

1. Environment Variables

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

2. Supabase Setup

  1. Create a new Supabase project
  2. Set up the following tables:

Profiles Table

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()
);

Services Table

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()
);

Jobs Table

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()
);
  1. Enable Row Level Security (RLS) and create policies
  2. Set up Supabase Auth with email confirmation

3. Stripe Setup

  1. Create a Stripe account
  2. Get your API keys from the Stripe dashboard
  3. Set up webhook endpoints for payment confirmation

4. Installation

npm install
npm run dev

5. Database Seeding

Add 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);

Usage

For Customers

  1. Sign up with "customer" role
  2. Browse available services
  3. Book a service with preferred date/time
  4. Complete payment via Stripe
  5. Track job progress

For Owners

  1. Sign up with "owner" role
  2. View all pending jobs
  3. Assign jobs to team members
  4. Monitor job completion
  5. Manage team and services

For Team Members

  1. Sign up with "team" role
  2. View assigned jobs
  3. Mark jobs as completed
  4. Track work history

Development

  • Run npm run dev for development server
  • Run npm run build for production build
  • Run npm run lint for code linting

Deployment

  1. Push code to GitHub
  2. Connect repository to Vercel
  3. Set environment variables in Vercel dashboard
  4. Deploy automatically on push to main branch

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License - see LICENSE file for details

About

MVP for my feature

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors