# diamsyah02/api-sf-partner architecture

> Architecture diagram of the GitHub repository diamsyah02/api-sf-partner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/diamsyah02/api-sf-partner
- Repository: https://github.com/diamsyah02/api-sf-partner

## Overview

This is a Synchronize Festival partner REST API with a small authenticated web portal. Partner requests pass signature validation before ticket or location operations; ticket ordering and order-status changes are handled through controller, service, repository, and model layers. The portal supports login, password changes, dashboard data, API documentation, and testing. The excerpts establish the main ticket and authentication calls; some route wiring is supported by the source index, while unsampled integrations and persistence details are not expanded.

Main entry points: [`app/Models`](https://github.com/diamsyah02/api-sf-partner/tree/main/app/Models) (Application models), [`app/Controllers/HomeController.php`](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/HomeController.php) (Portal controller), [`app/Controllers/api/TicketController.php`](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/api/TicketController.php) (Ticket API), [`app/Controllers/AuthController.php`](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/AuthController.php) (Auth controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and security"]
  node_routes_ticket["Ticket routes<br/>[Ticket.php]"]
  node_routes_location["Location routes<br/>[Location.php]"]
  node_signature["Signature filter"]
end

subgraph group_identity["Identity and portal"]
  node_auth_controller["Auth controller<br/>[AuthController.php]"]
  node_auth_service["Auth service<br/>[AuthService.php]"]
  node_home_controller["Portal controller<br/>[HomeController.php]"]
  node_home_service["Dashboard service<br/>[HomeService.php]"]
  node_portal_views["Portal pages"]
end

subgraph group_partner_api["Partner API"]
  node_ticket_controller["Ticket API"]
  node_ticket_service["Ticket workflow<br/>[TicketService.php]"]
  node_location_controller["Location API"]
  node_location_service["Location service"]
end

subgraph group_data["Data access"]
  node_auth_repo["Auth repository<br/>[AuthRepository.php]"]
  node_home_repo["Dashboard repository<br/>[HomeRepository.php]"]
  node_ticket_repo["Ticket repository"]
  node_location_repo["Location repository"]
  node_models["Application models"]
  node_database[("Configured database<br/>[Database.php]")]
end

node_partner(("Partner client"))
node_portal_user(("Portal user"))
node_email["Email delivery"]

node_partner -->|"submits signed"| node_signature
node_signature -.->|"guards requests"| node_ticket_controller
node_routes_ticket -->|"routes to"| node_ticket_controller
node_routes_location -->|"routes to"| node_location_controller
node_ticket_controller -->|"calls"| node_ticket_service
node_ticket_controller -->|"constructs"| node_ticket_repo
node_ticket_service -->|"calls"| node_ticket_repo
node_ticket_repo -->|"queries and writes"| node_models
node_location_controller -->|"calls"| node_location_service
node_location_controller -->|"constructs"| node_location_repo
node_location_service -->|"delegates"| node_location_repo
node_location_repo -->|"queries"| node_models
node_portal_user -->|"uses portal"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_auth_service -->|"calls"| node_auth_repo
node_auth_repo -->|"reads and updates"| node_models
node_auth_controller -->|"renders login"| node_portal_views
node_portal_user -->|"opens portal"| node_home_controller
node_home_controller -->|"checks session"| node_auth_service
node_home_controller -->|"requests data"| node_home_service
node_home_controller -->|"renders pages"| node_portal_views
node_home_service -->|"delegates"| node_home_repo
node_home_repo -->|"queries"| node_models
node_models -.->|"persists through"| node_database
node_ticket_service -.->|"may notify"| node_email

click node_routes_ticket "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Config/Routes/Ticket.php"
click node_routes_location "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Config/Routes/Location.php"
click node_signature "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Filters/AuthenticationSignature.php"
click node_auth_controller "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/AuthController.php"
click node_auth_service "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/AuthService.php"
click node_auth_repo "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/AuthRepository.php"
click node_home_controller "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/HomeController.php"
click node_home_service "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/HomeService.php"
click node_home_repo "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/HomeRepository.php"
click node_ticket_controller "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/api/TicketController.php"
click node_ticket_service "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/TicketService.php"
click node_ticket_repo "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/TicketRepository.php"
click node_location_controller "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/api/LocationController.php"
click node_location_service "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/LocationService.php"
click node_location_repo "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/LocationRepository.php"
click node_models "https://github.com/diamsyah02/api-sf-partner/tree/main/app/Models"
click node_database "https://github.com/diamsyah02/api-sf-partner/blob/main/app/Config/Database.php"
click node_portal_views "https://github.com/diamsyah02/api-sf-partner/tree/main/app/Views"

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_ticket,node_routes_location,node_signature,node_partner,node_portal_user toneBlue
class node_auth_controller,node_auth_service,node_home_controller,node_home_service,node_portal_views toneAmber
class node_ticket_controller,node_ticket_service,node_location_controller,node_location_service toneMint
class node_auth_repo,node_home_repo,node_ticket_repo,node_location_repo,node_models,node_database toneRose
class node_email toneIndigo
```

## Components

### Entry and security

- [Ticket routes](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Config/Routes/Ticket.php): `app/Config/Routes/Ticket.php`
- [Location routes](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Config/Routes/Location.php): `app/Config/Routes/Location.php`
- [Signature filter](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Filters/AuthenticationSignature.php): `app/Filters/AuthenticationSignature.php`

### Identity and portal

- [Auth controller](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/AuthController.php): `app/Controllers/AuthController.php`
- [Auth service](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/AuthService.php): `app/Services/AuthService.php`
- [Portal controller](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/HomeController.php): `app/Controllers/HomeController.php`
- [Dashboard service](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/HomeService.php): `app/Services/HomeService.php`
- [Portal pages](https://github.com/diamsyah02/api-sf-partner/tree/main/app/Views): `app/Views`

### Partner API

- [Ticket API](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/api/TicketController.php): `app/Controllers/api/TicketController.php`
- [Ticket workflow](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/TicketService.php): `app/Services/TicketService.php`
- [Location API](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Controllers/api/LocationController.php): `app/Controllers/api/LocationController.php`
- [Location service](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Services/LocationService.php): `app/Services/LocationService.php`

### Data access

- [Auth repository](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/AuthRepository.php): `app/Repositories/AuthRepository.php`
- [Dashboard repository](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/HomeRepository.php): `app/Repositories/HomeRepository.php`
- [Ticket repository](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/TicketRepository.php): `app/Repositories/TicketRepository.php`
- [Location repository](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Repositories/LocationRepository.php): `app/Repositories/LocationRepository.php`
- [Application models](https://github.com/diamsyah02/api-sf-partner/tree/main/app/Models): `app/Models`
- [Configured database](https://github.com/diamsyah02/api-sf-partner/blob/main/app/Config/Database.php): `app/Config/Database.php`

### Other components

- **Partner client**
- **Portal user**
- **Email delivery**

## Connections

- Partner client → Signature filter: submits signed (evidence: `app/Filters/AuthenticationSignature.php`)
- Signature filter → Ticket API: guards requests
- Ticket routes → Ticket API: routes to (evidence: `app/Config/Routes/Ticket.php`)
- Location routes → Location API: routes to (evidence: `app/Config/Routes/Location.php`)
- Ticket API → Ticket workflow: calls (evidence: `app/Controllers/api/TicketController.php`)
- Ticket API → Ticket repository: constructs (evidence: `app/Controllers/api/TicketController.php`)
- Ticket workflow → Ticket repository: calls (evidence: `app/Services/TicketService.php`)
- Ticket repository → Application models: queries and writes (evidence: `app/Repositories/TicketRepository.php`)
- Location API → Location service: calls (evidence: `app/Controllers/api/LocationController.php`)
- Location API → Location repository: constructs (evidence: `app/Controllers/api/LocationController.php`)
- Location service → Location repository: delegates (evidence: `app/Services/LocationService.php`)
- Location repository → Application models: queries (evidence: `app/Repositories/LocationRepository.php`)
- Portal user → Auth controller: uses portal (evidence: `app/Controllers/AuthController.php`)
- Auth controller → Auth service: calls (evidence: `app/Controllers/AuthController.php`)
- Auth service → Auth repository: calls (evidence: `app/Services/AuthService.php`)
- Auth repository → Application models: reads and updates (evidence: `app/Repositories/AuthRepository.php`)
- Auth controller → Portal pages: renders login (evidence: `app/Controllers/AuthController.php`)
- Portal user → Portal controller: opens portal (evidence: `app/Controllers/HomeController.php`)
- Portal controller → Auth service: checks session (evidence: `app/Controllers/HomeController.php`)
- Portal controller → Dashboard service: requests data (evidence: `app/Controllers/HomeController.php`)
- Portal controller → Portal pages: renders pages (evidence: `app/Controllers/HomeController.php`)
- Dashboard service → Dashboard repository: delegates (evidence: `app/Services/HomeService.php`)
- Dashboard repository → Application models: queries (evidence: `app/Repositories/HomeRepository.php`)
- Application models → Configured database: persists through
- Ticket workflow → Email delivery: may notify
