How gquantic/skytec-backend works
Project type and purpose
• This is a full-stack monolithic web application built on the Laravel framework.
• It provides:
• A RESTful API (app/Http/Controllers/Api) secured via personal access tokens (Laravel Sanctum).
• A server-rendered web front-end (Blade templates in resources/views).
• An administrative back-office built with the Orchid platform (app/Orchid).
• Background tasks and CLI commands (app/Console, queues, events/listeners).
• Data management for entities such as users, applications (vacation, education, business trip), news, articles, emoji, help-desk requests, business ideas, etc.
File structure
• Top-level directories:
• app/ → core application code (Models, Controllers, Services, Repositories, Events, Listeners, Console commands).
• resources/ → front-end assets and Blade templates.
• public/ → webroot, index.php, static assets.
• routes/ → route definitions (api.php, web.php, platform.php).
• config/ → framework and custom configuration.
• database/ → migrations, seeders, factories.
• orchid → admin panel customizations.
• tests/ → automated tests.
• Key technologies:
• Laravel (routing, controllers, Eloquent ORM).
• Sanctum (API authentication).
• Orchid (admin UI).
• Vite (JS/CSS bundling).
• Blade templating.
• Eloquent repositories and a service layer.
• Queues, events & listeners for async processes (mail, emoji updates, token cleanup).
README
• Confirms the use of Laravel and links to docs.
Components & relationships
A. External Clients
1. Web Browser – requests web routes (Blade views).
2. SPA / Mobile App – consumes REST API endpoints.
3. Admin User – accesses Orchid back-office via platform routes.
B. Entry Point & HTTP Layer
– NGINX/Apache (public/index.php) → Laravel HTTP Kernel → Middleware (e.g., ApiAccessToken).
C. Application Layer
1. Controllers
• API Controllers (app/Http/Controllers/Api/*)
• Web Controllers (routes/web.php → controllers rendering Blade)
• Orchid Screens & Layouts (app/Orchid)
2. Requests & Validation (app/Http/Requests)
D. Business Logic & Services
– Service Layer (app/Services/*) orchestrates use cases.
– Repositories (app/Repositories/*) abstract data access on Models.
E. Data Layer
– Eloquent Models (app/Models)
– Migrations & Seeders (database/)
– Database (MySQL/PostgreSQL)
– Cache & Queues (Redis or database)
– File storage for emojis, attachments (storage/, public/emojis)
F. Asynchronous & CLI
– Jobs & Queues (config/queue.php, app/Console)
– Events & Listeners (app/Events, app/Listeners) for sending emails, notifications
– Artisan Commands (app/Console/Commands) for scheduled operations
G. External Services
– SMTP Mail Server (app/Mail)
– LDAP (config/ldap.php)
– Third-party APIs (app/Services/ApiService)
Architectural patterns & design principles
• MVC + Service Layer + Repository Pattern
• Layered architecture:
• Presentation (Controllers, Views, Orchid Screens)
• Application Services
• Domain (Models)
• Infrastructure (Database, Cache, Mail, LDAP)
• Separation of concerns: validation, business logic, data access