# joelalvesoliver/restaurante-api architecture

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

- Interactive diagram: https://gitdiagram.com/joelalvesoliver/restaurante-api
- Repository: https://github.com/joelalvesoliver/restaurante-api

## Overview

This repository is a small ASP.NET Core restaurant API with example endpoints for users, menu and orders, plus server-side file management and JSON serialization demonstrations. The main user workflow is registering or logging in, looking up users, and receiving a JWT on successful authentication; a separate workflow uploads, lists, downloads, or removes files. User data and menu data are held in in-memory services. The sampled menu controller returns placeholder text and does not call the menu repository. README content is absent, and some runtime wiring and file-service code were not sampled.

Main entry points: [`Restaurante.Api/Controllers/UsuarioController.cs`](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/UsuarioController.cs) (User Endpoints), [`SimuladorBancoDados/Service/BancoDadosService.cs`](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/BancoDadosService.cs) (User Service), [`SimuladorBancoDados/Service/PratoRepository.cs`](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/PratoRepository.cs) (Dish Repository), [`Restaurante.Api/Controllers/ArquivosController.cs`](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/ArquivosController.cs) (File Endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_users["User Endpoints"]
  node_menu["Menu Endpoints"]
  node_orders["Order Examples"]
  node_json["JSON Examples"]
  node_file_api["File Endpoints"]
end

subgraph group_identity["Users and Menu"]
  node_user_dtos["User DTOs<br/>[DTOs]"]
  node_user_service["User Service"]
  node_user_entity["User Entity<br/>[Usuario.cs]"]
  node_menu_entity["Dish Entity<br/>[Prato.cs]"]
  node_jwt_config["JWT Settings"]
end

subgraph group_files["File Management"]
  node_file_service["File Service<br/>[ArquivoService.cs]"]
  node_disk[("Server Files")]
end

subgraph group_data["In-Memory Data"]
  node_user_store[("User List")]
  node_menu_repository[("Dish Repository<br/>[PratoRepository.cs]")]
  node_menu_interface["Dish Contract"]
end

node_caller(("API Client"))

node_caller -->|"sends requests"| node_users
node_caller -->|"sends requests"| node_menu
node_caller -->|"sends requests"| node_orders
node_caller -->|"sends requests"| node_json
node_caller -->|"sends requests"| node_file_api
node_users -->|"calls"| node_user_service
node_users -->|"maps data"| node_user_dtos
node_user_service -->|"reads and writes"| node_user_store
node_user_service -->|"creates and maps"| node_user_entity
node_users -->|"reads settings"| node_jwt_config
node_menu_repository -->|"implements"| node_menu_interface
node_menu_repository -->|"stores"| node_menu_entity
node_file_api -->|"calls"| node_file_service
node_file_service -->|"reads and writes"| node_disk

click node_users "https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/UsuarioController.cs"
click node_menu "https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/CardapioController.cs"
click node_orders "https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/PedidosController.cs"
click node_json "https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/JsonSoftExemplosController.cs"
click node_file_api "https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/ArquivosController.cs"
click node_user_dtos "https://github.com/joelalvesoliver/restaurante-api/tree/main/Restaurante.Api/DTOs"
click node_user_service "https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/BancoDadosService.cs"
click node_user_store "https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/BancoDadosService.cs"
click node_user_entity "https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Entidade/Usuario.cs"
click node_menu_entity "https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Entidade/Prato.cs"
click node_menu_repository "https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/PratoRepository.cs"
click node_menu_interface "https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Interfaces/IPratoRepository.cs"
click node_file_service "https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Services/ArquivoService.cs"

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_users,node_menu,node_orders,node_json,node_file_api,node_caller toneBlue
class node_user_dtos,node_user_service,node_user_entity,node_menu_entity,node_jwt_config toneAmber
class node_file_service,node_disk toneMint
class node_user_store,node_menu_repository,node_menu_interface toneRose
```

## Components

### HTTP API

- [User Endpoints](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/UsuarioController.cs): `Restaurante.Api/Controllers/UsuarioController.cs`
- [Menu Endpoints](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/CardapioController.cs): `Restaurante.Api/Controllers/CardapioController.cs`
- [Order Examples](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/PedidosController.cs): `Restaurante.Api/Controllers/PedidosController.cs`
- [JSON Examples](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/JsonSoftExemplosController.cs): `Restaurante.Api/Controllers/JsonSoftExemplosController.cs`
- [File Endpoints](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Controllers/ArquivosController.cs): `Restaurante.Api/Controllers/ArquivosController.cs`

### Users and Menu

- [User DTOs](https://github.com/joelalvesoliver/restaurante-api/tree/main/Restaurante.Api/DTOs): `Restaurante.Api/DTOs`
- [User Service](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/BancoDadosService.cs): `SimuladorBancoDados/Service/BancoDadosService.cs`
- [User Entity](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Entidade/Usuario.cs): `SimuladorBancoDados/Entidade/Usuario.cs`
- [Dish Entity](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Entidade/Prato.cs): `SimuladorBancoDados/Entidade/Prato.cs`
- **JWT Settings**

### File Management

- [File Service](https://github.com/joelalvesoliver/restaurante-api/blob/main/Restaurante.Api/Services/ArquivoService.cs): `Restaurante.Api/Services/ArquivoService.cs`
- **Server Files**

### In-Memory Data

- [User List](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/BancoDadosService.cs): `SimuladorBancoDados/Service/BancoDadosService.cs`
- [Dish Repository](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Service/PratoRepository.cs): `SimuladorBancoDados/Service/PratoRepository.cs`
- [Dish Contract](https://github.com/joelalvesoliver/restaurante-api/blob/main/SimuladorBancoDados/Interfaces/IPratoRepository.cs): `SimuladorBancoDados/Interfaces/IPratoRepository.cs`

### Other components

- **API Client**

## Connections

- API Client → User Endpoints: sends requests
- API Client → Menu Endpoints: sends requests
- API Client → Order Examples: sends requests
- API Client → JSON Examples: sends requests
- API Client → File Endpoints: sends requests
- User Endpoints → User Service: calls
- User Endpoints → User DTOs: maps data
- User Service → User List: reads and writes
- User Service → User Entity: creates and maps
- User Endpoints → JWT Settings: reads settings
- Dish Repository → Dish Contract: implements
- Dish Repository → Dish Entity: stores
- File Endpoints → File Service: calls
- File Service → Server Files: reads and writes
