# cattr-app/server-application architecture

> Architecture diagram of the GitHub repository cattr-app/server-application, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cattr-app/server-application
- Repository: https://github.com/cattr-app/server-application

## Overview

Cattr is a self-hosted time-tracking and project-management platform. Users manage projects and tasks, record intervals and activity, and review dashboards and reports; the server also supports screenshots, offline synchronization, team administration, attachments, and a public API. The graph separates the browser experience, API/domain handling, reporting, and supporting runtime services. README statements establish the product capabilities; sampled source supports several model and service relationships, but unsampled controllers and frontend modules limit verification of their detailed calls.

Main entry points: [`app/Models/TimeInterval.php`](https://github.com/cattr-app/server-application/blob/main/app/Models/TimeInterval.php) (Time records), [`resources/frontend/core/App.vue`](https://github.com/cattr-app/server-application/blob/main/resources/frontend/core/App.vue) (Web application), [`app/Models/Task.php`](https://github.com/cattr-app/server-application/blob/main/app/Models/Task.php) (Task records), [`app/Services/UniversalReportServiceProject.php`](https://github.com/cattr-app/server-application/blob/main/app/Services/UniversalReportServiceProject.php) (Universal reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User experience"]
  node_frontend["Web application<br/>[App.vue]"]
  node_calendar["Calendar"]
  node_dashboard["Dashboard"]
  node_offline["Offline sync"]
end

subgraph group_domain["Project and time domain"]
  node_project_api["Project API"]
  node_task_api["Task API<br/>[TaskController.php]"]
  node_interval_api["Interval API"]
  node_task_data[("Task records<br/>[Task.php]")]
  node_project_data[("Project records<br/>[Project.php]")]
  node_interval_data[("Time records<br/>[TimeInterval.php]")]
  node_activity_data[("Tracked applications")]
  node_people[("Users and roles<br/>[User.php]")]
end

subgraph group_insights["Reporting and exports"]
  node_reports_api["Report API"]
  node_project_report["Project report"]
  node_report_services["Universal reports"]
  node_report_exports["Report exports"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_screenshots["Screenshot service"]
  node_storage_cleaner["Screenshot cleanup<br/>[StorageCleaner.php]"]
  node_attachment["Attachments"]
  node_modules["Module system"]
end

node_user(("Cattr user"))
node_external_api(("API clients"))

node_user -.->|"uses"| node_frontend
node_user -->|"uses"| node_external_api
node_frontend -.->|"offers"| node_calendar
node_frontend -.->|"offers"| node_dashboard
node_frontend -.->|"supports"| node_offline
node_external_api -.->|"requests"| node_project_api
node_external_api -.->|"requests"| node_task_api
node_external_api -->|"requests"| node_interval_api
node_task_api -->|"uses"| node_task_data
node_project_data -->|"relates tasks"| node_task_data
node_task_data -->|"relates intervals"| node_interval_data
node_interval_data -->|"relates apps"| node_activity_data
node_user -.->|"authenticates"| node_auth
node_external_api -.->|"requests reports"| node_reports_api
node_reports_api -.->|"includes"| node_project_report
node_project_report -->|"builds export"| node_report_exports
node_report_services -->|"reads"| node_project_data
node_report_services -->|"reads"| node_task_data
node_report_services -->|"reads"| node_interval_data
node_storage_cleaner -->|"resolves service"| node_screenshots
node_storage_cleaner -->|"checks intervals"| node_interval_data
node_project_api -.->|"manages"| node_project_data
node_interval_api -->|"manages"| node_interval_data

click node_frontend "https://github.com/cattr-app/server-application/blob/main/resources/frontend/core/App.vue"
click node_calendar "https://github.com/cattr-app/server-application/tree/main/resources/frontend/core/modules/Calendar"
click node_dashboard "https://github.com/cattr-app/server-application/tree/main/resources/frontend/core/modules/Dashboard"
click node_offline "https://github.com/cattr-app/server-application/tree/main/resources/frontend/core/modules/OfflineSync"
click node_project_api "https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/ProjectController.php"
click node_task_api "https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/TaskController.php"
click node_interval_api "https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/IntervalController.php"
click node_task_data "https://github.com/cattr-app/server-application/blob/main/app/Models/Task.php"
click node_project_data "https://github.com/cattr-app/server-application/blob/main/app/Models/Project.php"
click node_interval_data "https://github.com/cattr-app/server-application/blob/main/app/Models/TimeInterval.php"
click node_activity_data "https://github.com/cattr-app/server-application/blob/main/app/Models/TrackedApplication.php"
click node_people "https://github.com/cattr-app/server-application/blob/main/app/Models/User.php"
click node_reports_api "https://github.com/cattr-app/server-application/tree/main/app/Http/Controllers/Api/Reports"
click node_project_report "https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/Reports/ProjectReportController.php"
click node_report_services "https://github.com/cattr-app/server-application/blob/main/app/Services/UniversalReportServiceProject.php"
click node_report_exports "https://github.com/cattr-app/server-application/tree/main/app/Reports"
click node_auth "https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/AuthController.php"
click node_screenshots "https://github.com/cattr-app/server-application/blob/main/app/Contracts/ScreenshotService.php"
click node_storage_cleaner "https://github.com/cattr-app/server-application/blob/main/app/Helpers/StorageCleaner.php"
click node_attachment "https://github.com/cattr-app/server-application/blob/main/app/Services/AttachmentService.php"
click node_modules "https://github.com/cattr-app/server-application/blob/main/app/Services/ModuleActivatorService.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_frontend,node_calendar,node_dashboard,node_offline,node_user,node_external_api toneBlue
class node_project_api,node_task_api,node_interval_api,node_task_data,node_project_data,node_interval_data,node_activity_data,node_people toneAmber
class node_reports_api,node_project_report,node_report_services,node_report_exports toneMint
class node_auth,node_screenshots,node_storage_cleaner,node_attachment,node_modules toneRose
```

## Components

### User experience

- [Web application](https://github.com/cattr-app/server-application/blob/main/resources/frontend/core/App.vue): `resources/frontend/core/App.vue`
- [Calendar](https://github.com/cattr-app/server-application/tree/main/resources/frontend/core/modules/Calendar): `resources/frontend/core/modules/Calendar`
- [Dashboard](https://github.com/cattr-app/server-application/tree/main/resources/frontend/core/modules/Dashboard): `resources/frontend/core/modules/Dashboard`
- [Offline sync](https://github.com/cattr-app/server-application/tree/main/resources/frontend/core/modules/OfflineSync): `resources/frontend/core/modules/OfflineSync`

### Project and time domain

- [Project API](https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/ProjectController.php): `app/Http/Controllers/Api/ProjectController.php`
- [Task API](https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/TaskController.php): `app/Http/Controllers/Api/TaskController.php`
- [Interval API](https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/IntervalController.php): `app/Http/Controllers/Api/IntervalController.php`
- [Task records](https://github.com/cattr-app/server-application/blob/main/app/Models/Task.php): `app/Models/Task.php`
- [Project records](https://github.com/cattr-app/server-application/blob/main/app/Models/Project.php): `app/Models/Project.php`
- [Time records](https://github.com/cattr-app/server-application/blob/main/app/Models/TimeInterval.php): `app/Models/TimeInterval.php`
- [Tracked applications](https://github.com/cattr-app/server-application/blob/main/app/Models/TrackedApplication.php): `app/Models/TrackedApplication.php`
- [Users and roles](https://github.com/cattr-app/server-application/blob/main/app/Models/User.php): `app/Models/User.php`

### Reporting and exports

- [Report API](https://github.com/cattr-app/server-application/tree/main/app/Http/Controllers/Api/Reports): `app/Http/Controllers/Api/Reports`
- [Project report](https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/Api/Reports/ProjectReportController.php): `app/Http/Controllers/Api/Reports/ProjectReportController.php`
- [Universal reports](https://github.com/cattr-app/server-application/blob/main/app/Services/UniversalReportServiceProject.php): `app/Services/UniversalReportServiceProject.php`
- [Report exports](https://github.com/cattr-app/server-application/tree/main/app/Reports): `app/Reports`

### Platform services

- [Authentication](https://github.com/cattr-app/server-application/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Screenshot service](https://github.com/cattr-app/server-application/blob/main/app/Contracts/ScreenshotService.php): `app/Contracts/ScreenshotService.php`
- [Screenshot cleanup](https://github.com/cattr-app/server-application/blob/main/app/Helpers/StorageCleaner.php): `app/Helpers/StorageCleaner.php`
- [Attachments](https://github.com/cattr-app/server-application/blob/main/app/Services/AttachmentService.php): `app/Services/AttachmentService.php`
- [Module system](https://github.com/cattr-app/server-application/blob/main/app/Services/ModuleActivatorService.php): `app/Services/ModuleActivatorService.php`

### Other components

- **Cattr user**
- **API clients**

## Connections

- Cattr user → Web application: uses
- Cattr user → API clients: uses (evidence: `README.md`)
- Web application → Calendar: offers
- Web application → Dashboard: offers
- Web application → Offline sync: supports
- API clients → Project API: requests
- API clients → Task API: requests
- API clients → Interval API: requests (evidence: `README.md`)
- Task API → Task records: uses (evidence: `app/Http/Controllers/Api/TaskController.php`)
- Project records → Task records: relates tasks (evidence: `app/Models/Project.php`)
- Task records → Time records: relates intervals (evidence: `app/Models/Task.php`)
- Time records → Tracked applications: relates apps (evidence: `app/Models/TimeInterval.php`)
- Cattr user → Authentication: authenticates
- API clients → Report API: requests reports
- Report API → Project report: includes
- Project report → Report exports: builds export (evidence: `app/Http/Controllers/Api/Reports/ProjectReportController.php`)
- Universal reports → Project records: reads (evidence: `app/Services/UniversalReportServiceProject.php`)
- Universal reports → Task records: reads (evidence: `app/Services/UniversalReportServiceProject.php`)
- Universal reports → Time records: reads (evidence: `app/Services/UniversalReportServiceProject.php`)
- Screenshot cleanup → Screenshot service: resolves service (evidence: `app/Helpers/StorageCleaner.php`)
- Screenshot cleanup → Time records: checks intervals (evidence: `app/Helpers/StorageCleaner.php`)
- Project API → Project records: manages
- Interval API → Time records: manages (evidence: `app/Http/Controllers/Api/IntervalController.php`)
