How jjulian10/quadra-aberta works
Quadra Aberta is a court-booking and arena-management web app. Players browse an arena’s schedule, make a reservation, and can use a reservation portal; managers authenticate to manage bookings and payments. The backend persists arenas, courts, bookings, and related records in Supabase, with Edge Functions supporting Pix payments, waitlists, and messaging. Push notifications are another product capability. The README describes the booking and admin experience; sampled source confirms several backend integrations, but does not show all frontend-to-function wiring, so uncertain links are omitted.
Main entry points: schema.sql Supabase database · app.js Booking and admin UI · index.html Web page · index.ts Arena creation
Components 21
Booking and management
- Booking and admin UI
app.js - Web page
index.html - Push client
push.js
Booking services
- Arena creation
supabase/functions/create-arena/index.ts - Reservation lookup
supabase/functions/get-reservation/index.ts - Waitlist enrollment
supabase/functions/join-waitlist/index.ts
Pix payments
- Reservation Pix
supabase/functions/create-pix-payment/index.ts - Pix status check
supabase/functions/check-pix-payment/index.ts - Balance Pix
supabase/functions/create-reservation-balance-pix/index.ts - Balance status check
supabase/functions/check-reservation-balance-payment/index.ts - Payment webhook
supabase/functions/mercado-pago-webhook/index.ts
Messaging and push
- WhatsApp message worker
supabase/functions/process-whatsapp-messages/index.ts - Push subscription
supabase/functions/push-subscription/index.ts - Push delivery worker
supabase/functions/process-push-notifications/index.ts - Service worker
public/sw.js
Supabase data
- Supabase database
supabase/schema.sql - Supabase Auth
Other components
- Player
- Arena manager
- Mercado Pago
- WhatsApp API
Connections 25
- Player → Web page: opens
- Arena manager → Web page: opens
- Web page → Booking and admin UI: loads
- Booking and admin UI → Supabase database: reads and writes
- Booking and admin UI → Push client: invokes
- Booking and admin UI → Supabase Auth: authenticates
- Arena creation → Supabase Auth: validates user
- Arena creation → Supabase database: creates arena
- Reservation lookup → Supabase database: reads reservation
- Waitlist enrollment → Supabase database: checks and records
- Reservation Pix → Supabase database: creates booking
- Reservation Pix → Mercado Pago: creates order
- Pix status check → Supabase database: reads and updates
- Pix status check → Mercado Pago: checks order
- Balance Pix → Supabase database: reads and updates
- Balance Pix → Mercado Pago: creates order
- Balance status check → Supabase database: reads and updates
- Balance status check → Mercado Pago: checks order
- Mercado Pago → Payment webhook: sends events
- Payment webhook → Supabase database: updates payment
- WhatsApp message worker → Supabase database: reads queue and booking
- WhatsApp message worker → WhatsApp API: sends templates
- Push subscription → Supabase database: manages subscriptions
- Push delivery worker → Supabase database: claims events and reads subscriptions
- Push delivery worker → Service worker: delivers notification