# M-Pesa Fundi Connect
M-Pesa Fundi Connect is a modern platform that connects clients with trusted local service providers (fundis, freelancers, artisans, etc.) in Kenya. Clients can find, book, and pay for services securely via M-Pesa, while providers can list, manage, and monetize their services. The platform also features WhatsApp integration for seamless communication and supports both web and mobile users.
## 🌟 Features
- **Role Flexibility:** Any user can act as a client (book services) or a provider (offer services).
- **Service Marketplace:** Browse, search, and request custom services across multiple categories.
- **Provider Dashboard:** Fundis can create, manage, and price their own services.
- **Booking & Payments:** Secure M-Pesa payment gateway for bookings and subscriptions.
- **WhatsApp Integration:** Instantly connect clients and providers via WhatsApp chat.
- **Custom Service Requests:** Users can request services not listed and get matched with providers.
- **Commission & Subscription:** Monetization via lead/job commission and provider subscriptions.
- **Supabase Auth & RLS:** Secure authentication and data access.
## 🚀 Quick Start
### Prerequisites
- Node.js 18+
- npm or yarn
- Supabase account (with required tables and RLS policies)
### Local Development
1. **Clone the repository**
```bash
git clone
cd mpesa-fundi-connect
```
2. **Install dependencies**
```bash
npm install
```
3. **Set up environment variables**
```bash
cp env.example .env.local
```
Edit `.env.local` and add your Supabase, M-Pesa, Twilio, and app credentials.
4. **Start backend (API server)**
```bash
cd mpesa-backend
npm install
npm start
```
5. **Start frontend (Vite dev server)**
```bash
cd ..
npm run dev
```
6. **Open your browser**
Navigate to `
localhost`
## 🏗️ Build & Deployment
- **Build frontend:**
```bash
npm run build
```
- **Deploy:**
- Vercel, Netlify, or any static hosting for frontend
- Render, Railway, or your own server for backend
- **Set envi …