# xvi-r/filesystem architecture

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

- Interactive diagram: https://gitdiagram.com/xvi-r/filesystem
- Repository: https://github.com/xvi-r/filesystem

## Overview

AirTortilla is a Spring Boot web application for processing flight-reservation CSVs and browsing the generated partitions. Users can upload a whole CSV or send it line by line; the backend assigns ticket identifiers, groups matching passengers with shared locators, and writes destination-specific CSVs. Users can then inspect files and reservations or download a ZIP, either in batch or line-by-line. The README documents these capabilities and service responsibilities; source excerpts are limited to parts of the frontend, so internal backend call relationships are not asserted as verified.

Main entry points: [`src/main/java/com/example/demo/controller/CsvController.java`](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/controller/CsvController.java) (CSV controller), [`src/main/resources/static/app.js`](https://github.com/xvi-r/filesystem/blob/main/src/main/resources/static/app.js) (Operations portal), [`src/main/java/com/example/demo/service/CsvService.java`](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/CsvService.java) (CSV processing), [`src/main/java/com/example/demo/service/IdentifierService.java`](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/IdentifierService.java) (Ticket identifiers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_webapp["Operations portal<br/>[app.js]"]
  node_html["Portal page<br/>[index.html]"]
end

subgraph group_api["HTTP API"]
  node_api_controller["CSV controller<br/>[CsvController.java]"]
  node_error_handler["Error handling"]
end

subgraph group_processing["Reservation processing"]
  node_csv_service["CSV processing<br/>[CsvService.java]"]
  node_mapper["Reservation mapping"]
  node_reservation["Reservation records<br/>[Reserva.java]"]
  node_person["Passenger records<br/>[Person.java]"]
  node_identifier["Ticket identifiers"]
  node_localizer["Collision locators"]
end

subgraph group_files["File output and consultation"]
  node_file_store["Generated CSV files"]
  node_zip_service["ZIP packaging<br/>[ZipService.java]"]
  node_localizer_state["Persisted counters"]
  node_consult_state["Consultation state"]
end

node_user(("Operator"))

node_user -->|"uses"| node_webapp
node_html -.->|"hosts"| node_webapp
node_webapp -->|"uploads CSV"| node_api_controller
node_webapp -->|"sends lines"| node_api_controller
node_webapp -->|"requests ZIP"| node_api_controller
node_webapp -->|"initializes consultation"| node_api_controller
node_webapp -->|"fetches reservation line"| node_api_controller
node_api_controller -.->|"processes reservations"| node_csv_service
node_csv_service -.->|"assigns IDs"| node_identifier
node_csv_service -.->|"detects collisions"| node_localizer
node_csv_service -->|"writes partitions"| node_file_store
node_localizer -->|"persists locator counter"| node_localizer_state
node_identifier -->|"persists ticket counter"| node_localizer_state
node_api_controller -.->|"packages partitions"| node_zip_service
node_zip_service -->|"reads partitions"| node_file_store
node_api_controller -->|"lists and reads"| node_file_store
node_api_controller -->|"initializes navigation"| node_consult_state

click node_webapp "https://github.com/xvi-r/filesystem/blob/main/src/main/resources/static/app.js"
click node_html "https://github.com/xvi-r/filesystem/blob/main/src/main/resources/static/index.html"
click node_api_controller "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/controller/CsvController.java"
click node_error_handler "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/exception/GlobalExceptionHandler.java"
click node_csv_service "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/CsvService.java"
click node_mapper "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/mapper/ReservasMapper.java"
click node_reservation "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/model/Reserva.java"
click node_person "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/model/Person.java"
click node_identifier "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/IdentifierService.java"
click node_localizer "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/LocalizerService.java"
click node_zip_service "https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/ZipService.java"

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_webapp,node_html toneBlue
class node_api_controller,node_error_handler toneAmber
class node_csv_service,node_mapper,node_reservation,node_person,node_identifier,node_localizer toneMint
class node_file_store,node_zip_service,node_localizer_state,node_consult_state toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [Operations portal](https://github.com/xvi-r/filesystem/blob/main/src/main/resources/static/app.js): `src/main/resources/static/app.js`
- [Portal page](https://github.com/xvi-r/filesystem/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`

### HTTP API

- [CSV controller](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/controller/CsvController.java): `src/main/java/com/example/demo/controller/CsvController.java`
- [Error handling](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/exception/GlobalExceptionHandler.java): `src/main/java/com/example/demo/exception/GlobalExceptionHandler.java`

### Reservation processing

- [CSV processing](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/CsvService.java): `src/main/java/com/example/demo/service/CsvService.java`
- [Reservation mapping](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/mapper/ReservasMapper.java): `src/main/java/com/example/demo/mapper/ReservasMapper.java`
- [Reservation records](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/model/Reserva.java): `src/main/java/com/example/demo/model/Reserva.java`
- [Passenger records](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/model/Person.java): `src/main/java/com/example/demo/model/Person.java`
- [Ticket identifiers](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/IdentifierService.java): `src/main/java/com/example/demo/service/IdentifierService.java`
- [Collision locators](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/LocalizerService.java): `src/main/java/com/example/demo/service/LocalizerService.java`

### File output and consultation

- **Generated CSV files**
- [ZIP packaging](https://github.com/xvi-r/filesystem/blob/main/src/main/java/com/example/demo/service/ZipService.java): `src/main/java/com/example/demo/service/ZipService.java`
- **Persisted counters**
- **Consultation state**

### Other components

- **Operator**

## Connections

- Operator → Operations portal: uses (evidence: `README.md`)
- Portal page → Operations portal: hosts
- Operations portal → CSV controller: uploads CSV (evidence: `src/main/resources/static/app.js`)
- Operations portal → CSV controller: sends lines (evidence: `src/main/resources/static/app.js`)
- Operations portal → CSV controller: requests ZIP (evidence: `README.md`)
- Operations portal → CSV controller: initializes consultation (evidence: `src/main/resources/static/app.js`)
- Operations portal → CSV controller: fetches reservation line (evidence: `src/main/resources/static/app.js`)
- CSV controller → CSV processing: processes reservations
- CSV processing → Ticket identifiers: assigns IDs
- CSV processing → Collision locators: detects collisions
- CSV processing → Generated CSV files: writes partitions (evidence: `README.md`)
- Collision locators → Persisted counters: persists locator counter (evidence: `README.md`)
- Ticket identifiers → Persisted counters: persists ticket counter (evidence: `README.md`)
- CSV controller → ZIP packaging: packages partitions
- ZIP packaging → Generated CSV files: reads partitions (evidence: `README.md`)
- CSV controller → Generated CSV files: lists and reads (evidence: `README.md`)
- CSV controller → Consultation state: initializes navigation (evidence: `README.md`)
