How aredo97/luac works
Purpose and entry points
This is a Laravel server-rendered application for managing users, events, and projects, including role-gated approval workflows, notifications, and reporting. HTTP enters through public/index.php, is bootstrapped by bootstrap/app.php, and is mapped in routes/web.php and routes/auth.php. CLI/scheduled operations use artisan and routes/console.php.
HTTP and access control
Route handlers are conventional MVC controllers under app/Http/Controllers. Core domain endpoints are represented by app/Http/Controllers/EventController.php, app/Http/Controllers/ProjectController.php, and app/Http/Controllers/UserController.php. Authentication, registration, password recovery, and email verification are supplied through dedicated controllers in app/Http/Controllers/Auth. app/Http/Middleware/RoleMiddleware.php establishes a key authorization boundary for role-specific actions.
Domain persistence and workflows
Eloquent models app/Models/User.php, app/Models/Event.php, and app/Models/Project.php form the central data model. Database schema evolution defines the workflow state: user roles in database/migrations/2026_06_18_071443_add_role_to_users_table.php; event creation/status transitions in database/migrations/2026_06_18_115706_create_events_table.php and database/migrations/2026_06_19_162921_update_event_status_enum.php; and projects in database/migrations/2026_06_20_053840_create_projects_table.php. Controllers mediate state changes and select views for pending, approved, archived, posted, and completed records.
Event management
The event flow is centered on EventController: users create/upload events, while the application separates posted, completed, and archived presentation states. Its primary UI boundary is in resources/views/Events/uploadEvent.blade.php, resources/views/Events/postedEvents.blade.php, and resources/views/Events/completedEvents.blade.php. Event lifecycle changes can notify users through app/Notifications/eventsNotification.php and app/Notifications/eventCompleted.php.
Project approval lifecycle
Projects have explicit submission and review states surfaced in app/Http/Controllers/ProjectController.php. Views distinguish creation, pending review, approval, rejection, and archival via resources/views/projects/create_project.blade.php, resources/views/projects/pending_projects.blade.php, and resources/views/projects/approved_projects.blade.php. Approval/rejection side effects are encapsulated in app/Notifications/projectApprovalNotification.php, app/Notifications/projectRejectedNotification.php, and app/Mail/projectApprovedMail.php.
Messaging and reporting
Laravel mail and database-style notification mechanisms are used for user-facing lifecycle communication. Notification classes cover verification, new projects, project decisions, and events under app/Notifications; mailables include onboarding and report delivery in app/Mail/WelcomeMail.php and app/Mail/UsersReportMail.php. The console command app/Console/Commands/SendUsersReport.php is the batch/reporting entry point, rendering resources/views/emails/user-report.blade.php; scheduling is expected to be defined through routes/console.php.
Runtime, UI, and infrastructure
The runtime is PHP/Laravel with Eloquent database access, configurable cache/session/queue/mail drivers in config/database.php, config/queue.php, and config/mail.php. The application is Blade-rendered using shared application/guest layouts (resources/views/layouts/app.blade.php, resources/views/layouts/guest.blade.php) rather than an API-first frontend. Vite-managed JavaScript and CSS provide client assets, including dashboard charts at resources/js/charts/dashboard-charts.js; uploaded or generated files are bounded by Laravel storage directories under storage/app.
Main entry points: EventController.php Event controller · ProjectController.php Project controller · User.php User · app.php Application bootstrap
Components 22
Laravel Runtime
- HTTP entry
public/index.php - Application bootstrap
bootstrap/app.php - File storage · Bounds uploaded and generated files.
storage/app
HTTP & Access
- Web routes
routes/web.php - Auth routes
routes/auth.php - Role authorization · Gates role-specific actions.
app/Http/Middleware/RoleMiddleware.php - Authentication controllers · Registration, recovery, verification, and login flows.
app/Http/Controllers/Auth
Domain Workflows
- Event controller · Creates uploads and manages event lifecycle states.
app/Http/Controllers/EventController.php - Project controller · Submits and reviews project approvals.
app/Http/Controllers/ProjectController.php - User controller
app/Http/Controllers/UserController.php - User · Includes role-based access state.
app/Models/User.php - Event · Persists posted, completed, and archived lifecycle state.
app/Models/Event.php - Project · Persists submission and approval state.
app/Models/Project.php - Application database · Eloquent-backed users, events, and projects.
Blade UI
- Event views · Upload, posted, and completed event interfaces.
resources/views/Events/uploadEvent.blade.php - Project views · Creation, pending review, and approved project interfaces.
resources/views/projects/create_project.blade.php - Shared layouts · Shared authenticated application shell.
resources/views/layouts/app.blade.php
Reporting & Delivery
- Lifecycle notifications · Delivers event and project status changes.
app/Notifications/eventsNotification.php - User report command · Generates and delivers the user report.
app/Console/Commands/SendUsersReport.php - Schedule definition
routes/console.php - User report mail
app/Mail/UsersReportMail.php - Report email template
resources/views/emails/user-report.blade.php
Connections 26
- HTTP entry → Application bootstrap: boots
- Application bootstrap → Web routes: loads
- Application bootstrap → Auth routes: loads
- Web routes → Role authorization: applies
- Role authorization → Event controller: authorizes
- Role authorization → Project controller: authorizes
- Web routes → User controller: dispatches
- Auth routes → Authentication controllers: dispatches
- Event controller → Event: updates
- Project controller → Project: reviews
- User controller → User: manages
- Authentication controllers → User: authenticates
- User → Application database: persists
- Event → Application database: persists
- Project → Application database: persists
- Event controller → Event views: renders
- Project controller → Project views: renders
- Event views → Shared layouts: uses
- Project views → Shared layouts: uses
- Event controller → Lifecycle notifications: notifies lifecycle changes
- Project controller → Lifecycle notifications: notifies decisions
- Event controller → File storage: stores uploads
- Schedule definition → User report command: schedules
- User report command → User: queries users
- User report command → User report mail: sends
- User report mail → Report email template: renders