Uber Énergie is a B2B2C marketplace connecting energy installers (heat pumps, solar panels, insulation) with a network of independent sales reps.
The installer drops batches of 5 qualified appointments. The sales rep picks up a batch, completes the appointments, closes deals. The platform secures payment and guarantees the commission.
Phase 1 goal: functional platform tested with 4-5 installers and 20-50 sales reps. No integrated payments (manual transfers). Validate the concept before investing in Stripe Connect.
If no confirmation within 72h, auto-release. If dispute, admin arbitrates.
users
iduuid PK
emailtext UNIQUE
phonetext
full_nametext
roleenuminstaller | sales_rep | admin
company_nametext?installers only
zonetextdepartment/region
energy_typestext[]heat_pump, solar, insulation...
avatar_urltext?
is_eliteboolP3
stripe_account_idtext?P2
created_attimestamp
batches
iduuid PK
installer_iduuid FK→ users
sales_rep_iduuid? FK→ users
statusenumopen | taken | done | cancelled
priceintin cents
zonetext
energy_typetext
taken_attimestamp?
completed_attimestamp?
created_attimestamp
appointments
iduuid PK
batch_iduuid FK→ batches
client_nametext
client_phonetext
client_addresstext
scheduled_attimestamp
statusenumplanned | completed | signed | installed | cancelled
notestext?
updated_attimestamp
reviews
iduuid PK
batch_iduuid FK
reviewer_iduuid FK
reviewed_iduuid FK
ratingint1-5
commenttext?
created_attimestamp
transactions P2
iduuid PK
batch_iduuid FK
payer_iduuid FKinstaller
payee_iduuid FKsales rep
amountintcents
platform_feeint
statusenumpending | held | released | refunded | disputed
stripe_payment_idtext
released_attimestamp?
referrals P2
iduuid PK
referrer_iduuid FK
referred_iduuid FK
codetext UNIQUE
commission_pctdecimal
expires_attimestamp+6 months
total_earnedintcents
Auth
POST/auth/registersign up (role required)
POST/auth/loginemail/password login
POST/auth/forgot-passwordemail reset
Batches
GET/batcheslist available batches (filter zone, type, price)
POST/batchescreate batch + 5 appointments (installer)
GET/batches/:idbatch detail + appointments
POST/batches/:id/taketake a batch (sales rep)
PUT/batches/:id/cancelcancel batch
Appointments
PUT/appointments/:id/statusupdate status (planned → completed → signed → installed)
PUT/appointments/:idedit appointment info
Profiles & Scoring
GET/users/:id/profilepublic profile + stats + reviews
GET/users/memy profile + my batches
POST/reviewsrate after batch completion
GET/leaderboardsales rep ranking
Payments P2
POST/payments/checkoutbatch payment (Stripe Checkout)
POST/payments/release/:batchIdrelease escrow
POST/payments/dispute/:batchIdopen dispute
POST/subscriptions/createsubscription €59.99/mo (sales rep)
POST/webhooks/stripeStripe webhook events
Admin
GET/admin/dashboardKPIs (batches, revenue, users, conversion rate)
GET/admin/usersuser management
PUT/admin/users/:id/validatevalidate sign-up
GET/admin/disputesopen disputes
Next.js 15 (App Router)
TypeScript
Tailwind CSS
Supabase
PostgreSQL
Supabase Auth
Stripe Connect
Stripe Billing
Vercel
Resend
WhatsApp Business API
Frontend
- Next.js 15 App Router, RSC + Server Actions
- Tailwind + shadcn/ui (components)
- Supabase Realtime for live notifications
- Responsive mobile-first (PWA in P3)
Backend
- Next.js API Routes (no separate backend)
- Supabase: auth, DB, storage, realtime
- Row Level Security (RLS) on Supabase
- Vercel Cron for auto-release escrow 72h
Why Supabase over a custom backend? Auth + DB + Realtime + Storage in one service, free up to 500MB. Row Level Security = native security. Easy to migrate to custom later if needed for scale.