How jesusescalante/topgol works
TOP GOL is a PHP MVC platform for sports-complex reservations and administration. The main workflow runs from a customer’s web request through the front controller and router to reservation handling, availability checks, and reservation records; payment and notification handling support that flow. Separate administrative branches manage facilities, event spaces, POS sales, inventory, and financial reporting. The README also documents Google OAuth and Telegram notifications. Relationships below follow shown routes, excerpts, source-index references, and README capabilities; several subsystem internals were not sampled.
Main entry points: ReservaController.php Reservation workflow · Venta.php Sales transactions · Pago.php Payment records · Producto.php Product inventory
Components 27
Web application
- HTTP entry
public/index.php - Route dispatch
app/Core/Router.php - Controller base
app/Core/Controller.php - Authentication
app/Controllers/AuthController.php
Reservations and facilities
- Reservation workflow
app/Controllers/ReservaController.php - Court management
app/Controllers/CanchaController.php - Event spaces
app/Controllers/EspacioController.php - Reservation records
app/Models/Reserva.php - Court availability
app/Models/Cancha.php - Space records
app/Models/Espacio.php
Operations and finance
- Payments and till
app/Controllers/PagoController.php - Payment records
app/Models/Pago.php - POS sales
app/Controllers/VentaController.php - Sales transactions
app/Models/Venta.php - Catalog and stock
app/Controllers/ProductoController.php - Product inventory
app/Models/Producto.php - Inventory ledger
app/Models/MovimientoInventario.php - Admin dashboard
app/Controllers/UsuarioController.php - Financial reports
app/Controllers/ReporteController.php
Data and integrations
- Google OAuth
app/Services/GoogleOAuth.php - Notifications
app/Models/Notificacion.php - Telegram alerts
app/Services/TelegramNotifier.php - PDO model layer
app/Core/Model.php - MySQL database
app/Config/Database.php
Other components
- Customer / staff
- Telegram / CallMeBot
Connections 31
- Customer / staff → HTTP entry: sends request
README.md - HTTP entry → Route dispatch: dispatches routes
public/index.php - Route dispatch → Reservation workflow: routes reservations
public/index.php - Route dispatch → Authentication: routes authentication
public/index.php - Reservation workflow → Controller base: extends
app/Controllers/ReservaController.php - Authentication → Controller base: extends
app/Controllers/AuthController.php - Authentication → Google OAuth: uses OAuth
app/Controllers/AuthController.php - Google → Google OAuth: authenticates
README.md - Reservation workflow → Court availability: checks courts
app/Controllers/ReservaController.php - Reservation workflow → Reservation records: creates reservations
app/Controllers/ReservaController.php - Reservation workflow → Payment records: records advances
app/Controllers/ReservaController.php - Reservation workflow → Telegram alerts: sends reservation alert
app/Controllers/ReservaController.php - Court management → Court availability: manages courts
app/Controllers/CanchaController.php - Event spaces → Space records: manages spaces
app/Controllers/EspacioController.php - Event spaces → Telegram alerts: sends alerts
app/Controllers/EspacioController.php - Payments and till → Payment records: handles payments
app/Controllers/PagoController.php - POS sales → Sales transactions: records sales
app/Controllers/VentaController.php - Catalog and stock → Product inventory: manages products
app/Controllers/ProductoController.php - Sales transactions → Product inventory: updates stock
app/Models/Venta.php - Sales transactions → Inventory ledger: records movements
app/Models/Venta.php - Product inventory → Inventory ledger: records adjustments
app/Models/Producto.php - Admin dashboard → Sales transactions: summarizes sales
app/Controllers/UsuarioController.php - Admin dashboard → Product inventory: checks stock
app/Controllers/UsuarioController.php - Financial reports → Payment records: queries income
app/Controllers/ReporteController.php - Financial reports → Sales transactions: queries sales
app/Controllers/ReporteController.php - Reservation workflow → Notifications: uses notices
app/Controllers/ReservaController.php - Telegram alerts → Telegram / CallMeBot: sends messages
README.md - Reservation records → Payment records: synchronizes payments
app/Models/Reserva.php - Reservation records → Court availability: checks conflicts
app/Models/Reserva.php - Payment records → PDO model layer: inherits data access
app/Models/Pago.php - PDO model layer → MySQL database: gets PDO connection
app/Core/Model.php