# vazlucas3/contae-web architecture

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

- Interactive diagram: https://gitdiagram.com/vazlucas3/contae-web
- Repository: https://github.com/vazlucas3/contae-web

## Overview

ContaÊ is a personal-finance frontend. Users sign in or register, then enter protected screens for an overview, transactions, accounts, categories, reports, and profile management; transaction screens support filtering and CRUD operations. The app routes requests through resource services and a shared HTTP layer to the ContaÊ API. The graph reflects routes and dependencies documented in the README and SOURCE INDEX; unsampled page and service internals are represented at their known paths without inferring unshown call details.

Main entry points: [`src/routes/router.tsx`](https://github.com/vazlucas3/contae-web/blob/main/src/routes/router.tsx) (Route configuration), [`src/services/index.ts`](https://github.com/vazlucas3/contae-web/blob/main/src/services/index.ts) (Resource services), [`src/services/http.ts`](https://github.com/vazlucas3/contae-web/blob/main/src/services/http.ts) (HTTP client), [`src/contexts/AuthProvider.tsx`](https://github.com/vazlucas3/contae-web/blob/main/src/contexts/AuthProvider.tsx) (Auth state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and routing"]
  node_app["Application root<br/>[App.tsx]"]
  node_router["Route configuration<br/>[router.tsx]"]
  node_protected["Protected routes<br/>[RotaProtegida.tsx]"]
  node_app_layout["App layout<br/>[AppLayout.tsx]"]
  node_auth_layout["Auth layout<br/>[AuthLayout.tsx]"]
end

subgraph group_identity["Authentication"]
  node_login["Login and registration<br/>[Login.tsx]"]
  node_auth_provider["Auth state<br/>[AuthProvider.tsx]"]
  node_auth_context["Auth context<br/>[AuthContext.tsx]"]
  node_auth_hook["Auth hook<br/>[useAuth.ts]"]
  node_token["Token storage"]
end

subgraph group_finance["Finance screens"]
  node_home["Financial overview<br/>[Inicio.tsx]"]
  node_transactions["Transactions<br/>[Movimentacoes.tsx]"]
  node_accounts["Accounts<br/>[Contas.tsx]"]
  node_categories["Categories<br/>[Categorias.tsx]"]
  node_reports["Reports<br/>[Relatorio.tsx]"]
  node_profile["Profile<br/>[Perfil.tsx]"]
end

subgraph group_data["API and services"]
  node_services["Resource services<br/>[index.ts]"]
  node_auth_service["Authentication service<br/>[authService.ts]"]
  node_movement_service["Transaction service"]
  node_account_service["Account service<br/>[contaService.ts]"]
  node_category_service["Category service"]
  node_http["HTTP client<br/>[http.ts]"]
  node_env["API configuration<br/>[env.ts]"]
end

node_browser(("User / browser"))
node_api["ContaÊ API"]

node_browser -->|"opens"| node_app
node_app -->|"wraps"| node_auth_provider
node_app -->|"renders"| node_router
node_router -->|"routes auth"| node_auth_layout
node_router -->|"routes auth"| node_login
node_router -->|"guards screens"| node_protected
node_router -->|"routes screens"| node_app_layout
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_transactions
node_router -->|"routes to"| node_accounts
node_router -->|"routes to"| node_categories
node_router -->|"routes to"| node_reports
node_router -->|"routes to"| node_profile
node_auth_provider -->|"provides state"| node_auth_context
node_auth_provider -->|"logs in via"| node_auth_service
node_auth_provider -->|"stores token"| node_token
node_login -->|"uses auth"| node_auth_hook
node_auth_hook -->|"reads context"| node_auth_context
node_auth_service -->|"posts login"| node_http
node_transactions -->|"uses operations"| node_movement_service
node_transactions -->|"loads accounts"| node_account_service
node_transactions -->|"loads categories"| node_category_service
node_home -->|"loads overview data"| node_services
node_categories -->|"uses services"| node_services
node_reports -->|"uses services"| node_services
node_profile -->|"uses services"| node_services
node_services -->|"exports"| node_movement_service
node_services -->|"exports"| node_account_service
node_services -->|"exports"| node_category_service
node_movement_service -->|"sends requests"| node_http
node_category_service -->|"sends requests"| node_http
node_http -->|"reads config"| node_env
node_http -->|"reads token"| node_token
node_http -->|"calls API"| node_api

click node_app "https://github.com/vazlucas3/contae-web/blob/main/src/App.tsx"
click node_router "https://github.com/vazlucas3/contae-web/blob/main/src/routes/router.tsx"
click node_protected "https://github.com/vazlucas3/contae-web/blob/main/src/routes/RotaProtegida.tsx"
click node_app_layout "https://github.com/vazlucas3/contae-web/blob/main/src/components/layout/AppLayout/AppLayout.tsx"
click node_auth_layout "https://github.com/vazlucas3/contae-web/blob/main/src/components/layout/AuthLayout/AuthLayout.tsx"
click node_login "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Login/Login.tsx"
click node_auth_provider "https://github.com/vazlucas3/contae-web/blob/main/src/contexts/AuthProvider.tsx"
click node_auth_context "https://github.com/vazlucas3/contae-web/blob/main/src/contexts/AuthContext.tsx"
click node_auth_hook "https://github.com/vazlucas3/contae-web/blob/main/src/hooks/useAuth.ts"
click node_token "https://github.com/vazlucas3/contae-web/blob/main/src/services/armazenamentoToken.ts"
click node_home "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Inicio/Inicio.tsx"
click node_transactions "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Movimentacoes/Movimentacoes.tsx"
click node_accounts "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Contas/Contas.tsx"
click node_categories "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Categorias/Categorias.tsx"
click node_reports "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Relatorio/Relatorio.tsx"
click node_profile "https://github.com/vazlucas3/contae-web/blob/main/src/pages/Perfil/Perfil.tsx"
click node_services "https://github.com/vazlucas3/contae-web/blob/main/src/services/index.ts"
click node_auth_service "https://github.com/vazlucas3/contae-web/blob/main/src/services/authService.ts"
click node_movement_service "https://github.com/vazlucas3/contae-web/blob/main/src/services/movimentacaoService.ts"
click node_account_service "https://github.com/vazlucas3/contae-web/blob/main/src/services/contaService.ts"
click node_category_service "https://github.com/vazlucas3/contae-web/blob/main/src/services/categoriaService.ts"
click node_http "https://github.com/vazlucas3/contae-web/blob/main/src/services/http.ts"
click node_env "https://github.com/vazlucas3/contae-web/blob/main/src/config/env.ts"

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_router,node_protected,node_app_layout,node_auth_layout,node_browser toneBlue
class node_login,node_auth_provider,node_auth_context,node_auth_hook,node_token toneAmber
class node_home,node_transactions,node_accounts,node_categories,node_reports,node_profile,node_api toneMint
class node_services,node_auth_service,node_movement_service,node_account_service,node_category_service,node_http,node_env toneRose
```

## Components

### App and routing

- [Application root](https://github.com/vazlucas3/contae-web/blob/main/src/App.tsx): `src/App.tsx`
- [Route configuration](https://github.com/vazlucas3/contae-web/blob/main/src/routes/router.tsx): `src/routes/router.tsx`
- [Protected routes](https://github.com/vazlucas3/contae-web/blob/main/src/routes/RotaProtegida.tsx): `src/routes/RotaProtegida.tsx`
- [App layout](https://github.com/vazlucas3/contae-web/blob/main/src/components/layout/AppLayout/AppLayout.tsx): `src/components/layout/AppLayout/AppLayout.tsx`
- [Auth layout](https://github.com/vazlucas3/contae-web/blob/main/src/components/layout/AuthLayout/AuthLayout.tsx): `src/components/layout/AuthLayout/AuthLayout.tsx`

### Authentication

- [Login and registration](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Login/Login.tsx): `src/pages/Login/Login.tsx`
- [Auth state](https://github.com/vazlucas3/contae-web/blob/main/src/contexts/AuthProvider.tsx): `src/contexts/AuthProvider.tsx`
- [Auth context](https://github.com/vazlucas3/contae-web/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Auth hook](https://github.com/vazlucas3/contae-web/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [Token storage](https://github.com/vazlucas3/contae-web/blob/main/src/services/armazenamentoToken.ts): `src/services/armazenamentoToken.ts`

### Finance screens

- [Financial overview](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Inicio/Inicio.tsx): `src/pages/Inicio/Inicio.tsx`
- [Transactions](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Movimentacoes/Movimentacoes.tsx): `src/pages/Movimentacoes/Movimentacoes.tsx`
- [Accounts](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Contas/Contas.tsx): `src/pages/Contas/Contas.tsx`
- [Categories](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Categorias/Categorias.tsx): `src/pages/Categorias/Categorias.tsx`
- [Reports](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Relatorio/Relatorio.tsx): `src/pages/Relatorio/Relatorio.tsx`
- [Profile](https://github.com/vazlucas3/contae-web/blob/main/src/pages/Perfil/Perfil.tsx): `src/pages/Perfil/Perfil.tsx`

### API and services

- [Resource services](https://github.com/vazlucas3/contae-web/blob/main/src/services/index.ts): `src/services/index.ts`
- [Authentication service](https://github.com/vazlucas3/contae-web/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [Transaction service](https://github.com/vazlucas3/contae-web/blob/main/src/services/movimentacaoService.ts): `src/services/movimentacaoService.ts`
- [Account service](https://github.com/vazlucas3/contae-web/blob/main/src/services/contaService.ts): `src/services/contaService.ts`
- [Category service](https://github.com/vazlucas3/contae-web/blob/main/src/services/categoriaService.ts): `src/services/categoriaService.ts`
- [HTTP client](https://github.com/vazlucas3/contae-web/blob/main/src/services/http.ts): `src/services/http.ts`
- [API configuration](https://github.com/vazlucas3/contae-web/blob/main/src/config/env.ts): `src/config/env.ts`

### Other components

- **User / browser**
- **ContaÊ API**

## Connections

- User / browser → Application root: opens
- Application root → Auth state: wraps (evidence: `src/App.tsx`)
- Application root → Route configuration: renders (evidence: `src/App.tsx`)
- Route configuration → Auth layout: routes auth (evidence: `src/routes/router.tsx`)
- Route configuration → Login and registration: routes auth (evidence: `src/routes/router.tsx`)
- Route configuration → Protected routes: guards screens (evidence: `src/routes/router.tsx`)
- Route configuration → App layout: routes screens (evidence: `src/routes/router.tsx`)
- Route configuration → Financial overview: routes to (evidence: `src/routes/router.tsx`)
- Route configuration → Transactions: routes to (evidence: `src/routes/router.tsx`)
- Route configuration → Accounts: routes to (evidence: `src/routes/router.tsx`)
- Route configuration → Categories: routes to (evidence: `src/routes/router.tsx`)
- Route configuration → Reports: routes to (evidence: `src/routes/router.tsx`)
- Route configuration → Profile: routes to (evidence: `src/routes/router.tsx`)
- Auth state → Auth context: provides state (evidence: `src/contexts/AuthProvider.tsx`)
- Auth state → Authentication service: logs in via (evidence: `src/contexts/AuthProvider.tsx`)
- Auth state → Token storage: stores token (evidence: `src/contexts/AuthProvider.tsx`)
- Login and registration → Auth hook: uses auth (evidence: `src/pages/Login/Login.tsx`)
- Auth hook → Auth context: reads context (evidence: `src/hooks/useAuth.ts`)
- Authentication service → HTTP client: posts login (evidence: `src/services/authService.ts`)
- Transactions → Transaction service: uses operations (evidence: `src/pages/Movimentacoes/Movimentacoes.tsx`)
- Transactions → Account service: loads accounts (evidence: `src/pages/Movimentacoes/Movimentacoes.tsx`)
- Transactions → Category service: loads categories (evidence: `src/pages/Movimentacoes/Movimentacoes.tsx`)
- Financial overview → Resource services: loads overview data
- Categories → Resource services: uses services
- Reports → Resource services: uses services (evidence: `src/pages/Relatorio/Relatorio.tsx`)
- Profile → Resource services: uses services
- Resource services → Transaction service: exports (evidence: `src/services/index.ts`)
- Resource services → Account service: exports (evidence: `src/services/index.ts`)
- Resource services → Category service: exports (evidence: `src/services/index.ts`)
- Transaction service → HTTP client: sends requests (evidence: `src/services/movimentacaoService.ts`)
- Category service → HTTP client: sends requests (evidence: `src/services/categoriaService.ts`)
- HTTP client → API configuration: reads config (evidence: `src/services/http.ts`)
- HTTP client → Token storage: reads token (evidence: `src/services/http.ts`)
- HTTP client → ContaÊ API: calls API (evidence: `README.md`)
