Appearance
Backend API ​
Overview ​
The Backend-API is the Laravel application behind Collage. Its README describes it as the backend for the DAM "including Admin, Backoffice, Support & Dealer Portal". It serves the admin app (app.collage.inc), the brand portal, partner integrations, and a small server-rendered back-office.
| Item | Value (from composer.json) |
|---|---|
| Framework | laravel/framework ^11.21 |
| PHP | ^8.2.0 |
| App structure | Laravel 11 framework, but the older application skeleton: app/Http/Kernel.php, app/Console/Kernel.php, App\Providers\RouteServiceProvider and a providers array in config/app.php (no bootstrap/providers.php) |
| Source snapshot | origin/development at f517b6b |
See Architecture for how a request moves through the app, and Setup to run it locally.
API surfaces ​
All route files are registered in App\Providers\RouteServiceProvider::boot(). The api middleware group is defined in app/Http/Kernel.php (LogApiRequests, throttle:api, SubstituteBindings).
| Route file | URL prefix | Middleware group | Main guard | Audience | Docs |
|---|---|---|---|---|---|
(inline) GET /health | none | none | none | Load balancers and monitors (HealthController@index) | Architecture |
routes/api.php | /api (routes inside add /v1) | api | auth:api (Passport, users) | Admin app (workspace members) and external uploaders (external-user via check.external) | Admin API |
routes/dam-api.php | /dam (routes inside add /v1) | api | auth:dam-api + dam-api (Passport, dealer_users) | Brand portal users | Portal API |
routes/external-api.php | /external (routes inside add /v1) | api | auth:external-api + external-api (Passport, external_app) | Third-party apps using an External Api Token | External API |
routes/web.php | none (/admin/* for the back-office) | web | session (web guard) | Internal back-office and /status page | Web routes |
routes/channels.php | /broadcasting/auth | auth:api | api | Private broadcast channels | Events |
routes/console.php | n/a | n/a | n/a | Closure commands (only inspire) | Console commands |
routes/web2.php exists in the repository but is not loaded by RouteServiceProvider.
Tech stack ​
Key packages from composer.json require:
| Area | Package | Version |
|---|---|---|
| API auth (OAuth2 tokens) | laravel/passport | ^12.3.0 |
Token auth (installed, EnsureFrontendRequestsAreStateful is commented out of the api group) | laravel/sanctum | ^4.0.0 |
| Social login | laravel/socialite, socialiteproviders/microsoft | ^5.15, ^4.7 |
| Passkeys | laragear/webauthn | ^4.1 |
| Enterprise SSO (SAML 2.0) | onelogin/php-saml | ^4.2 |
| Search | laravel/scout, typesense/typesense-php | ^10.11, ^4.9 |
| API docs | darkaonline/l5-swagger | ^8.6 |
| Excel import/export | maatwebsite/excel | ^3.1 |
barryvdh/laravel-dompdf | ^3.0 | |
| Storage | aws/aws-sdk-php, league/flysystem-aws-s3-v3, platformcommunity/bunnycdn-storage | ^3.321, ^3.28, ^0.2.0 |
| Images | intervention/image-laravel | * |
| File previews | filepreviews/filepreviews | ^1.0 |
| AI tagging (Google Vision) | yedincisenol/vision | ^0.1.2 |
| Payments | stripe/stripe-php | ^15.8 |
| Broadcasting | pusher/pusher-php-server | ^7.2 |
| Queues | pda/pheanstalk (beanstalkd driver) | ^4.0 |
| Logging to BigQuery | google/cloud-bigquery | ^1.28 |
| Backups | spatie/laravel-backup | ^8.8 |
| Integrations | spatie/dropbox-api, asana/asana, ajimix/asana-api-php-class | ^1.22, ^0.10.8, ^6.5 |
| Mail in / Slack out | webklex/laravel-imap, laravel/slack-notification-channel | ^6.2, ^3.3 |
| Geo / browser | stevebauman/location, hisorange/browser-detect | ^7.3.2, ^5.0 |
| Recurrence | rlanvin/php-rrule, simshaun/recurr | ^2.5, ^5.0 |
| Misc | simplesoftwareio/simple-qrcode, forxer/laravel-gravatar, axlon/laravel-postal-code-validation, matriphe/larinfo, doctrine/dbal, guzzlehttp/guzzle |
Dev packages include phpunit/phpunit ^11.3.1, laravel/sail, kitloong/laravel-migrations-generator and spatie/laravel-ignition.
Folder map of app/ ​
Counts are PHP files, including subfolders.
| Folder | Files | What lives there |
|---|---|---|
Http/Controllers | 64 | Api/v1 (admin app), DAM/v1 (brand portal and external API), Web (back-office), EmailControl, HealthController |
Http/Middleware | 24 | See Middleware |
Http/Requests | 6 | Form requests |
Http/Resources | 9 | API resources |
Models | 158 | 33 at the root, DAM (47), LM (74), EmailControl (3), Project (1) |
Console | 82 | Kernel.php (the schedule) and 81 commands |
Jobs | 27 | Queued jobs: DAM (22), Import (1), root (4) |
Mail | 57 | Mailables: DAM (45), BackOffice (2), root (10) |
Exports | 20 | Excel exports (reports, leads, dealerships) |
Imports | 6 | Excel imports (leads, dealerships, products) |
Services | 12 | BigQueryLog, DAM, Sso, WorkspaceMailService |
Events | 7 | Broadcast and domain events |
Listeners | 3 | Event listeners |
Providers | 12 | Service providers |
Logging | 2 | CreateWeeklyLog, ImportMigrationLogger |
Support | 3 | Support classes |
Casts | 2 | CustomFieldOptions, FlexibleJson |
RestResource | 2 | RestResponse and its facade |
ProjectActivity, WorkSpaceActivity, PushNotification, ZipCode | 2 each | Small services bound in the container with a facade |
Helpers | 1 | Helper.php, autoloaded through composer.json files |
Traits | 2 | ResolvesViewerTimezone, ResumeHoldLMInvitationEmail |
Exceptions, Permissions, WebAuthn | 1 each | Exception handler, permissions, CacheChallengeRepository |
Section map ​
| Page | Covers |
|---|---|
| Architecture | Request lifecycle, guards, queues, storage, caching, logging, schedule, providers |
| Setup | Local install, artisan commands, env variable names |
| Configuration | Every file in config/ and the custom config files |
| Middleware | Every middleware class, alias and where it is used |
| Routes | Route overview |
| Admin API | routes/api.php |
| Portal API | routes/dam-api.php |
| External API | routes/external-api.php |
| Web routes | routes/web.php |
| Controllers | Controller inventory |
| Models | Model overview |
| DAM models | app/Models/DAM |
| LM models | app/Models/LM |
| Core models | Root models (User, Workspace, ...) |
| Jobs | Queued jobs |
| Console commands | Artisan commands and the schedule |
| Mailables | |
| Events | Events, listeners and broadcast channels |
| Services | app/Services and container bindings |
| Exports and imports | Excel exports and imports |
| Resources and requests | API resources and form requests |
| Features | Feature walkthroughs |
| Authentication | Login, social, passkeys, SSO |
| Assets | Upload, versions, previews |
| Database | Connections, tables, ER diagrams, relationships |
| Folders | Folder tree, move, trash and restore |
| Collages | Collages and their assets |
| Permissions and Portal Visibility | Roles, ACL and per-portal visibility |
| Search | Scout and Typesense |
| Sharing | Share links |
| Portals | Brand portals |
| Subscription | Plans, storage, Stripe |
| Notifications | Email and system notifications |