How wdfjcnvp/smarticct works
Purpose and Entry Points
This is a Laravel PHP application for passenger transport operations: vehicle queues, routes/schedules, RFID/card fare handling, top-ups, rental/trip requests, and role-specific admin, cashier, commuter, and operator workflows. HTTP starts at public/index.php, boots through bootstrap/app.php, and is exposed through routes/web.php and routes/api.php.
Delivery and Access Boundary
Web routes serve Blade-based dashboards and public/account flows; API controllers support card registration, card operations, and vehicle skipping. Role authorization is centralized in middleware and dashboard controllers split presentation by actor type.
• app/Http/Middleware/RoleMiddleware.php
• app/Http/Controllers/Web/User/AdminPanelController.php
• app/Http/Controllers/Api/RfidCardRegistrationController.php
Transport Queue and Departure Flow
Queue management is the operational core. Queue, vehicle, vehicle-group, terminal, route, schedule, and travel-record entities model dispatch state. Queue services likely own ordering and lifecycle transitions; events and a post-departure job decouple downstream processing from departure actions.
• app/Services/QueueManagementService.php
• app/Services/QueueOrderService.php
• app/Models/Queue.php
• app/Events/TriggerDepartingEvent.php
• app/Jobs/ProcessAfterDepart.php
A likely control flow is: cashier/operator action updates queue and vehicle state → departure event is emitted → queued job records or performs post-departure work → role dashboards receive updated operational state.
Fare Cards, Payments, and Ledger Records
Card and payment endpoints form a financial boundary around commuter travel. Persistent card, card-transaction, top-up, cash-transaction, payment, and travel-record models support auditability of balance and fare activity. Web payment/top-up controllers handle transaction initiation and completion views, while APIs support card/RFID interaction.
• app/Http/Controllers/PaymentController.php
• app/Http/Controllers/TopUpTransactionController.php
• app/Http/Controllers/Api/CardController.php
• app/Models/CardTransaction.php
• app/Models/TopUpTransaction.php
• app/Models/CashTransaction.php
The repository does not identify a named external payment provider; credentials/integrations would be expected through config/services.php and environment variables.
Rental and Trip-Request Workflow
Beyond scheduled transport, the system supports commuter trip requests and operator rental offers. Requests, offers, and rent transactions form a separate transaction lifecycle surfaced in commuter/operator dashboard views.
• app/Models/TripRequest.php
• app/Models/RentalOffer.php
• app/Models/RentTransaction.php
• resources/views/pages/content-by-role/operator/⚡trip-request-modal.blade.php
• resources/views/pages/content-by-role/commuter/⚡active-renting-transaction.blade.php
User, Social, Notification, and Audit Domain
Users have profile/settings flows and role-scoped views. A post/feed subsystem lets users create posts and express interest; notification events/models distribute activity updates. Audit logging is explicitly modeled and serviced for administrative traceability.
• app/Models/User.php
• app/Services/PostService.php
• app/Services/PostInterestService.php
• app/Models/Notification.php
• app/Services/AuditLogsService.php
Runtime, Persistence, and Realtime Infrastructure
Laravel runs on PHP with Composer (composer.json), Eloquent migrations defining the relational schema (database/migrations), and a JavaScript/Vite frontend bundle (resources/js/app.js, vite.config.js). Queue, cache, database, mail, session, broadcasting, and Reverb settings are Laravel-configured infrastructure boundaries. Mail classes indicate OTP/password-reset/registration email delivery; events plus Echo/Reverb support realtime updates.
• config/database.php
• config/queue.php
• config/broadcasting.php
• config/reverb.php
• resources/js/echo.js
• app/Mail/PasswordResetOtpMail.php
Main entry points: CardTransaction.php Fare ledger · QueueManagementService.php Queue lifecycle · AdminPanelController.php Role dashboards · database.php Relational database
Components 22
HTTP & UI
- Public entry
public/index.php - Laravel bootstrap
bootstrap/app.php - Web routes · Serves public, account, and role dashboard flows.
routes/web.php - API routes
routes/api.php - Role authorization
app/Http/Middleware/RoleMiddleware.php - Role dashboards · Splits presentation for admin, cashier, commuter, and operator actors.
app/Http/Controllers/Web/User/AdminPanelController.php - RFID registration API
app/Http/Controllers/Api/RfidCardRegistrationController.php
Transport Operations
- Queue lifecycle · Owns dispatch-state transitions and queue management.
app/Services/QueueManagementService.php - Queue ordering
app/Services/QueueOrderService.php - Dispatch records · Queue state connects vehicles, terminals, routes, schedules, and travel records.
app/Models/Queue.php - Departure event
app/Events/TriggerDepartingEvent.php - Post-departure worker
app/Jobs/ProcessAfterDepart.php
Fares & Rentals
- Payment flow · Initiates and completes fare payment views.
app/Http/Controllers/PaymentController.php - Top-up flow
app/Http/Controllers/TopUpTransactionController.php - Card operations API
app/Http/Controllers/Api/CardController.php - Fare ledger · Card, top-up, cash, payment, and travel records provide financial auditability.
app/Models/CardTransaction.php - Rental lifecycle · Trip requests, operator offers, and rent transactions form a separate lifecycle.
app/Models/TripRequest.php
Platform Infrastructure
- Social, notifications & audit · Posts, interests, notifications, and audit logging support user activity and traceability.
app/Services/PostService.php - Relational database · Eloquent persistence is defined by migrations.
config/database.php - Queue runtime
config/queue.php - Realtime updates · Events are delivered to the frontend through Laravel broadcasting/Reverb.
resources/js/echo.js - OTP email delivery
app/Mail/PasswordResetOtpMail.php
Connections 25
- Public entry → Laravel bootstrap: boots
- Laravel bootstrap → Web routes: loads
- Laravel bootstrap → API routes: loads
- Web routes → Role authorization: authorizes
- Role authorization → Role dashboards: permits
- API routes → RFID registration API: dispatches
- API routes → Card operations API: dispatches
- Role dashboards → Queue lifecycle: operates
- Queue lifecycle → Queue ordering: orders
- Queue lifecycle → Dispatch records: updates
- Queue lifecycle → Departure event: emits on departure
- Departure event → Post-departure worker: queues
- Post-departure worker → Dispatch records: records follow-up
- Payment flow → Fare ledger: records
- Top-up flow → Fare ledger: records
- Card operations API → Fare ledger: reads and updates
- RFID registration API → Fare ledger: registers card
- Role dashboards → Rental lifecycle: manages
- Fare ledger → Relational database: persists
- Dispatch records → Relational database: persists
- Rental lifecycle → Relational database: persists
- Post-departure worker → Queue runtime: runs through
- Departure event → Realtime updates: broadcasts
- Realtime updates → Role dashboards: updates UI
- Social, notifications & audit → Relational database: persists activity