# cesaraugustooo/cinema_autoatendimento_api architecture

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

- Interactive diagram: https://gitdiagram.com/cesaraugustooo/cinema_autoatendimento_api
- Repository: https://github.com/cesaraugustooo/cinema_autoatendimento_api

## Overview

This Laravel API appears to support cinema ticketing: users browse films and sessions, reserve seats through an order, and receive payment/ticket status updates. The clearest sampled workflow is order creation: it validates seats against a session, creates an order and tickets, stores payment information, then requests a payment session. Film, category, room, seat, session, and authentication capabilities are also represented in the tree. Several controller and route files were not sampled, so those subsystem links are shown as unverified where appropriate.

Main entry points: [`routes/api.php`](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/routes/api.php) (API routes), [`app/repositorys`](https://github.com/cesaraugustooo/cinema_autoatendimento_api/tree/master/app/repositorys) (Eloquent repositories), [`app/services/PedidoService.php`](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PedidoService.php) (Order service), [`app/Http/Controllers/SecaoController.php`](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/SecaoController.php) (Session endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API entry"]
  node_http_entry["HTTP bootstrap<br/>[app.php]"]
  node_api_routes["API routes<br/>[api.php]"]
  node_film_controller["Film endpoints"]
  node_seat_controller["Seat endpoints"]
  node_category_controller["Category endpoints"]
  node_session_controller["Session endpoints"]
  node_order_controller["Order endpoints"]
  node_room_controller["Room endpoints<br/>[RoomController.php]"]
  node_auth_controller["Auth endpoints<br/>[AuthController.php]"]
end

subgraph group_catalog["Cinema catalog"]
  node_film_service["Film service<br/>[FilmeService.php]"]
  node_category_service["Category service"]
  node_cinema_models[("Cinema models")]
end

subgraph group_booking["Booking workflow"]
  node_seat_service["Seat service<br/>[AssentoService.php]"]
  node_session_service["Session service<br/>[SecaoService.php]"]
  node_order_service["Order service<br/>[PedidoService.php]"]
  node_payment_service["Payment service"]
  node_gateway_service["Payment gateway"]
end

subgraph group_identity["Identity"]
  node_auth_service["Authentication service<br/>[AuthService.php]"]
end

subgraph group_persistence["Persistence and integrations"]
  node_repository_layer["Eloquent repositories"]
  node_payment_provider["Payment provider"]
  node_database[("Application database")]
end

node_client(("API client"))

node_client -.->|"sends requests"| node_http_entry
node_http_entry -->|"loads routes"| node_api_routes
node_api_routes -->|"routes auth"| node_auth_controller
node_api_routes -.->|"routes requests"| node_film_controller
node_api_routes -.->|"routes requests"| node_seat_controller
node_api_routes -.->|"routes requests"| node_category_controller
node_api_routes -.->|"routes requests"| node_session_controller
node_api_routes -.->|"routes requests"| node_order_controller
node_api_routes -.->|"routes requests"| node_room_controller
node_film_controller -->|"delegates to"| node_film_service
node_category_controller -->|"delegates to"| node_category_service
node_seat_controller -->|"delegates to"| node_seat_service
node_session_controller -->|"delegates to"| node_session_service
node_order_controller -.->|"delegates to"| node_order_service
node_auth_controller -.->|"delegates to"| node_auth_service
node_seat_service -->|"uses seat repository"| node_repository_layer
node_film_service -->|"uses film repository"| node_repository_layer
node_session_controller -->|"calls service"| node_session_service
node_session_service -.->|"uses session repository"| node_repository_layer
node_order_service -->|"reads session and seats"| node_repository_layer
node_order_service -->|"creates order and tickets"| node_repository_layer
node_order_service -->|"stores payment"| node_payment_service
node_order_service -->|"requests payment session"| node_gateway_service
node_gateway_service -.->|"uses gateway"| node_payment_provider
node_payment_service -->|"updates payment and tickets"| node_repository_layer
node_auth_service -->|"finds user"| node_repository_layer
node_repository_layer -.->|"persists records"| node_database
node_payment_provider -.->|"payment callback updates"| node_database

click node_http_entry "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/bootstrap/app.php"
click node_api_routes "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/routes/api.php"
click node_film_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/FilmeController.php"
click node_seat_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/AssentoController.php"
click node_category_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/CategoriaController.php"
click node_session_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/SecaoController.php"
click node_order_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/PedidoController.php"
click node_room_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/RoomController.php"
click node_auth_controller "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/AuthController.php"
click node_film_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/FilmeService.php"
click node_category_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/CategoriaService.php"
click node_cinema_models "https://github.com/cesaraugustooo/cinema_autoatendimento_api/tree/master/app/Models"
click node_seat_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/AssentoService.php"
click node_session_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/SecaoService.php"
click node_order_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PedidoService.php"
click node_payment_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PagamentoService.php"
click node_gateway_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PaymentsGatewayService.php"
click node_auth_service "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/AuthService.php"
click node_repository_layer "https://github.com/cesaraugustooo/cinema_autoatendimento_api/tree/master/app/repositorys"
click node_payment_provider "https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/repositorys/PaymentsMockRepository.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_http_entry,node_api_routes,node_film_controller,node_seat_controller,node_category_controller,node_session_controller,node_order_controller,node_room_controller,node_auth_controller,node_client toneBlue
class node_film_service,node_category_service,node_cinema_models toneAmber
class node_seat_service,node_session_service,node_order_service,node_payment_service,node_gateway_service toneMint
class node_auth_service toneRose
class node_repository_layer,node_payment_provider,node_database toneIndigo
```

## Components

### API entry

- [HTTP bootstrap](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [API routes](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/routes/api.php): `routes/api.php`
- [Film endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/FilmeController.php): `app/Http/Controllers/FilmeController.php`
- [Seat endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/AssentoController.php): `app/Http/Controllers/AssentoController.php`
- [Category endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/CategoriaController.php): `app/Http/Controllers/CategoriaController.php`
- [Session endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/SecaoController.php): `app/Http/Controllers/SecaoController.php`
- [Order endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/PedidoController.php): `app/Http/Controllers/PedidoController.php`
- [Room endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/RoomController.php): `app/Http/Controllers/RoomController.php`
- [Auth endpoints](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`

### Cinema catalog

- [Film service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/FilmeService.php): `app/services/FilmeService.php`
- [Category service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/CategoriaService.php): `app/services/CategoriaService.php`
- [Cinema models](https://github.com/cesaraugustooo/cinema_autoatendimento_api/tree/master/app/Models): `app/Models`

### Booking workflow

- [Seat service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/AssentoService.php): `app/services/AssentoService.php`
- [Session service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/SecaoService.php): `app/services/SecaoService.php`
- [Order service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PedidoService.php): `app/services/PedidoService.php`
- [Payment service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PagamentoService.php): `app/services/PagamentoService.php`
- [Payment gateway](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/PaymentsGatewayService.php): `app/services/PaymentsGatewayService.php`

### Identity

- [Authentication service](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/services/AuthService.php): `app/services/AuthService.php`

### Persistence and integrations

- [Eloquent repositories](https://github.com/cesaraugustooo/cinema_autoatendimento_api/tree/master/app/repositorys): `app/repositorys`
- [Payment provider](https://github.com/cesaraugustooo/cinema_autoatendimento_api/blob/master/app/repositorys/PaymentsMockRepository.php): `app/repositorys/PaymentsMockRepository.php`
- **Application database**

### Other components

- **API client**

## Connections

- API client → HTTP bootstrap: sends requests
- HTTP bootstrap → API routes: loads routes (evidence: `bootstrap/app.php`)
- API routes → Auth endpoints: routes auth (evidence: `routes/api.php`)
- API routes → Film endpoints: routes requests
- API routes → Seat endpoints: routes requests
- API routes → Category endpoints: routes requests
- API routes → Session endpoints: routes requests
- API routes → Order endpoints: routes requests
- API routes → Room endpoints: routes requests
- Film endpoints → Film service: delegates to (evidence: `app/Http/Controllers/FilmeController.php`)
- Category endpoints → Category service: delegates to (evidence: `app/Http/Controllers/CategoriaController.php`)
- Seat endpoints → Seat service: delegates to (evidence: `app/Http/Controllers/AssentoController.php`)
- Session endpoints → Session service: delegates to (evidence: `app/Http/Controllers/SecaoController.php`)
- Order endpoints → Order service: delegates to
- Auth endpoints → Authentication service: delegates to
- Seat service → Eloquent repositories: uses seat repository (evidence: `app/services/AssentoService.php`)
- Film service → Eloquent repositories: uses film repository (evidence: `app/repositorys/FilmeEloquentRepository.php`)
- Session endpoints → Session service: calls service (evidence: `app/Http/Controllers/SecaoController.php`)
- Session service → Eloquent repositories: uses session repository
- Order service → Eloquent repositories: reads session and seats (evidence: `app/services/PedidoService.php`)
- Order service → Eloquent repositories: creates order and tickets (evidence: `app/services/PedidoService.php`)
- Order service → Payment service: stores payment (evidence: `app/services/PedidoService.php`)
- Order service → Payment gateway: requests payment session (evidence: `app/services/PedidoService.php`)
- Payment gateway → Payment provider: uses gateway
- Payment service → Eloquent repositories: updates payment and tickets (evidence: `app/services/PagamentoService.php`)
- Authentication service → Eloquent repositories: finds user (evidence: `app/services/AuthService.php`)
- Eloquent repositories → Application database: persists records
- Payment provider → Application database: payment callback updates
