For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/backend/index.md.

Backend Overview

The backend is a Laravel 13 application requiring PHP 8.3. It follows Laravel conventions while adding attribute routes, shared responses, and system management models as a foundation for admin development.

Main layers

LocationResponsibility
app/Http/Controllers/Admin/Admin endpoints for users, roles, departments, dictionaries, files, settings, and AI
app/Http/Controllers/Api/Endpoints for other clients
app/Http/Requests/Admin/Admin form validation and request handling
app/Models/Eloquent models and relationships
app/Services/Business services such as file handling
app/Trait/RequestJson.phpSuccess, error, warning, and notification responses
database/migrations/System, user, job, and AI table definitions
database/seeders/Initial accounts, roles, menu permissions, and site settings

Authentication and user model

The project uses Laravel Sanctum personal access tokens. AppServiceProvider configures SysAccessToken as the token model, while SysUserModel is the default authenticated user. The frontend reads the token from local storage and sends it as a Bearer token.

Base controller capabilities

BaseController provides shared list-query logic:

  • Field filters and quick keyword searches;
  • Date-range queries;
  • Frontend sorter conversion;
  • Controller-level searchField and quickSearchField declarations.

Business controllers remain responsible for model operations, validation, and responses, while RequestJson creates the shared response envelope.

Next steps