# sofia727/projeto_final_prog architecture

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

- Interactive diagram: https://gitdiagram.com/sofia727/projeto_final_prog
- Repository: https://github.com/sofia727/projeto_final_prog

## Overview

This Java console application models a library: the user interacts through a menu to register clients and books, record rentals and returns, and request stock or rental reports. The main workflow is handled by `src/projeto/Main.java`, which invokes the library operations and passes data to the librarian for reports. The repository also contains an older parallel implementation under `projeto/`; this map focuses on the richer `src/projeto/` version. Edges are limited to relationships visible in the excerpts or README.

Main entry points: [`src/projeto/Main.java`](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Main.java) (Menu workflow), [`src/projeto/Bibliotecario.java`](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Bibliotecario.java) (Librarian reports), [`src/projeto/Biblioteca.java`](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Biblioteca.java) (Library manager), [`src/projeto/Cliente.java`](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Cliente.java) (Client record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Console interaction"]
  node_main["Menu workflow<br/>[Main.java]"]
end

subgraph group_library_ops["Library operations"]
  node_library["Library manager<br/>[Biblioteca.java]"]
  node_librarian["Librarian reports<br/>[Bibliotecario.java]"]
end

subgraph group_domain["People and records"]
  node_client["Client record<br/>[Cliente.java]"]
  node_book["Book record<br/>[Livro.java]"]
  node_rental["Rental record<br/>[Aluguel.java]"]
  node_person["Person fields<br/>[Pessoa.java]"]
end

node_user(("Library user"))

node_user -->|"selects actions"| node_main
node_main -->|"manages records"| node_library
node_main -->|"creates clients"| node_client
node_main -->|"creates books"| node_book
node_main -->|"creates rentals"| node_rental
node_main -->|"requests reports"| node_librarian
node_library -->|"supplies report data"| node_librarian
node_client -->|"extends"| node_person
node_librarian -->|"extends"| node_person

click node_main "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Main.java"
click node_library "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Biblioteca.java"
click node_librarian "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Bibliotecario.java"
click node_client "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Cliente.java"
click node_book "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Livro.java"
click node_rental "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Aluguel.java"
click node_person "https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Pessoa.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_user toneBlue
class node_library,node_librarian toneAmber
class node_client,node_book,node_rental,node_person toneMint
```

## Components

### Console interaction

- [Menu workflow](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Main.java): `src/projeto/Main.java`

### Library operations

- [Library manager](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Biblioteca.java): `src/projeto/Biblioteca.java`
- [Librarian reports](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Bibliotecario.java): `src/projeto/Bibliotecario.java`

### People and records

- [Client record](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Cliente.java): `src/projeto/Cliente.java`
- [Book record](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Livro.java): `src/projeto/Livro.java`
- [Rental record](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Aluguel.java): `src/projeto/Aluguel.java`
- [Person fields](https://github.com/sofia727/projeto_final_prog/blob/main/src/projeto/Pessoa.java): `src/projeto/Pessoa.java`

### Other components

- **Library user**

## Connections

- Library user → Menu workflow: selects actions (evidence: `src/projeto/Main.java`)
- Menu workflow → Library manager: manages records (evidence: `src/projeto/Main.java`)
- Menu workflow → Client record: creates clients (evidence: `src/projeto/Main.java`)
- Menu workflow → Book record: creates books (evidence: `src/projeto/Main.java`)
- Menu workflow → Rental record: creates rentals (evidence: `src/projeto/Main.java`)
- Menu workflow → Librarian reports: requests reports (evidence: `src/projeto/Main.java`)
- Library manager → Librarian reports: supplies report data
- Client record → Person fields: extends (evidence: `src/projeto/Cliente.java`)
- Librarian reports → Person fields: extends (evidence: `src/projeto/Bibliotecario.java`)
