How phannam151001-dau/cong_nghe_phan_mem works
SanCoPro is a football-pitch discovery and booking application with customer, pitch-owner, and administrator interfaces. The customer workflow is to browse and filter pitches, choose a pitch and time slots, submit a booking, and view a simulated payment QR; authentication is shared across role-based areas. The owner interface manages pitches and payment confirmations, while administrators manage accounts and review platform activity. Wiring is based on sampled React/PHP source and endpoint names in the tree; unsampled endpoint internals and some App data-loading calls are not asserted.
Main entry points: App.jsx App coordinator · AuthContext.jsx Auth state · BookingModal.jsx Booking flow · OwnerSection.jsx Owner console
Components 23
Customer experience
- App coordinator
src/App.jsx - Pitch discovery
src/components/HeroSection.jsx - Pitch filters
src/components/FilterSection.jsx - Pitch listing
src/components/PitchCard.jsx - Booking flow
src/components/BookingModal.jsx - My bookings
src/components/MyBookings.jsx - Payment QR
src/utils/qr.js
Identity and roles
- Sign-in forms
src/components/AuthModal.jsx - Auth state
src/context/AuthContext.jsx
Operations interfaces
- Owner console
src/components/OwnerSection.jsx - Admin console
src/components/AdminSection.jsx
PHP backend
- PHP session
backend/auth_status.php - Login API
backend/login.php - Registration API
backend/register.php - Auth status API
backend/auth_status.php - Logout API
backend/logout.php - Booking API
backend/datsan.php - Owner pitch API
backend/addsan.php - Pitch status API
backend/dongmosan.php - Payment API
backend/thanhtoan.php - Admin API
backend/admin.php - Application database
backend/config.php
Other components
- Customer
Connections 24
- Customer → App coordinator: uses
- App coordinator → Pitch discovery: renders
- App coordinator → Pitch filters: renders
- App coordinator → Pitch listing: renders
- App coordinator → Booking flow: opens
- App coordinator → My bookings: renders
- App coordinator → Sign-in forms: opens
- App coordinator → Owner console: role-gates
- App coordinator → Admin console: role-gates
- Sign-in forms → Auth state: calls
- Auth state → Login API: posts credentials
- Auth state → Registration API: posts registration
- Auth state → Auth status API: loads session
- Auth state → Logout API: requests logout
- Auth status API → PHP session: reads
- Booking flow → Auth state: reads identity
- Booking flow → Booking API: submits booking
- Booking flow → Payment QR: creates QR
- Owner console → Owner pitch API: loads and adds
- Owner console → Pitch status API: changes status
- Owner console → Payment API: confirms payment
- Admin console → Admin API: loads accounts
- Owner pitch API → Application database: queries and writes
- Registration API → Application database: creates account