# maiconroch06/agenda-system architecture

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

- Interactive diagram: https://gitdiagram.com/maiconroch06/agenda-system
- Repository: https://github.com/maiconroch06/agenda-system

## Overview

Agenda System is a Flask application for a barbershop: clients can register and sign in, while the product also includes barber and manager interfaces and scheduling-related domain entities. The visible client workflow runs from an HTTP route through authentication and user persistence; the manager login similarly delegates to its controller. The README does not describe domain capabilities in detail, so scheduling, service, and staff features are represented from the repository’s named modules and frontend files without asserting unshown runtime links. Several routes and models were not excerpted, limiting the relationships shown.

Main entry points: [`main.py`](https://github.com/maiconroch06/agenda-system/blob/main/main.py) (Flask application), [`database/seed.py`](https://github.com/maiconroch06/agenda-system/blob/main/database/seed.py) (Initial data), [`controllers/autenticador_cliente_controller.py`](https://github.com/maiconroch06/agenda-system/blob/main/controllers/autenticador_cliente_controller.py) (Client authentication), [`database/database_create.py`](https://github.com/maiconroch06/agenda-system/blob/main/database/database_create.py) (Database setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Flask application<br/>[main.py]"]
  node_public_routes["Public routes<br/>[public_route.py]"]
  node_client_routes["Client routes<br/>[cliente_route.py]"]
  node_barber_routes["Barber routes<br/>[barbeiro_route.py]"]
  node_manager_routes["Manager routes<br/>[gestor_route.py]"]
  node_booking_ui["Booking interface<br/>[agendamentos.js]"]
  node_barber_ui["Barber panel"]
  node_manager_ui["Manager panel"]
end

subgraph group_identity["Identity and access"]
  node_client_auth["Client authentication"]
  node_manager_auth["Manager authentication"]
end

subgraph group_domain["Scheduling domain"]
  node_user["User account<br/>[usuarios.py]"]
  node_client_entity["Client profile<br/>[Cliente.py]"]
  node_manager_entity["Manager profile<br/>[gestor.py]"]
  node_barber_entity["Barber profile<br/>[barbeiros.py]"]
  node_shop["Barbershop<br/>[Barbearia.py]"]
  node_services["Services<br/>[Servicos.py]"]
  node_barber_services["Barber services"]
  node_appointments["Appointments<br/>[Agendamento.py]"]
  node_shop_hours["Shop hours"]
  node_barber_hours["Barber hours"]
  node_weekdays["Weekdays<br/>[dias_da_semana.py]"]
  node_address["Address<br/>[Endereco.py]"]
  node_states["States<br/>[estados.py]"]
end

subgraph group_storage["Persistence"]
  node_database[("Database setup<br/>[database_create.py]")]
  node_seed["Initial data<br/>[seed.py]"]
  node_address_repository["Address repository"]
end

node_client(("Client"))

node_client -->|"sends requests"| node_client_routes
node_app -->|"configures database"| node_database
node_app -->|"initializes data"| node_seed
node_app -->|"registers blueprint"| node_public_routes
node_app -->|"registers blueprint"| node_client_routes
node_app -->|"registers blueprint"| node_barber_routes
node_app -->|"registers blueprint"| node_manager_routes
node_client_routes -->|"delegates login"| node_client_auth
node_client_auth -->|"creates account"| node_user
node_client_auth -->|"looks up client"| node_client_entity
node_client_auth -->|"commits registration"| node_database
node_manager_routes -->|"delegates login"| node_manager_auth
node_manager_auth -->|"looks up manager"| node_manager_entity
node_manager_auth -->|"gets shop CNPJ"| node_shop
node_user -->|"uses ORM"| node_database
node_manager_entity -->|"uses ORM"| node_database
node_seed -->|"seeds defaults"| node_states
node_seed -->|"creates address"| node_address
node_seed -->|"creates barbershop"| node_shop
node_seed -->|"creates manager account"| node_user
node_seed -->|"creates manager record"| node_manager_entity

click node_app "https://github.com/maiconroch06/agenda-system/blob/main/main.py"
click node_public_routes "https://github.com/maiconroch06/agenda-system/blob/main/routers/public_route.py"
click node_client_routes "https://github.com/maiconroch06/agenda-system/blob/main/routers/cliente_route.py"
click node_barber_routes "https://github.com/maiconroch06/agenda-system/blob/main/routers/barbeiro_route.py"
click node_manager_routes "https://github.com/maiconroch06/agenda-system/blob/main/routers/gestor_route.py"
click node_booking_ui "https://github.com/maiconroch06/agenda-system/blob/main/static/js/agendamentos.js"
click node_barber_ui "https://github.com/maiconroch06/agenda-system/blob/main/static/js/barbeiro-painel-interativo.js"
click node_manager_ui "https://github.com/maiconroch06/agenda-system/blob/main/static/js/gestor-painel-dinamico.js"
click node_client_auth "https://github.com/maiconroch06/agenda-system/blob/main/controllers/autenticador_cliente_controller.py"
click node_manager_auth "https://github.com/maiconroch06/agenda-system/blob/main/controllers/autenticador_gestor_controller.py"
click node_user "https://github.com/maiconroch06/agenda-system/blob/main/models/usuarios.py"
click node_client_entity "https://github.com/maiconroch06/agenda-system/blob/main/models/Cliente.py"
click node_manager_entity "https://github.com/maiconroch06/agenda-system/blob/main/models/gestor.py"
click node_barber_entity "https://github.com/maiconroch06/agenda-system/blob/main/models/barbeiros.py"
click node_shop "https://github.com/maiconroch06/agenda-system/blob/main/models/Barbearia.py"
click node_services "https://github.com/maiconroch06/agenda-system/blob/main/models/Servicos.py"
click node_barber_services "https://github.com/maiconroch06/agenda-system/blob/main/models/barbeiro_has_servicos.py"
click node_appointments "https://github.com/maiconroch06/agenda-system/blob/main/models/Agendamento.py"
click node_shop_hours "https://github.com/maiconroch06/agenda-system/blob/main/models/horarios_barbearia.py"
click node_barber_hours "https://github.com/maiconroch06/agenda-system/blob/main/models/horarios_barbeiro.py"
click node_weekdays "https://github.com/maiconroch06/agenda-system/blob/main/models/dias_da_semana.py"
click node_address "https://github.com/maiconroch06/agenda-system/blob/main/models/Endereco.py"
click node_states "https://github.com/maiconroch06/agenda-system/blob/main/models/estados.py"
click node_database "https://github.com/maiconroch06/agenda-system/blob/main/database/database_create.py"
click node_seed "https://github.com/maiconroch06/agenda-system/blob/main/database/seed.py"
click node_address_repository "https://github.com/maiconroch06/agenda-system/blob/main/repository/repository_address.py"

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_app,node_public_routes,node_client_routes,node_barber_routes,node_manager_routes,node_booking_ui,node_barber_ui,node_manager_ui,node_client toneBlue
class node_client_auth,node_manager_auth toneAmber
class node_user,node_client_entity,node_manager_entity,node_barber_entity,node_shop,node_services,node_barber_services,node_appointments,node_shop_hours,node_barber_hours,node_weekdays,node_address,node_states toneMint
class node_database,node_seed,node_address_repository toneRose
```

## Components

### Web application

- [Flask application](https://github.com/maiconroch06/agenda-system/blob/main/main.py): `main.py`
- [Public routes](https://github.com/maiconroch06/agenda-system/blob/main/routers/public_route.py): `routers/public_route.py`
- [Client routes](https://github.com/maiconroch06/agenda-system/blob/main/routers/cliente_route.py): `routers/cliente_route.py`
- [Barber routes](https://github.com/maiconroch06/agenda-system/blob/main/routers/barbeiro_route.py): `routers/barbeiro_route.py`
- [Manager routes](https://github.com/maiconroch06/agenda-system/blob/main/routers/gestor_route.py): `routers/gestor_route.py`
- [Booking interface](https://github.com/maiconroch06/agenda-system/blob/main/static/js/agendamentos.js): `static/js/agendamentos.js`
- [Barber panel](https://github.com/maiconroch06/agenda-system/blob/main/static/js/barbeiro-painel-interativo.js): `static/js/barbeiro-painel-interativo.js`
- [Manager panel](https://github.com/maiconroch06/agenda-system/blob/main/static/js/gestor-painel-dinamico.js): `static/js/gestor-painel-dinamico.js`

### Identity and access

- [Client authentication](https://github.com/maiconroch06/agenda-system/blob/main/controllers/autenticador_cliente_controller.py): `controllers/autenticador_cliente_controller.py`
- [Manager authentication](https://github.com/maiconroch06/agenda-system/blob/main/controllers/autenticador_gestor_controller.py): `controllers/autenticador_gestor_controller.py`

### Scheduling domain

- [User account](https://github.com/maiconroch06/agenda-system/blob/main/models/usuarios.py): `models/usuarios.py`
- [Client profile](https://github.com/maiconroch06/agenda-system/blob/main/models/Cliente.py): `models/Cliente.py`
- [Manager profile](https://github.com/maiconroch06/agenda-system/blob/main/models/gestor.py): `models/gestor.py`
- [Barber profile](https://github.com/maiconroch06/agenda-system/blob/main/models/barbeiros.py): `models/barbeiros.py`
- [Barbershop](https://github.com/maiconroch06/agenda-system/blob/main/models/Barbearia.py): `models/Barbearia.py`
- [Services](https://github.com/maiconroch06/agenda-system/blob/main/models/Servicos.py): `models/Servicos.py`
- [Barber services](https://github.com/maiconroch06/agenda-system/blob/main/models/barbeiro_has_servicos.py): `models/barbeiro_has_servicos.py`
- [Appointments](https://github.com/maiconroch06/agenda-system/blob/main/models/Agendamento.py): `models/Agendamento.py`
- [Shop hours](https://github.com/maiconroch06/agenda-system/blob/main/models/horarios_barbearia.py): `models/horarios_barbearia.py`
- [Barber hours](https://github.com/maiconroch06/agenda-system/blob/main/models/horarios_barbeiro.py): `models/horarios_barbeiro.py`
- [Weekdays](https://github.com/maiconroch06/agenda-system/blob/main/models/dias_da_semana.py): `models/dias_da_semana.py`
- [Address](https://github.com/maiconroch06/agenda-system/blob/main/models/Endereco.py): `models/Endereco.py`
- [States](https://github.com/maiconroch06/agenda-system/blob/main/models/estados.py): `models/estados.py`

### Persistence

- [Database setup](https://github.com/maiconroch06/agenda-system/blob/main/database/database_create.py): `database/database_create.py`
- [Initial data](https://github.com/maiconroch06/agenda-system/blob/main/database/seed.py): `database/seed.py`
- [Address repository](https://github.com/maiconroch06/agenda-system/blob/main/repository/repository_address.py): `repository/repository_address.py`

### Other components

- **Client**

## Connections

- Client → Client routes: sends requests (evidence: `routers/cliente_route.py`)
- Flask application → Database setup: configures database (evidence: `main.py`)
- Flask application → Initial data: initializes data (evidence: `main.py`)
- Flask application → Public routes: registers blueprint (evidence: `main.py`)
- Flask application → Client routes: registers blueprint (evidence: `main.py`)
- Flask application → Barber routes: registers blueprint (evidence: `main.py`)
- Flask application → Manager routes: registers blueprint (evidence: `main.py`)
- Client routes → Client authentication: delegates login (evidence: `routers/cliente_route.py`)
- Client authentication → User account: creates account (evidence: `controllers/autenticador_cliente_controller.py`)
- Client authentication → Client profile: looks up client (evidence: `controllers/autenticador_cliente_controller.py`)
- Client authentication → Database setup: commits registration (evidence: `controllers/autenticador_cliente_controller.py`)
- Manager routes → Manager authentication: delegates login (evidence: `routers/gestor_route.py`)
- Manager authentication → Manager profile: looks up manager (evidence: `controllers/autenticador_gestor_controller.py`)
- Manager authentication → Barbershop: gets shop CNPJ (evidence: `controllers/autenticador_gestor_controller.py`)
- User account → Database setup: uses ORM (evidence: `models/usuarios.py`)
- Manager profile → Database setup: uses ORM (evidence: `models/gestor.py`)
- Initial data → States: seeds defaults (evidence: `database/seed.py`)
- Initial data → Address: creates address (evidence: `database/seed.py`)
- Initial data → Barbershop: creates barbershop (evidence: `database/seed.py`)
- Initial data → User account: creates manager account (evidence: `database/seed.py`)
- Initial data → Manager profile: creates manager record (evidence: `database/seed.py`)
