Local parents need a simple way to find and book trusted neighborhood tutors by subject and zip code; tutors want an easy way to list availability and get paid. We’ll know it works when the first paid booking is completed and reviewed.
| Feature | What the user can do | Must/Should |
|---|---|---|
| User accounts & roles | Sign up, choose “Tutor” or “Parent”, log in | Must |
| Tutor profile | List subjects (multiple), hourly rate, zip code, weekly availability slots | Must |
| Parent search | Search tutors by subject and zip code, see profile summary | Must |
| Booking flow | Parent selects a future available slot, pays, booking is confirmed | Must |
| Payments | Parent pays via Stripe; platform keeps 15% fee, tutor gets 85% | Must |
| Post-lesson review | Parent leaves a star rating + text review after session ends | Must |
| Tutor dashboard | See upcoming bookings, past earnings, reviews received | Must |
| Parent dashboard | See upcoming and past bookings, leave reviews | Must |
Explicitly cut from the MVP - In-app messaging between parents and tutors (use email only). - Tutor availability exceptions or one-off dates. - Recurring bookings or subscriptions. - Cancellation or rescheduling by either party. - Payouts via Stripe Connect (record net amount only; manual payout later). - Background checks or identity verification. - Search radius beyond exact zip code match. - Mobile app (web only). - Admin dashboard.
Screens - Home/Landing: Public page showing search bar (subject + zip), featured tutors, sign-up buttons. Used by visitors. - Sign Up / Login: Email + password (or magic link), role selection (Tutor/Parent) on first signup. Used by all. - Tutor Profile Edit: Form for subjects (multi-select), hourly rate, zip code, bio, weekly availability slots (day + start time + end time, repeatable). Used by tutors. - Search Results: List of matching tutors with name, subjects, rate, distance (zip), rating, “Book Now” button. Used by parents. - Tutor Detail: Full profile, list of available weekly slots with specific future dates, “Select Slot” button. Used by parents. - Booking Confirmation: Shows session details, price breakdown (rate + 15% platform fee), payment form. Used by parents. - Parent Dashboard: List of upcoming bookings, past bookings with review button. Used by parents. - Tutor Dashboard: List of upcoming sessions, past sessions, total earnings, received reviews. Used by tutors. - Review Form: Star rating (1-5) + optional text, submitted after session end time. Used by parents.
Flows 1. Sign-up flow 1. Visitor clicks Sign Up on home. 2. Enters email and password, selects role (Tutor or Parent). 3. Account created with role; redirected to role-specific onboarding (profile edit for tutors, search for parents).
Slots are saved and shown as available on their profile.
Core booking flow
Booking status changes to confirmed; both users see it in dashboards.
Review flow
| Entity | Key fields | Relationships | Server-only / privileged fields |
|---|---|---|---|
| User | id, email, role (tutor/parent), display_name, created_at | - | role |
| TutorProfile | id, user_id, subjects (array of strings), hourly_rate, zip_code, bio, average_rating, review_count | One-to-one with User (tutors only) | average_rating, review_count |
| AvailabilitySlot | id, tutor_profile_id, day_of_week (0-6), start_time (minutes past midnight), end_time (minutes past midnight) | Many-to-one with TutorProfile | - |
| Booking | id, tutor_profile_id, parent_user_id, start_time (full datetime), end_time (full datetime), status (pending, confirmed, completed, cancelled), price_cents, platform_fee_cents, tutor_payout_cents, created_at, payment_intent_id | Many-to-one with TutorProfile and User (parent) | status, price_cents, platform_fee_cents, tutor_payout_cents |
| Review | id, booking_id, parent_user_id, tutor_profile_id, rating (1-5), comment, created_at | One-to-one with Booking; many-to-one with TutorProfile | - |
Notes - Status values: pending is set on booking creation by the server; confirmed is set by successful payment webhook; completed is set automatically by a background process when current time passes the booking end_time; cancelled is set by the server when the 15-minute payment window expires. - Availability uses weekly recurring slots. Specific booking times are checked against these slots plus existing confirmed or pending bookings (with 15-minute timeout) to prevent double-booking using database overlap constraints on time ranges. - Price, fee, and payout amounts are calculated and locked on the server at booking creation (rate copied from tutor profile at that moment). Platform fee is always 15%. - Every entity is used by at least one screen or flow. No unused fields.
| Layer | Choice | Why |
|---|---|---|
| Frontend | Next.js (App Router) + Tailwind + shadcn/ui | Fast to build responsive web UI; works well with AI coding tools like Lovable or Bolt |
| Backend & Database | Supabase (Postgres + Auth + Edge Functions) | Built-in auth, realtime, easy row-level security; handles bookings and availability constraints |
| Payments | Stripe (Checkout + Webhooks) | Secure card handling, reliable webhooks for confirming bookings |
| Hosting | Vercel | One-click deploy from GitHub, automatic previews, works perfectly with Next.js |
| AI Coding Tool | Lovable, Bolt, or Cursor | Any of these can follow the build prompts below |
Project setup
Create a new Next.js 15 app with Supabase integration, Tailwind, and shadcn/ui components. Set up environment variables for Supabase URL, anon key, service role key, Stripe publishable key, and Stripe secret key. Initialize the Supabase project with auth enabled. Check: The app runs locally, you can sign up with email, and no secret keys appear in the browser.
Data model & database
Create the database tables for User, TutorProfile, AvailabilitySlot, Booking, and Review exactly matching the Data Model. Add appropriate indexes and constraints to prevent overlapping time ranges on bookings for the same tutor. Implement row-level security policies that match the Security & Integrity requirements. Check: All tables exist, row-level security prevents cross-user data access, and overlap constraint blocks double-booking.
Authentication & role selection
Build the Sign Up / Login screens with role selection (tutor or parent) on first signup. Store role in the User table. Protect routes so only logged-in users can access dashboards and only tutors can edit profiles. Check: New users can choose role, cannot change it later, and are redirected to the correct dashboard.
Tutor profile & availability
Build the Tutor Profile Edit screen and backend logic. Allow tutors to set subjects, hourly_rate, zip_code, bio, and multiple weekly AvailabilitySlot entries. Display availability on the Tutor Detail page as a list of upcoming concrete dates/times derived from the weekly slots. Check: Tutors can save and update their profile; availability appears correctly on their detail page.
Search and discovery
Build the Home search bar and Search Results screen. Filter tutors by subject (any match) and exact zip_code. Show summary cards with rating. Link to Tutor Detail using the public token. Check: Parents can search and only see matching tutors; results update when search inputs change.
Booking and payment flow
Implement the Tutor Detail, Booking Confirmation, and payment screens using Stripe Checkout. On form submit, create a pending Booking with server-calculated price (hourly_rate × 100), 15% platform fee, and 85% payout. On successful webhook, update status to confirmed. Enforce availability overlap check at creation and use a 15-minute timeout for pending bookings. Check: Full flow from search to paid booking works; slot is no longer available to others; dashboards update.
Dashboards and reviews
Build Parent Dashboard and Tutor Dashboard. Show upcoming and past bookings. Add Review Form that appears only after a booking’s end_time has passed and only for the correct parent. Calculate and store average_rating and review_count on TutorProfile. Check: Reviews appear only for eligible users and update tutor ratings correctly.
Notifications & status automation
Add a background process that automatically sets Booking status to completed when current time > end_time. Send simple email confirmations on booking and review (use Supabase or Resend). On payment failure, timeout, or error after a successful authorization, automatically release the hold with no charge to the parent. Set the Stripe Checkout session to expire after 15 minutes; if a payment webhook arrives for a booking whose hold was already released, refund it automatically in full and email the parent. Check: Status updates automatically; users see correct upcoming vs past sections.
Security self-check
Write and run automated tests (or manually step through as three different actors: logged-out visitor, a parent, and a tutor) that verify every single requirement listed in section 6. For each requirement (1-10), attempt the forbidden action and confirm it is blocked. Report pass/fail for all ten items with evidence. Fix any failures before continuing. Check: All ten security requirements pass.
Polish and deploy
> Add basic responsive styling, loading states, error messages, and success toasts. Deploy the full app to Vercel, configure Stripe webhook endpoint, and set all environment variables. Provide the live URL. Check: The deployed app works end-to-end from search to paid booking and review.
Before launch, get a Launch-Ready Audit ($199): a human-reviewed check of your actual code against this spec's security requirements. https://buy.stripe.com/14AfZj9cPdJB0r45osbMQ01
Sample deliverable. AI-generated and human-reviewed; may contain mistakes; not legal, financial, or security advice.