-
BookingScreen.jsx
-
useJob()hook is imported -
handleBookingSubmit()function exists -
isBookingstate prevents double-submission - Validation errors show alerts
- Navigation goes to "PriceEstimate" (correct name)
- All data passed to next screen
-
-
PriceEstimateScreen.jsx
-
calculatePriceimported from pricing.js -
useFixedPricingis boolean (not string) - Switch renders correctly
- Breakdown shows itemized costs
- Total price formatted with β¦
- Navigation to NearbyJanitors includes all params
-
-
pricing.js
-
calculatePrice()exports -
calculateFixedPrice()has all service types -
calculateDynamicPrice()has all service types -
getFixedPriceBreakdown()generates correct text -
getDynamicPriceBreakdown()generates correct text -
formatPrice()adds β¦ symbol -
getServiceLabel()has all services
-
-
booking_routes.py
- All 6 endpoints defined
- POST /jobs/book-job validates input
- Creates job with status "confirmed"
- Returns job object
- Error handling for duplicate janitors
- GET endpoints include filtering
-
job_schema.py
-
JobCreatemodel has all fields -
BookJobPayloadmodel validates - Type hints are correct
- Optional fields marked properly
- Imports are correct (Pydantic, datetime)
-
-
main.py
-
booking_routesimported - Router included with
app.include_router() -
/test-connectionreturns proper response - CORS headers set correctly
-
- Supabase Setup
-
jobstable exists - Columns: id, user_id, janitor_id, service_type, status, payment_status, address, latitude, longitude, location, metadata, created_at, updated_at
- Foreign keys set for user_id and janitor_id
- Indexes on user_id and status
- Row security policies enabled (if needed)
-
-
Frontend .env
- SUPABASE_URL is set
- SUPABASE_ANON_KEY is set
- API_URL points to backend
-
Backend .env
- SUPABASE_URL is set
- SUPABASE_KEY is set
- DATABASE_URL is set (if using)
-
Pricing Calculation
- Test fixed pricing with 1-2 rooms
- Test fixed pricing with 3-4 rooms
- Test fixed pricing with 5+ rooms
- Test dynamic pricing calculations
- Test with extras (kitchen, windows)
- Test laundry pricing
- Test fumigation pricing
-
UI/UX
- BookingScreen loads without errors
- Can enter all fields
- PriceEstimate calculates correctly
- Can toggle pricing modes
- Breakdown shows accurate items
- Total price displays correctly
- Navigation works end-to-end
-
API Endpoints
- GET /test-connection returns success
- POST /jobs/create creates job
- POST /jobs/book-job creates booking
- GET /jobs/{id} retrieves job
- GET /jobs/user/{user_id} lists user jobs
- PATCH /jobs/{id} updates status
- DELETE /jobs/{id} cancels job
- Error cases return proper HTTP codes
-
Data Integrity
- User IDs are valid UUIDs
- Janitor IDs are valid UUIDs
- Prices are positive numbers
- Status values are in allowed set
- Metadata JSON is valid
-
Frontend
- No console errors
- Navigation transitions smooth
- No memory leaks from polling
- Images load properly
-
Backend
- Endpoints respond < 500ms
- Database queries optimized
- No N+1 queries
- Error handling doesn't timeout
-
Authentication
- User must be authenticated for jobs
- Can't access other users' jobs
- Janitors can't modify user jobs
-
Input Validation
- All inputs validated on backend
- SQL injection impossible (ORM used)
- No sensitive data in logs
- CORS headers restrict origins
-
Data Protection
- Passwords hashed
- API keys not in code
- Sensitive data encrypted
- All tests passing
- No console errors/warnings
- Code reviewed
- Documentation complete
- Staging environment tested
- Backup of database created
- Error monitoring set up (Sentry, etc)
- Update API_URL to production
- Use production Supabase keys
- Environment variables set on server
- SSL/HTTPS enabled
- Rate limiting configured
- Logging enabled
- Monitoring alerts set up
- Test all endpoints on production
- Monitor error logs
- Check database for issues
- Verify users can complete bookings
- Monitor payment transactions
- Keep backup of live data
| Issue | Solution | Checklist |
|---|---|---|
| Switch state is string | Change default value to true |
[ ] |
| Price calculation wrong | Check calculatePrice params | [ ] |
| 404 on PriceEstimate nav | Make sure screen name is exact | [ ] |
| API endpoint not found | Verify router imported in main.py | [ ] |
| Pricing utility not found | Check import path matches file | [ ] |
| Double submission | Add isBooking state |
[ ] |
| Janitor not assigned | Check janitor_id passed to /book-job | [ ] |
| Cost breakdown empty | Ensure params include rooms/items count | [ ] |
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-11-16 | Initial implementation |
- Monitor pricing accuracy
- Track failed bookings
- Review user feedback
- Update pricing tiers as needed
- Backup database weekly
- Revenue tracking
- User growth metrics
- System performance
- Bug reports
- Feature requests
These files control pricing and booking:
- App/utils/pricing.js - Pricing logic
- App/screens/BookingScreen.jsx - Booking UI
- App/screens/PriceEstimateScreen.jsx - Pricing UI
- app/routes/booking_routes.py - Backend booking
- app/schema/job_schema.py - Data validation
- Check
pricing.js- FIXED_PRICES or DYNAMIC_RATES - Check PriceEstimateScreen - calculatePrice call
- Check backend - metadata storage
- Verify test cases with known inputs
- Check backend logs - /jobs/book-job endpoint
- Check database connection - /test-connection
- Check user/janitor IDs exist in Supabase
- Check request payload format
- Check console for errors
- Check navigation params (PriceEstimate route)
- Check state initialization
- Check imports in screens
- Frontend developer: ____________________
- Backend developer: ____________________
- QA tester: ____________________
- Project manager: ____________________
Ready to ship! π