# jeffersonlc94/atende-cloud-corp architecture

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

- Interactive diagram: https://gitdiagram.com/jeffersonlc94/atende-cloud-corp
- Repository: https://github.com/jeffersonlc94/atende-cloud-corp

## Overview

Atende Cloud Corp is a self-hosted business-management application whose documented core workflows are creating and managing quotes and operating a vehicle fleet. Users work through authenticated dashboard screens; Next.js route handlers enforce access, apply domain rules, and persist data through Prisma. The README also identifies inventory, supplier quotations, technical files/reports, training, audit, users, and system settings as product areas. Source coverage is uneven, so several subsystem links are documented at the product level rather than verified from sampled implementation; those links are marked unverified.

Main entry points: [`app/api/quotes/route.ts`](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/quotes/route.ts) (Quotes), [`lib/prisma.ts`](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/prisma.ts) (Prisma client), [`app/(dashboard)/frota/page.tsx`](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/(dashboard)/frota/page.tsx) (Fleet workspace), [`app/login/page.tsx`](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/login/page.tsx) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_login["Login<br/>[page.tsx]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_dashboard["Dashboard shell<br/>[layout.tsx]"]
end

subgraph group_commercial["Commercial operations"]
  node_quotes["Quotes<br/>[route.ts]"]
  node_quote_form["Quote editor<br/>[quote-form.tsx]"]
  node_quote_print["Quote print"]
  node_supplier_quotes["Supplier quotations<br/>[route.ts]"]
end

subgraph group_fleet["Fleet operations"]
  node_fleet_ui["Fleet workspace<br/>[page.tsx]"]
  node_fleet_api["Fleet operations API<br/>[route.ts]"]
  node_fleet_dashboard["Fleet dashboard<br/>[route.ts]"]
  node_fleet_components["Fleet components<br/>[vehicle-form.tsx]"]
end

subgraph group_knowledge["Operational resources"]
  node_inventory["Inventory<br/>[route.ts]"]
  node_technical["Technical files<br/>[route.ts]"]
  node_reports["Technical reports<br/>[route.ts]"]
  node_training["Training library<br/>[route.ts]"]
end

subgraph group_platform["Shared platform"]
  node_settings["System settings<br/>[route.ts]"]
  node_users["User administration<br/>[route.ts]"]
  node_permissions["Permissions<br/>[permissions.ts]"]
  node_audit["Audit logging<br/>[audit.ts]"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
end

node_staff(("Staff user"))
node_database[("PostgreSQL")]

node_staff -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"reads users"| node_prisma
node_staff -->|"uses modules"| node_dashboard
node_dashboard -.->|"manages quotes"| node_quotes
node_quotes -.->|"accepts quote data"| node_quote_form
node_quotes -->|"prints quotes"| node_quote_print
node_quotes -->|"persists quotes"| node_prisma
node_staff -->|"operates fleet"| node_fleet_ui
node_fleet_ui -.->|"manages vehicles"| node_fleet_api
node_fleet_ui -.->|"views alerts"| node_fleet_dashboard
node_fleet_ui -.->|"uses forms"| node_fleet_components
node_fleet_dashboard -->|"reads fleet data"| node_prisma
node_staff -.->|"manages quotations"| node_supplier_quotes
node_staff -.->|"tracks stock"| node_inventory
node_staff -.->|"manages files"| node_technical
node_staff -.->|"manages reports"| node_reports
node_staff -.->|"uses training"| node_training
node_staff -.->|"configures system"| node_settings
node_staff -.->|"administers users"| node_users
node_quotes -->|"checks access"| node_permissions
node_quotes -->|"records actions"| node_audit
node_audit -->|"writes audit logs"| node_prisma
node_prisma -->|"queries"| node_database

click node_login "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/login/page.tsx"
click node_auth "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/auth.ts"
click node_dashboard "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/(dashboard)/layout.tsx"
click node_quotes "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/quotes/route.ts"
click node_quote_form "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/components/quotes/quote-form.tsx"
click node_quote_print "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/components/quotes/quote-print-layout.tsx"
click node_supplier_quotes "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/supplier-quotations/route.ts"
click node_fleet_ui "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/(dashboard)/frota/page.tsx"
click node_fleet_api "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/frota/vehicles/route.ts"
click node_fleet_dashboard "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/frota/dashboard/route.ts"
click node_fleet_components "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/components/frota/vehicle-form.tsx"
click node_inventory "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/estoque/movements/route.ts"
click node_technical "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/technical-files/route.ts"
click node_reports "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/technical-reports/route.ts"
click node_training "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/trainings/route.ts"
click node_settings "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/settings/route.ts"
click node_users "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/users/route.ts"
click node_permissions "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/permissions.ts"
click node_audit "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/audit.ts"
click node_prisma "https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/prisma.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_login,node_auth,node_dashboard,node_staff toneBlue
class node_quotes,node_quote_form,node_quote_print,node_supplier_quotes,node_database toneAmber
class node_fleet_ui,node_fleet_api,node_fleet_dashboard,node_fleet_components toneMint
class node_inventory,node_technical,node_reports,node_training toneRose
class node_settings,node_users,node_permissions,node_audit,node_prisma toneIndigo
```

## Components

### Access and shell

- [Login](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/login/page.tsx): `app/login/page.tsx`
- [Authentication](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/auth.ts): `auth.ts`
- [Dashboard shell](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/(dashboard)/layout.tsx): `app/(dashboard)/layout.tsx`

### Commercial operations

- [Quotes](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/quotes/route.ts): `app/api/quotes/route.ts`
- [Quote editor](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/components/quotes/quote-form.tsx): `components/quotes/quote-form.tsx`
- [Quote print](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/components/quotes/quote-print-layout.tsx): `components/quotes/quote-print-layout.tsx`
- [Supplier quotations](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/supplier-quotations/route.ts): `app/api/supplier-quotations/route.ts`

### Fleet operations

- [Fleet workspace](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/(dashboard)/frota/page.tsx): `app/(dashboard)/frota/page.tsx`
- [Fleet operations API](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/frota/vehicles/route.ts): `app/api/frota/vehicles/route.ts`
- [Fleet dashboard](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/frota/dashboard/route.ts): `app/api/frota/dashboard/route.ts`
- [Fleet components](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/components/frota/vehicle-form.tsx): `components/frota/vehicle-form.tsx`

### Operational resources

- [Inventory](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/estoque/movements/route.ts): `app/api/estoque/movements/route.ts`
- [Technical files](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/technical-files/route.ts): `app/api/technical-files/route.ts`
- [Technical reports](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/technical-reports/route.ts): `app/api/technical-reports/route.ts`
- [Training library](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/trainings/route.ts): `app/api/trainings/route.ts`

### Shared platform

- [System settings](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/settings/route.ts): `app/api/settings/route.ts`
- [User administration](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/app/api/users/route.ts): `app/api/users/route.ts`
- [Permissions](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/permissions.ts): `lib/permissions.ts`
- [Audit logging](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/audit.ts): `lib/audit.ts`
- [Prisma client](https://github.com/jeffersonlc94/atende-cloud-corp/blob/claude/atende-cloud-corp-rf6wyd/lib/prisma.ts): `lib/prisma.ts`

### Other components

- **Staff user**
- **PostgreSQL**

## Connections

- Staff user → Login: signs in (evidence: `README.md`)
- Login → Authentication: authenticates (evidence: `auth.ts`)
- Authentication → Prisma client: reads users (evidence: `auth.ts`)
- Staff user → Dashboard shell: uses modules (evidence: `README.md`)
- Dashboard shell → Quotes: manages quotes
- Quotes → Quote editor: accepts quote data
- Quotes → Quote print: prints quotes (evidence: `README.md`)
- Quotes → Prisma client: persists quotes (evidence: `README.md`)
- Staff user → Fleet workspace: operates fleet (evidence: `README.md`)
- Fleet workspace → Fleet operations API: manages vehicles
- Fleet workspace → Fleet dashboard: views alerts
- Fleet workspace → Fleet components: uses forms
- Fleet dashboard → Prisma client: reads fleet data (evidence: `app/api/frota/dashboard/route.ts`)
- Staff user → Supplier quotations: manages quotations
- Staff user → Inventory: tracks stock
- Staff user → Technical files: manages files
- Staff user → Technical reports: manages reports
- Staff user → Training library: uses training
- Staff user → System settings: configures system
- Staff user → User administration: administers users
- Quotes → Permissions: checks access (evidence: `app/api/quotes/route.ts`)
- Quotes → Audit logging: records actions (evidence: `app/api/quotes/route.ts`)
- Audit logging → Prisma client: writes audit logs (evidence: `lib/audit.ts`)
- Prisma client → PostgreSQL: queries (evidence: `README.md`)
