# nickeduardos/cadveiculos architecture

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

- Interactive diagram: https://gitdiagram.com/nickeduardos/cadveiculos
- Repository: https://github.com/nickeduardos/cadveiculos

## Overview

CadVeiculos is a terminal-based vehicle registry. The user selects menu actions in Main, which delegates registration, listing, and plate lookup to Functions; those operations validate and manage Veiculo objects held in an in-memory list. Input handles integer prompts. The README documents year checks, duplicate-plate prevention, and data loss at exit; excerpts show the operation and model behavior. The list is owned by Main and passed to Functions. No persistent store or external service is shown.

Main entry points: [`Main.java`](https://github.com/nickeduardos/cadveiculos/blob/main/Main.java) (Menu controller), [`Functions.java`](https://github.com/nickeduardos/cadveiculos/blob/main/Functions.java) (Vehicle operations), [`Input.java`](https://github.com/nickeduardos/cadveiculos/blob/main/Input.java) (Integer input), [`Veiculo.java`](https://github.com/nickeduardos/cadveiculos/blob/main/Veiculo.java) (Vehicle model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Terminal interaction"]
  node_main["Menu controller<br/>[Main.java]"]
  node_input["Integer input<br/>[Input.java]"]
end

subgraph group_operations["Vehicle operations"]
  node_functions["Vehicle operations<br/>[Functions.java]"]
  node_vehicle["Vehicle model<br/>[Veiculo.java]"]
end

subgraph group_state["In-memory state"]
  node_vehicle_list[("Vehicle list<br/>[Main.java]")]
end

node_user(("User"))

node_user -->|"chooses action"| node_main
node_main -->|"shows menu"| node_user
node_main -->|"reads option"| node_input
node_main -->|"dispatches action"| node_functions
node_main -->|"creates list"| node_vehicle_list
node_functions -->|"reads and updates"| node_vehicle_list
node_functions -->|"creates and reads"| node_vehicle
node_functions -->|"reads year"| node_input

click node_main "https://github.com/nickeduardos/cadveiculos/blob/main/Main.java"
click node_input "https://github.com/nickeduardos/cadveiculos/blob/main/Input.java"
click node_functions "https://github.com/nickeduardos/cadveiculos/blob/main/Functions.java"
click node_vehicle "https://github.com/nickeduardos/cadveiculos/blob/main/Veiculo.java"
click node_vehicle_list "https://github.com/nickeduardos/cadveiculos/blob/main/Main.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_main,node_input,node_user toneBlue
class node_functions,node_vehicle toneAmber
class node_vehicle_list toneMint
```

## Components

### Terminal interaction

- [Menu controller](https://github.com/nickeduardos/cadveiculos/blob/main/Main.java): `Main.java`
- [Integer input](https://github.com/nickeduardos/cadveiculos/blob/main/Input.java): `Input.java`

### Vehicle operations

- [Vehicle operations](https://github.com/nickeduardos/cadveiculos/blob/main/Functions.java): `Functions.java`
- [Vehicle model](https://github.com/nickeduardos/cadveiculos/blob/main/Veiculo.java): `Veiculo.java`

### In-memory state

- [Vehicle list](https://github.com/nickeduardos/cadveiculos/blob/main/Main.java): `Main.java`

### Other components

- **User**

## Connections

- User → Menu controller: chooses action (evidence: `README.md`)
- Menu controller → User: shows menu (evidence: `Main.java`)
- Menu controller → Integer input: reads option (evidence: `Main.java`)
- Menu controller → Vehicle operations: dispatches action (evidence: `Main.java`)
- Menu controller → Vehicle list: creates list (evidence: `Main.java`)
- Vehicle operations → Vehicle list: reads and updates (evidence: `Functions.java`)
- Vehicle operations → Vehicle model: creates and reads (evidence: `Functions.java`)
- Vehicle operations → Integer input: reads year (evidence: `Functions.java`)
