# ramawaterfilter/rama-cs-app architecture

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

- Interactive diagram: https://gitdiagram.com/ramawaterfilter/rama-cs-app
- Repository: https://github.com/ramawaterfilter/rama-cs-app

## Overview

Phoenix is a customer-service ticket management application: staff authenticate, work tickets and customer queries, and use role-oriented dashboards; administrators also manage users and query metadata, while logistics staff handle returns and replacements. The Angular frontend routes these workflows and the Laravel API exposes their backend operations. The graph preserves reporting, outreach, profile requests, and management capabilities named in the repository tree, though their implementation details were not sampled. Edges are limited to route declarations and source-index references; unsampled frontend-to-API wiring is therefore not asserted.

Main entry points: [`backend/routes/api.php`](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/routes/api.php) (API routes), [`frontend/src/app/app.routes.ts`](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/app.routes.ts) (Application routes), [`backend/app/Http/Controllers/ReportController.php`](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/ReportController.php) (Reports), [`backend/app/Http/Controllers/LogisticsController.php`](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/LogisticsController.php) (Returns and replacements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Staff application"]
  node_routes_ui["Application routes<br/>[app.routes.ts]"]
  node_login["Login<br/>[login.component.ts]"]
  node_dashboard["Role dashboards"]
  node_ticket_ui["Ticket grid"]
  node_logistics_ui["Logistics dashboard"]
  node_public_form["Query form"]
  node_auth_service["Auth service<br/>[auth.service.ts]"]
end

subgraph group_api["API and identity"]
  node_api_routes["API routes<br/>[api.php]"]
  node_auth_controller["Authentication<br/>[AuthController.php]"]
  node_users[("User accounts<br/>[User.php]")]
end

subgraph group_tickets["Ticket operations"]
  node_tickets_api["Ticket handling"]
  node_ticket_model[("Ticket records<br/>[CustomerTicket.php]")]
  node_logistics_api["Returns and replacements"]
  node_replacement_model[("Ticket replacements")]
  node_return_model[("Ticket returns<br/>[TicketReturn.php]")]
  node_reports["Reports"]
end

subgraph group_admin["Administration"]
  node_categories["Query categories"]
  node_category_model[("Category hierarchy<br/>[QueryCategory.php]")]
  node_metadata["Query metadata"]
  node_statuses["Ticket statuses"]
end

subgraph group_support["Support workflows"]
  node_outreach["Customer outreach"]
  node_profile_requests["Profile requests"]
  node_activity[("User activity<br/>[UserActivity.php]")]
end

node_staff(("Staff user"))

node_staff -.->|"uses"| node_routes_ui
node_routes_ui -->|"routes to"| node_login
node_routes_ui -->|"routes to"| node_dashboard
node_routes_ui -->|"routes to"| node_ticket_ui
node_routes_ui -->|"loads"| node_logistics_ui
node_routes_ui -->|"routes to"| node_public_form
node_auth_service -.->|"calls API"| node_auth_controller
node_api_routes -->|"routes to"| node_auth_controller
node_api_routes -->|"routes to"| node_tickets_api
node_api_routes -->|"routes to"| node_logistics_api
node_api_routes -->|"routes to"| node_reports
node_api_routes -->|"routes to"| node_categories
node_api_routes -->|"routes to"| node_metadata
node_api_routes -->|"routes to"| node_statuses
node_api_routes -->|"routes to"| node_outreach
node_api_routes -->|"routes to"| node_profile_requests
node_auth_controller -->|"uses"| node_users
node_tickets_api -->|"uses"| node_ticket_model
node_logistics_api -->|"uses"| node_ticket_model
node_logistics_api -->|"uses"| node_replacement_model
node_logistics_api -->|"uses"| node_return_model
node_reports -->|"uses"| node_ticket_model
node_reports -->|"uses"| node_users
node_reports -->|"uses"| node_replacement_model
node_reports -->|"uses"| node_return_model
node_categories -->|"uses"| node_category_model
node_categories -->|"records activity"| node_activity
node_statuses -->|"records activity"| node_activity
node_activity -->|"belongs to"| node_users

click node_routes_ui "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/app.routes.ts"
click node_login "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/login/login.component.ts"
click node_dashboard "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/admin-dashboard/admin-dashboard.component.ts"
click node_ticket_ui "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/ticket-grid/ticket-grid.component.ts"
click node_logistics_ui "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/logistics-dashboard/logistics-dashboard.component.ts"
click node_public_form "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/public-form/public-form.component.ts"
click node_auth_service "https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/services/auth.service.ts"
click node_api_routes "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/routes/api.php"
click node_auth_controller "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/AuthController.php"
click node_users "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/User.php"
click node_tickets_api "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/CustomerTicketController.php"
click node_ticket_model "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/CustomerTicket.php"
click node_logistics_api "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/LogisticsController.php"
click node_replacement_model "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/TicketReplacement.php"
click node_return_model "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/TicketReturn.php"
click node_reports "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/ReportController.php"
click node_categories "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/QueryCategoryController.php"
click node_category_model "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/QueryCategory.php"
click node_metadata "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/QueryTypeController.php"
click node_statuses "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/QueryStatusController.php"
click node_outreach "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/CustomerOutreachController.php"
click node_profile_requests "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/UserProfileRequestController.php"
click node_activity "https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/UserActivity.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_routes_ui,node_login,node_dashboard,node_ticket_ui,node_logistics_ui,node_public_form,node_auth_service,node_staff toneBlue
class node_api_routes,node_auth_controller,node_users toneAmber
class node_tickets_api,node_ticket_model,node_logistics_api,node_replacement_model,node_return_model,node_reports toneMint
class node_categories,node_category_model,node_metadata,node_statuses toneRose
class node_outreach,node_profile_requests,node_activity toneIndigo
```

## Components

### Staff application

- [Application routes](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [Login](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/login/login.component.ts): `frontend/src/app/components/login/login.component.ts`
- [Role dashboards](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/admin-dashboard/admin-dashboard.component.ts): `frontend/src/app/components/admin-dashboard/admin-dashboard.component.ts`
- [Ticket grid](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/ticket-grid/ticket-grid.component.ts): `frontend/src/app/components/ticket-grid/ticket-grid.component.ts`
- [Logistics dashboard](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/logistics-dashboard/logistics-dashboard.component.ts): `frontend/src/app/components/logistics-dashboard/logistics-dashboard.component.ts`
- [Query form](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/components/public-form/public-form.component.ts): `frontend/src/app/components/public-form/public-form.component.ts`
- [Auth service](https://github.com/ramawaterfilter/rama-cs-app/blob/main/frontend/src/app/services/auth.service.ts): `frontend/src/app/services/auth.service.ts`

### API and identity

- [API routes](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Authentication](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/AuthController.php): `backend/app/Http/Controllers/AuthController.php`
- [User accounts](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/User.php): `backend/app/Models/User.php`

### Ticket operations

- [Ticket handling](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/CustomerTicketController.php): `backend/app/Http/Controllers/CustomerTicketController.php`
- [Ticket records](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/CustomerTicket.php): `backend/app/Models/CustomerTicket.php`
- [Returns and replacements](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/LogisticsController.php): `backend/app/Http/Controllers/LogisticsController.php`
- [Ticket replacements](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/TicketReplacement.php): `backend/app/Models/TicketReplacement.php`
- [Ticket returns](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/TicketReturn.php): `backend/app/Models/TicketReturn.php`
- [Reports](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/ReportController.php): `backend/app/Http/Controllers/ReportController.php`

### Administration

- [Query categories](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/QueryCategoryController.php): `backend/app/Http/Controllers/QueryCategoryController.php`
- [Category hierarchy](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/QueryCategory.php): `backend/app/Models/QueryCategory.php`
- [Query metadata](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/QueryTypeController.php): `backend/app/Http/Controllers/QueryTypeController.php`
- [Ticket statuses](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/QueryStatusController.php): `backend/app/Http/Controllers/QueryStatusController.php`

### Support workflows

- [Customer outreach](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/CustomerOutreachController.php): `backend/app/Http/Controllers/CustomerOutreachController.php`
- [Profile requests](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Http/Controllers/UserProfileRequestController.php): `backend/app/Http/Controllers/UserProfileRequestController.php`
- [User activity](https://github.com/ramawaterfilter/rama-cs-app/blob/main/backend/app/Models/UserActivity.php): `backend/app/Models/UserActivity.php`

### Other components

- **Staff user**

## Connections

- Staff user → Application routes: uses
- Application routes → Login: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Role dashboards: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Ticket grid: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Logistics dashboard: loads (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Query form: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Auth service → Authentication: calls API
- API routes → Authentication: routes to (evidence: `backend/routes/api.php`)
- API routes → Ticket handling: routes to (evidence: `backend/routes/api.php`)
- API routes → Returns and replacements: routes to (evidence: `backend/routes/api.php`)
- API routes → Reports: routes to (evidence: `backend/routes/api.php`)
- API routes → Query categories: routes to (evidence: `backend/routes/api.php`)
- API routes → Query metadata: routes to (evidence: `backend/routes/api.php`)
- API routes → Ticket statuses: routes to (evidence: `backend/routes/api.php`)
- API routes → Customer outreach: routes to (evidence: `backend/routes/api.php`)
- API routes → Profile requests: routes to (evidence: `backend/routes/api.php`)
- Authentication → User accounts: uses (evidence: `backend/app/Http/Controllers/AuthController.php`)
- Ticket handling → Ticket records: uses (evidence: `backend/app/Http/Controllers/CustomerTicketController.php`)
- Returns and replacements → Ticket records: uses (evidence: `backend/app/Http/Controllers/LogisticsController.php`)
- Returns and replacements → Ticket replacements: uses (evidence: `backend/app/Http/Controllers/LogisticsController.php`)
- Returns and replacements → Ticket returns: uses (evidence: `backend/app/Http/Controllers/LogisticsController.php`)
- Reports → Ticket records: uses (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Reports → User accounts: uses (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Reports → Ticket replacements: uses (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Reports → Ticket returns: uses (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Query categories → Category hierarchy: uses (evidence: `backend/app/Http/Controllers/QueryCategoryController.php`)
- Query categories → User activity: records activity (evidence: `backend/app/Http/Controllers/QueryCategoryController.php`)
- Ticket statuses → User activity: records activity (evidence: `backend/app/Http/Controllers/QueryStatusController.php`)
- User activity → User accounts: belongs to (evidence: `backend/app/Models/UserActivity.php`)
