Skip to content

Instantly share code, notes, and snippets.

@collegeman
Created February 27, 2026 15:30
Show Gist options
  • Select an option

  • Save collegeman/40da5952b62f5d19224e061939e1d50e to your computer and use it in GitHub Desktop.

Select an option

Save collegeman/40da5952b62f5d19224e061939e1d50e to your computer and use it in GitHub Desktop.
Plan: Reverse-Engineer PRD from Existing Codebase (LAX Training Hub)

Plan: Reverse-Engineer PRD from Existing Codebase

Context

The LAX Training Hub codebase was rewritten from a previous stack into Laravel 12 + React/Inertia. Before building new features (using Ralph), we need a comprehensive PRD that documents everything the app currently does so we can review it for completeness, identify gaps, and establish a baseline.

This PRD will be saved to tasks/prd-existing-platform.md — it's a review document, not a build plan. All user stories will reflect implemented functionality.

Deliverable

A single markdown PRD (tasks/prd-existing-platform.md) covering all existing features organized into these sections:

Feature Areas

1. Authentication & User Management

  • Google OAuth login (player or coach intent)
  • Email/password registration & login (Fortify)
  • Forgot password flow
  • User types: player, coach, admin
  • Role-based redirects after login

2. Player Onboarding & Profile

  • Player onboarding wizard
  • Player profile (position, skill level, age group, goals, coaching preferences)
  • Parent contact info fields
  • Preferred location & max travel distance

3. Coach Onboarding (5-step wizard)

  • Step 1: Personal info (title, bio, zipcode, phone, specializations, experience)
  • Step 2: Session rates (individual/group x 30/60 min)
  • Step 3: Stripe Connect setup (account creation, onboarding link, status check)
  • Step 4: Profile photo upload (5MB max)
  • Step 5: First time slot creation (optional)

4. Coach Profile & Discovery

  • Public coach profile page (bio, rates, specializations, ratings, availability)
  • Coach search by position + zipcode + radius (GeocodingService + Haversine distance)
  • Coach matching algorithm (location 25%, position 25%, age group 15%, skill level 15%, specialties 15%, style 10%, ratings 10%, price bonus)
  • Quick matches & recommendations API
  • Search results with time slot expansion + inline quick booking

5. Time Slot Management

  • Coach creates/edits/deletes time slots (date, time range, location, group/individual)
  • Overlap prevention on create/update
  • Deletion blocked if active bookings exist
  • Group slots with capacity (2-10)
  • Location picker (name, address, coordinates, notes)
  • Real-time sync indicator (Reverb)

6. Coach Availability (Recurring Schedules)

  • Weekly recurring availability blocks (day of week + start/end time)
  • CRUD operations per coach
  • Active/inactive toggle

7. Booking Flow (Direct)

  • Player selects time slot → chooses rate (type + duration) → preferred start time → notes
  • Platform fee calculation (15% added to session cost)
  • Stripe PaymentIntent creation → Stripe Elements checkout → confirmation
  • Tip support (preset $5/$10/$15/$20 + custom)
  • Time slot splitting for individual sessions (gaps < 30 min absorbed)
  • Group booking capacity tracking (slot auto-closes when full)

8. Session Requests (Custom Booking)

  • Player requests custom date/time/type/duration from coach
  • 4-hour advance notice minimum
  • Coach accepts → auto-creates time slot + booking → player pays
  • Coach declines → optional response message
  • Auto-expiry cleanup command (session-requests:cleanup)
  • Player can cancel pending requests

9. Booking Management

  • Player view: My Bookings (upcoming/past tabs, status badges, cancel for coaches/admins)
  • Coach view: Dashboard alerts (pending bookings, feedback required, session requests)
  • Calendar view + list view toggle on coach dashboard
  • Coach cancellation → refund processing → SMS/email notification → slot reopened
  • Group session cancellation cancels ALL bookings on that slot

10. Feedback & Ratings

  • Coach submits feedback + rating after session completion
  • Triggers Stripe transfer of coach earnings
  • Player submits rating (1-5) + feedback text
  • Coach average rating updated
  • FeedbackSubmitted notification sent to player

11. Stripe Connect (Coach Payouts)

  • Create Express connected account
  • Generate onboarding link (refresh + return URLs)
  • Account status check (not_created / pending / active)
  • Dashboard link generation
  • Transfer earnings on feedback submission
  • Refund processing on cancellation

12. Notifications

  • BookingConfirmed (email + SMS): sent to both coach and student
  • BookingCancelled (email + SMS): sent to student with refund info
  • CoachWelcome (email): onboarding steps
  • SessionRequestReceived (email + SMS): sent to coach
  • FeedbackSubmitted (email): sent to student
  • SMS channel: Vonage (when sms_opt_in=true + phone number set)

13. Admin Panel

  • Content blocks CRUD (key, title, content, image, ordering)
  • Testimonials CRUD (name, role, content, rating, image, ordering)

14. Landing Page & Marketing

  • Hero section with CTAs
  • Features showcase (3 cards)
  • How it works (3 steps)
  • Testimonials carousel (from CMS)
  • Contact form modal
  • Static stats display
  • Privacy policy + Terms of service pages

15. File Uploads

  • Image uploads (max 5MB)
  • Stored in storage/public/uploads/
  • Returns /storage/ URL

16. Real-time (Reverb)

  • WebSocket connection for time slot updates
  • Events: BookingUpdated, AvailabilityUpdated, TimeSlotUpdated, TimeSlotDeleted, NewSessionRequest, SessionRequestAccepted

Approach

  1. Create tasks/ directory if it doesn't exist
  2. Write tasks/prd-existing-platform.md with full PRD in the format from the /prd skill (Introduction, Goals, User Stories with acceptance criteria, Functional Requirements, Non-Goals, Technical Considerations)
  3. Each user story will have acceptance criteria describing the current behavior (not aspirational)
  4. Stories grouped by feature area, numbered sequentially (US-001 through US-XXX)

Verification

  • Review the PRD against the route catalog, controller actions, and frontend pages to confirm nothing is missed
  • Cross-reference models and services to ensure business logic is captured
  • The user reviews the final document for accuracy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment