How keikey/audit works
Audit is a Laravel API for user authentication and role assignment, user lookup, and inspection-listing management. The main workflow is an API request routed to a controller, validated, handled through listing services and Eloquent models, then serialized as a JSON response; listing assignment changes also trigger user notifications. The README additionally documents Swagger API documentation and deployment options, but those are not runtime domain stages. Route declarations and several subsystems were not sampled, so their internal wiring is shown only where supported by the tree or sampled source.
Main entry points: PassportAuthController.php Auth API · ListingController.php Listing API · api.php API routes · UserController.php User API
Components 21
HTTP API
- HTTP entry
src/public/index.php - HTTP kernel
src/app/Http/Kernel.php - Route provider
src/app/Providers/RouteServiceProvider.php - API routes
src/routes/api.php - JSON response
src/app/Http/Controllers/Api/V1/BaseController.php
Identity
- User API
src/app/Http/Controllers/Api/V1/UserController.php - Auth API
src/app/Http/Controllers/Api/PassportAuthController.php - Login validation
src/app/Http/Requests/LoginRequest.php - Registration validation
src/app/Http/Requests/RegisterRequest.php - User response
src/app/Http/Resources/UserResource.php - Passport tokens
src/composer.json
Listings
- Listing API
src/app/Http/Controllers/Api/V1/ListingController.php - Listing validation
src/app/Http/Requests/CreateListingRequest.php - Update validation
src/app/Http/Requests/UpdateListingRequest.php - Listing service
src/app/Services/ListingService.php - Listing response
src/app/Http/Resources/ListingResource.php - Listing notifications
src/app/Notifications/ListingAssigned.php
Persistence
- Listing model
src/app/Models/Listing/Listing.php - User model
src/app/Models/User/User.php - MySQL database
src/config/database.php
Other components
- API client
Connections 28
- API client → HTTP entry: sends request
- HTTP entry → HTTP kernel: handles request
- HTTP kernel → Route provider: boots routing
- Route provider → API routes: loads routes
- API routes → Listing API: dispatches
- API routes → User API: dispatches
- API routes → Auth API: dispatches
- Listing API → Listing validation: validates create
- Listing API → Update validation: validates update
- Listing API → Listing service: calls service
- Listing API → Listing model: queries listings
- Listing API → Listing response: serializes listings
- Listing service → Listing model: creates and updates
- Listing service → User model: looks up inspector
- Listing service → Listing notifications: dispatches notices
- User API → User model: queries users
- User API → User response: serializes users
- Auth API → Login validation: validates login
- Auth API → Registration validation: validates registration
- Auth API → User model: creates user
- Auth API → User response: serializes user
- Auth API → Passport tokens: creates access token
- Listing model → MySQL database: reads and writes
- User model → MySQL database: reads and writes
- Listing API → JSON response: builds response
- User API → JSON response: builds response
- Auth API → JSON response: builds response
- JSON response → API client: returns JSON