How krimtsev/portal-backend works
This is a Laravel business portal for managing franchise partners, staff, tickets, shared files, reporting, and operational data synchronized from Yclients and Mango. The user-facing workflow is an API request handled by a domain controller, which reads or changes application data and returns JSON or resources. Background jobs also synchronize external records into local models. The map emphasizes documented API and sync flows; the README is empty, and unsampled subsystems are included only where their role is clear from the tree, without speculative links.
Main entry points: CloudController.php Cloud API · TicketsController.php Ticket API · SyncYcStorageTransactionService.php Storage sync service · JsonResponse.php JSON responses
Components 26
Portal API
- Cloud API
app/Http/Controllers/Cloud/CloudController.php - Cloud repository
app/Repositories/Cloud/CloudRepository.php - Cloud files and folders
app/Models/Cloud/CloudFolder.php - Ticket API
app/Http/Controllers/Tickets/TicketsController.php - User administration
app/Http/Controllers/Users/UserController.php
Partner Operations
- Ticket records
app/Models/Ticket/Ticket.php - Ticket notifications
app/Notifications/Ticket/TicketCreatedNotification.php - User accounts
app/Models/User/User.php - Partner directory
app/Models/Partner/Partner.php
Analytics And Reports
- Staff statistics API
app/Http/Controllers/Statistics/StatisticsStaffController.php - Staff statistics
app/Services/Statistics/StatisticsStaffService.php - Client reports
app/Services/Reports/ClientReportService.php - Excel export
app/Exports/Reports/ClientReportExcelExport.php
Data Synchronization
- Storage sync command
app/Console/Commands/SyncYcStorageTransactionsCommand.php - Storage sync job
app/Jobs/Yclients/SyncYcStorageTransactionsJob.php - Storage sync service
app/Services/Yclients/SyncYcStorageTransactionService.php - Yclients API client
app/Integrations/Yclients/YclientsApi.php - Storage transactions resource
app/Integrations/Yclients/Resources/StorageTransactions/StorageTransactionsResource.php - Transaction response DTO
app/Integrations/Yclients/Resources/StorageTransactions/DTO/StorageTransactionsResponse.php - Stored transactions
app/Models/Yclients/YcStorageTransaction.php
Shared Services
- Telegram transport
app/Integrations/Telegram/Transport/TelegramTransport.php - Telegram manager
app/Integrations/Telegram/TelegramManager.php - Pagination helper
app/Helpers/Pagination/Pagination.php - Cache helper
app/Helpers/Cache.php - JSON responses
app/Responses/JsonResponse.php
Other components
- Portal user
Connections 24
- Portal user → Cloud API: requests files
- Portal user → Ticket API: manages tickets
- Portal user → User administration: manages accounts
- Cloud API → Cloud repository: queries folders
app/Http/Controllers/Cloud/CloudController.php - Cloud repository → Cloud files and folders: reads records
app/Repositories/Cloud/CloudRepository.php - Cloud API → Cloud files and folders: loads folders
app/Http/Controllers/Cloud/CloudController.php - Cloud API → Cache helper: caches results
app/Http/Controllers/Cloud/CloudController.php - Cloud API → JSON responses: returns JSON
app/Http/Controllers/Cloud/CloudController.php - Ticket API → Ticket records: reads and updates
app/Http/Controllers/Tickets/TicketsController.php - Ticket API → Ticket notifications: sends notifications
app/Http/Controllers/Tickets/TicketsController.php - Ticket API → JSON responses: returns JSON
app/Http/Controllers/Tickets/TicketsController.php - User administration → User accounts: updates accounts
app/Http/Controllers/Users/UserController.php - User administration → JSON responses: returns JSON
app/Http/Controllers/Users/UserController.php - Staff statistics API → Staff statistics: requests statistics
app/Http/Controllers/Statistics/StatisticsStaffController.php - Staff statistics → Partner directory: reads partner data
app/Services/Statistics/StatisticsStaffService.php - Staff statistics API → JSON responses: returns JSON
app/Http/Controllers/Statistics/StatisticsStaffController.php - Storage sync command → Storage sync job: dispatches jobs
app/Console/Commands/SyncYcStorageTransactionsCommand.php - Storage sync job → Storage sync service: invokes sync
app/Jobs/Yclients/SyncYcStorageTransactionsJob.php - Storage sync service → Yclients API client: requests transactions
app/Services/Yclients/SyncYcStorageTransactionService.php - Storage sync service → Transaction response DTO: maps response
app/Services/Yclients/SyncYcStorageTransactionService.php - Storage sync service → Stored transactions: upserts records
app/Services/Yclients/SyncYcStorageTransactionService.php - Yclients API client → Storage transactions resource: provides resource
app/Integrations/Yclients/YclientsApi.php - Telegram manager → Telegram transport: uses transport
app/Integrations/Telegram/TelegramManager.php - Staff statistics API → Pagination helper: paginates results