How mjgaspar-dotcom/barangay-request-system works
This is a barangay document-request system with registered-resident and guest submission, staff/admin processing, tracking, account administration, and operational records. The principal workflow runs from request submission through status processing and tracking; a useful internal layer is the status service, which owns transition rules and invokes audit and notification behavior. The README states the product purpose but provides little architecture detail. Several frontend pages and backend capabilities are visible only in the tree or route references, so those relationships are not asserted beyond documented routing and clearly marked unverified API communication.
Main entry points: BarangayRequestController.php Request endpoints · api.php API routing · RequestStatusService.php Status transitions · GuestRequestController.php Guest request endpoints
Components 23
Web client
- Web application
frontend/src/main.jsx - Authentication state
frontend/src/contexts/AuthProvider.jsx - API client
frontend/src/services/api.js - Resident and guest pages
frontend/src/pages - Staff workspace
frontend/src/pages/staff - Admin workspace
frontend/src/pages/admin
API workflows
- API routing
routes/api.php - Request endpoints
app/Http/Controllers/Api/BarangayRequestController.php - Guest request endpoints
app/Http/Controllers/Api/GuestRequestController.php - Identity and access endpoints
app/Http/Controllers/Api/AuthController.php - Admin management endpoints
app/Http/Controllers/Api/AdminUserController.php
Request domain
- Request records
app/Models - Identity and document records
app/Models - Status transitions
app/Services/RequestStatusService.php - Tracking lookup
app/Http/Controllers/Api/BarangayRequestController.php
Administration and records
- Audit logging
app/Services/AuditService.php - Notifications
app/Services/NotificationService.php - OCR parsing
app/Services/OcrParsingService.php - Request reports
app/Services/RequestReportService.php - QR generation
app/Services/QrCodeService.php - Document types
app/Models/DocumentType.php
Other components
- Resident or guest
- OCR or QR provider
Connections 29
- Web application → Authentication state: provides context
frontend/src/main.jsx - Web application → API routing: loads routes
- API routing → Request endpoints: routes requests
routes/api.php - API routing → Guest request endpoints: routes guests
routes/api.php - API routing → Identity and access endpoints: routes identity
routes/api.php - API routing → Admin management endpoints: routes administration
routes/api.php - Request endpoints → Request records: creates and queries
app/Http/Controllers/Api/BarangayRequestController.php - Request endpoints → Status transitions: delegates status
app/Http/Controllers/Api/BarangayRequestController.php - Request endpoints → Audit logging: logs actions
app/Http/Controllers/Api/BarangayRequestController.php - Request endpoints → QR generation: generates codes
routes/api.php - Request endpoints → Document types: loads document type
app/Http/Controllers/Api/BarangayRequestController.php - Request endpoints → Tracking lookup: looks up tracking
app/Http/Controllers/Api/BarangayRequestController.php - Guest request endpoints → Status transitions: delegates status
app/Http/Controllers/Api/GuestRequestController.php - Guest request endpoints → Audit logging: logs actions
app/Http/Controllers/Api/GuestRequestController.php - Guest request endpoints → QR generation: generates codes
app/Http/Controllers/Api/GuestRequestController.php - Status transitions → Request records: updates status
app/Services/RequestStatusService.php - Status transitions → Audit logging: records transitions
app/Services/RequestStatusService.php - Status transitions → Notifications: notifies changes
app/Services/RequestStatusService.php - Audit logging → Identity and document records: persists audit entries
app/Services/AuditService.php - Request endpoints → Identity and document records: checks requester role
app/Http/Controllers/Api/BarangayRequestController.php - Admin management endpoints → Identity and document records: manages residents
app/Http/Controllers/Api/AdminUserController.php - Resident or guest → Web application: uses portal
README.md - Resident and guest pages → API client: requests API data
frontend/src/pages/admin/ManageRequests.jsx - Staff workspace → API client: requests API data
- Admin workspace → API client: requests API data
frontend/src/pages/admin/ManageRequests.jsx - API client → API routing: calls backend
- Request endpoints → Request reports: may support reporting
- API routing → OCR parsing: exposes OCR test
routes/api.php - OCR parsing → OCR or QR provider: provider integration