How dev-segovich/folder_links works
Purpose and Entry Points
This is a Laravel/PHP ticket-management application with server-rendered dashboard, project, ticket, and authentication screens, plus a programmatic API. HTTP starts at public/index.php, loads Laravel through bootstrap/app.php, and dispatches browser/API routes in routes/web.php and routes/api.php. CLI and operational tasks enter through artisan, including API-token support in app/Console/Commands/ApiToken.php.
HTTP, Authentication, and Authorization
Web controllers serve login, dashboard, project, and ticket workflows; API controllers expose project and ticket operations. Authentication configuration and token support are Laravel-based, with Sanctum materially indicated by config/sanctum.php and the personal-access-token migration. Role-based authorization is a separate middleware boundary in app/Http/Middleware/CheckRole.php.
• app/Http/Controllers/LoginController.php
• app/Http/Controllers/Api/ProjectController.php
• app/Http/Middleware/CheckRole.php
Core Domain: Projects and Tickets
The application centers on projects and their tickets. Tickets have associated comments, subtasks, file records, and activity/audit data; projects also support links. Eloquent models represent these relationships and controllers own the request-to-domain persistence flow.
• app/Models/Project.php
• app/Models/Ticket.php
• app/Models/TicketComment.php
Persistence and Data Lifecycle
Laravel migrations define the durable relational schema for users, projects, tickets, and ticket child entities, while seeders establish initial users/projects. The schema also includes cache and jobs tables, allowing configured database-backed cache/queue behavior. Audit logs and ticket activity timestamps make lifecycle changes an explicit persisted concern.
• database/migrations/2026_01_01_000002_create_tickets_table.php
• database/migrations/2026_01_01_000006_create_audit_log_table.php
• database/migrations/2026_07_14_120000_add_activity_timestamps_to_tickets_table.php
Browser UI and Asset Boundary
The primary UI is Blade-rendered HTML using shared layouts and reusable view partials. Controllers render dashboard, project-directory, ticket-list/detail, and creation/edit pages. Browser assets originate under resources/ and are built with Vite into public/build/; deployed static output already exists there.
• resources/views/layouts/app.blade.php
• resources/views/tickets/show.blade.php
• resources/js/app.js
Infrastructure and External Integration Boundaries
Runtime dependencies are PHP/Laravel with Composer and a Node/Vite asset pipeline. Database, cache, queues, sessions, filesystem storage, mail, logging, and third-party service credentials are configuration boundaries rather than embedded service implementations. Ticket file metadata is modeled separately, while Laravel filesystem configuration governs physical storage.
• config/database.php
• config/filesystems.php
• config/queue.php
Main Control Flow
A browser request follows route → authentication/role middleware → controller → Eloquent models/database → Blade response. API calls follow the corresponding API route/controller path and use token-capable auth. Ticket mutations can update ticket activity/audit records and related comments, subtasks, or files; uploaded content is expected to cross the filesystem boundary while its metadata remains in the database.
• routes/web.php
• routes/api.php
• app/Models/AuditLog.php
Main entry points: 2026_01_01_000002_create_tickets_table.php Relational database · Ticket.php Ticket model · CheckRole.php Auth and role guard · Project.php Project model
Components 18
HTTP application
- Browser
- HTTP entry point
public/index.php - Laravel bootstrap
bootstrap/app.php - Web routes
routes/web.php - API routes
routes/api.php - Auth and role guard · Sanctum enables token-capable API authentication.
app/Http/Middleware/CheckRole.php - Web controllers · Own login, dashboard, project, and ticket workflows.
app/Http/Controllers/LoginController.php - Project and ticket API
app/Http/Controllers/Api/ProjectController.php
Ticket domain
- Project model · Projects own tickets and links.
app/Models/Project.php - Ticket model · Tickets relate to comments, subtasks, files, and activity.
app/Models/Ticket.php - Ticket comments
app/Models/TicketComment.php - Audit activity · Persists lifecycle changes and activity timestamps.
app/Models/AuditLog.php - Relational database · Migrations define users, projects, tickets, child records, cache, jobs, and tokens.
database/migrations/2026_01_01_000002_create_tickets_table.php
UI and delivery
- Blade UI · Shared layouts render dashboard, project, and ticket screens.
resources/views/layouts/app.blade.php - Vite asset pipeline · Builds resources into deployed public assets.
resources/js/app.js - File storage · Stores uploaded content while ticket file metadata remains relational.
config/filesystems.php
Other components
- Queue and cache · May use database-backed jobs and cache tables.
config/queue.php - Artisan operations · Runs operational tasks including API-token support.
artisan
Connections 22
- Browser → HTTP entry point: HTTP request
- HTTP entry point → Laravel bootstrap: loads
- Laravel bootstrap → Web routes: dispatches browser routes
- Laravel bootstrap → API routes: dispatches API routes
- Web routes → Auth and role guard: passes through
- API routes → Auth and role guard: token and role checks
- Auth and role guard → Web controllers: authorizes
- Auth and role guard → Project and ticket API: authorizes
- Web controllers → Blade UI: renders
- Project and ticket API → Project model: manages
- Web controllers → Project model: manages
- Project model → Ticket model: contains
- Ticket model → Ticket comments: has comments
- Ticket model → Audit activity: records changes
- Project model → Relational database: persists
- Ticket model → Relational database: persists
- Ticket comments → Relational database: persists
- Audit activity → Relational database: persists
- Ticket model → File storage: file content storage
- Vite asset pipeline → Browser: served static assets
- Artisan operations → Relational database: migrations and token operations
- Queue and cache → Relational database: database-backed option