How shaswift324/mapuma-pays works
MarketPay is a server-rendered Laravel system for public-market stall rentals: administrators manage vendors, stalls and fee rates; collectors record payments; vendors and staff can review billing and receipts. The principal collection path routes a collector’s submitted payment through validation and balance checks, creates payment/transaction/ticket records, and returns a ticket response. The README also documents reporting/export, audit history, notifications and role-based access. Edges reflect shown calls or README claims; unsampled implementations and integrations are not inferred.
Main entry points: web.php Role-based routes · PaymentController.php Payment recording · Stall.php Stall billing rules · AuthenticatedSessionController.php Session authentication
Components 26
Access and routing
- Role-based routes
routes/web.php - Session authentication
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Login form
resources/views/auth/login.blade.php - Role and device access
app/Http/Middleware/EnsureUserHasRole.php
Market administration
- Vendor management
app/Http/Controllers/Admin/VendorController.php - Stall registry
app/Http/Controllers/Admin/StallController.php - Fee-rate management
app/Http/Controllers/Admin/FeeRateController.php - Fee rates
app/Models/FeeRate.php - Stall billing rules
app/Models/Stall.php - Calendar billing
app/Support/BillingCalendar.php
Fee collection
- Payment recording
app/Http/Controllers/PaymentController.php - Payment validation
app/Http/Requests/StorePaymentRequest.php - Payments
app/Models/Payment.php - Transactions
app/Models/Transaction.php - Tickets and QR
app/Models/Ticket.php - Receipts
app/Models/Receipt.php - Ticket and receipt views
resources/views/tickets/show.blade.php - Offline collection sync
public/marketpay-offline.js
Reporting and oversight
- Role dashboards
app/Services/DashboardAnalyticsService.php - Report generation
app/Services/ReportService.php - Report exports
app/Services/ReportExportService.php - Audit history
app/Services/AuditLogService.php - Audit log records
app/Models/AuditLog.php - Announcements
app/Http/Controllers/Admin/AnnouncementController.php - User notifications
app/Models/SystemNotification.php
Other components
- Admin, collector, vendor
Connections 31
- Admin, collector, vendor → Role-based routes: requests pages
routes/web.php - Role-based routes → Session authentication: routes login
routes/web.php - Session authentication → Login form: renders
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Role-based routes → Role and device access: applies access
routes/web.php - Role-based routes → Vendor management: routes vendor admin
routes/web.php - Role-based routes → Stall registry: routes stall admin
routes/web.php - Role-based routes → Fee-rate management: routes fee admin
routes/web.php - Role-based routes → Payment recording: routes payment entry
routes/web.php - Role-based routes → Report generation: routes reports
routes/web.php - Role-based routes → Announcements: routes announcements
routes/web.php - Fee-rate management → Fee rates: manages rates
app/Http/Controllers/Admin/FeeRateController.php - Stall registry → Fee rates: selects rates
app/Http/Controllers/Admin/StallController.php - Stall billing rules → Fee rates: resolves applicable rate
app/Models/Stall.php - Stall billing rules → Calendar billing: calculates monthly fee
app/Models/Stall.php - Vendor management → Stall billing rules: computes vendor billing
app/Http/Controllers/Admin/VendorController.php - Payment recording → Payment validation: validates input
app/Http/Controllers/PaymentController.php - Payment recording → Stall billing rules: checks monthly fee
app/Http/Controllers/PaymentController.php - Payment recording → Payments: records payment
app/Http/Controllers/PaymentController.php - Payment recording → Transactions: creates transaction
app/Http/Controllers/PaymentController.php - Payment recording → Tickets and QR: issues ticket
app/Http/Controllers/PaymentController.php - Payment recording → Audit history: records collection action
app/Http/Controllers/PaymentController.php - Payment recording → Ticket and receipt views: returns ticket response
- Offline collection sync → Payment recording: syncs collected payments
- Role-based routes → Ticket and receipt views: routes ticket pages
routes/web.php - Report generation → Report exports: exports reports
app/Http/Controllers/Admin/ReportController.php - Report generation → Payments: reads collection data
app/Services/ReportService.php - Vendor management → Payments: reads payment history
app/Http/Controllers/Admin/VendorController.php - Session authentication → Audit history: records login
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Audit history → Audit log records: writes audit entries
app/Services/AuditLogService.php - Announcements → User notifications: creates announcements
app/Http/Controllers/Admin/AnnouncementController.php - Role-based routes → Role dashboards: routes dashboard
routes/web.php