# arthur-manoel/erp-goia architecture

> Architecture diagram of the GitHub repository arthur-manoel/erp-goia, 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/arthur-manoel/erp-goia
- Repository: https://github.com/arthur-manoel/erp-goia

## Overview

ERP Goia is a multi-company ERP scaffold built as a single Next.js App Router application, with server-side Prisma access to MySQL and no separate backend. The intended user workflow spans administration and master data into products, purchasing and receiving, inventory, production, and sales. The sampled pages are mostly placeholders, so the graph represents those as product stages rather than implying implemented business logic; unsampled workflows and database interactions are documented capabilities, not inspected implementations.

Main entry points: [`src/components/layout/page-header.tsx`](https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/page-header.tsx) (Page header), [`src/components/layout/em-construcao.tsx`](https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/em-construcao.tsx) (Under-construction view), [`src/app/(app)/layout.tsx`](https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/layout.tsx) (App layouts), [`src/app/(app)/admin`](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/admin) (Administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app_shell["App layouts<br/>[layout.tsx]"]
  node_nav_config["Navigation map<br/>[navegacao.ts]"]
  node_sidebar["App sidebar<br/>[app-sidebar.tsx]"]
  node_login["Login screen<br/>[page.tsx]"]
end

subgraph group_foundation["Shared foundation"]
  node_page_header["Page header<br/>[page-header.tsx]"]
  node_placeholder["Under-construction view<br/>[em-construcao.tsx]"]
  node_session["Session helper<br/>[sessao.ts]"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
end

subgraph group_master["Administration and master data"]
  node_admin["Administration"]
  node_catalogs["Business registers"]
  node_products["Products and recipes"]
end

subgraph group_operations["ERP operations"]
  node_inventory["Inventory"]
  node_purchasing["Purchasing"]
  node_receiving["Invoice receiving<br/>[page.tsx]"]
  node_production["Production"]
  node_sales["Sales<br/>[page.tsx]"]
end

node_user(("ERP user"))
node_mysql[("MySQL database")]

node_user -->|"signs in"| node_login
node_user -->|"uses ERP"| node_app_shell
node_app_shell -.->|"displays"| node_sidebar
node_sidebar -->|"reads routes"| node_nav_config
node_admin -->|"renders"| node_page_header
node_admin -->|"renders"| node_placeholder
node_products -->|"renders"| node_page_header
node_products -->|"renders"| node_placeholder
node_inventory -->|"renders"| node_page_header
node_inventory -->|"renders"| node_placeholder
node_purchasing -->|"renders"| node_page_header
node_purchasing -->|"renders"| node_placeholder
node_receiving -->|"renders"| node_page_header
node_receiving -->|"renders"| node_placeholder
node_sales -->|"renders"| node_page_header
node_sales -->|"renders"| node_placeholder
node_production -->|"renders"| node_page_header
node_production -->|"renders"| node_placeholder
node_app_shell -.->|"accesses through"| node_prisma
node_prisma -->|"queries"| node_mysql

click node_app_shell "https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/layout.tsx"
click node_nav_config "https://github.com/arthur-manoel/erp-goia/blob/main/src/config/navegacao.ts"
click node_sidebar "https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/app-sidebar.tsx"
click node_login "https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(auth)/login/page.tsx"
click node_page_header "https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/page-header.tsx"
click node_placeholder "https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/em-construcao.tsx"
click node_session "https://github.com/arthur-manoel/erp-goia/blob/main/src/lib/sessao.ts"
click node_prisma "https://github.com/arthur-manoel/erp-goia/blob/main/src/lib/prisma.ts"
click node_admin "https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/admin"
click node_catalogs "https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/cadastros"
click node_products "https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/produtos"
click node_inventory "https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/estoque"
click node_purchasing "https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/compras"
click node_receiving "https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/notas-fiscais/page.tsx"
click node_production "https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/producao"
click node_sales "https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/vendas/page.tsx"

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_shell,node_nav_config,node_sidebar,node_login,node_user toneBlue
class node_page_header,node_placeholder,node_session,node_prisma,node_mysql toneAmber
class node_admin,node_catalogs,node_products toneMint
class node_inventory,node_purchasing,node_receiving,node_production,node_sales toneRose
```

## Components

### Application shell

- [App layouts](https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/layout.tsx): `src/app/(app)/layout.tsx`
- [Navigation map](https://github.com/arthur-manoel/erp-goia/blob/main/src/config/navegacao.ts): `src/config/navegacao.ts`
- [App sidebar](https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/app-sidebar.tsx): `src/components/layout/app-sidebar.tsx`
- [Login screen](https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`

### Shared foundation

- [Page header](https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/page-header.tsx): `src/components/layout/page-header.tsx`
- [Under-construction view](https://github.com/arthur-manoel/erp-goia/blob/main/src/components/layout/em-construcao.tsx): `src/components/layout/em-construcao.tsx`
- [Session helper](https://github.com/arthur-manoel/erp-goia/blob/main/src/lib/sessao.ts): `src/lib/sessao.ts`
- [Prisma client](https://github.com/arthur-manoel/erp-goia/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`

### Administration and master data

- [Administration](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/admin): `src/app/(app)/admin`
- [Business registers](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/cadastros): `src/app/(app)/cadastros`
- [Products and recipes](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/produtos): `src/app/(app)/produtos`

### ERP operations

- [Inventory](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/estoque): `src/app/(app)/estoque`
- [Purchasing](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/compras): `src/app/(app)/compras`
- [Invoice receiving](https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/notas-fiscais/page.tsx): `src/app/(app)/notas-fiscais/page.tsx`
- [Production](https://github.com/arthur-manoel/erp-goia/tree/main/src/app/(app)/producao): `src/app/(app)/producao`
- [Sales](https://github.com/arthur-manoel/erp-goia/blob/main/src/app/(app)/vendas/page.tsx): `src/app/(app)/vendas/page.tsx`

### Other components

- **ERP user**
- **MySQL database**

## Connections

- ERP user → Login screen: signs in (evidence: `README.md`)
- ERP user → App layouts: uses ERP (evidence: `README.md`)
- App layouts → App sidebar: displays
- App sidebar → Navigation map: reads routes (evidence: `src/components/layout/app-sidebar.tsx`)
- Administration → Page header: renders (evidence: `src/app/(app)/admin/setores/page.tsx`)
- Administration → Under-construction view: renders (evidence: `src/app/(app)/admin/setores/page.tsx`)
- Products and recipes → Page header: renders (evidence: `src/app/(app)/produtos/page.tsx`)
- Products and recipes → Under-construction view: renders (evidence: `src/app/(app)/produtos/page.tsx`)
- Inventory → Page header: renders (evidence: `src/app/(app)/estoque/page.tsx`)
- Inventory → Under-construction view: renders (evidence: `src/app/(app)/estoque/page.tsx`)
- Purchasing → Page header: renders (evidence: `src/app/(app)/compras/requisicoes/page.tsx`)
- Purchasing → Under-construction view: renders (evidence: `src/app/(app)/compras/requisicoes/page.tsx`)
- Invoice receiving → Page header: renders (evidence: `src/app/(app)/notas-fiscais/page.tsx`)
- Invoice receiving → Under-construction view: renders (evidence: `src/app/(app)/notas-fiscais/page.tsx`)
- Sales → Page header: renders (evidence: `src/app/(app)/vendas/page.tsx`)
- Sales → Under-construction view: renders (evidence: `src/app/(app)/vendas/page.tsx`)
- Production → Page header: renders (evidence: `src/app/(app)/producao/ordens/page.tsx`)
- Production → Under-construction view: renders (evidence: `src/app/(app)/producao/ordens/page.tsx`)
- App layouts → Prisma client: accesses through
- Prisma client → MySQL database: queries (evidence: `README.md`)
