# luizfaraujo/pos_dev_web--tcc_arjsys--back architecture

> Architecture diagram of the GitHub repository luizfaraujo/pos_dev_web--tcc_arjsys--back, 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/luizfaraujo/pos_dev_web--tcc_arjsys--back
- Repository: https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back

## Overview

ArjSys is a .NET Web API for managing mechanical-project workflows, with engineering, sales, production, and administration domains backed by SQLite. The principal workflow spans product/BOM definition, sales orders and serial numbers, then production orders; administrative services support users and notifications. The tree also contains a separate Protheus CSV importer, but the README describes only the API. Relationships below follow sampled controller/service references and the source index; unsampled areas are represented at directory level where appropriate.

Main entry points: [`app/Data/AppDbContext.cs`](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Data/AppDbContext.cs) (Application database), [`app/Services/Engenharia`](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Services/Engenharia) (Products and BOM), [`app/Services/Producao/OrdemProducaoService.cs`](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Producao/OrdemProducaoService.cs) (Production orders), [`app/Services/Admin/NotificacaoService.cs`](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Admin/NotificacaoService.cs) (Notifications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API surface"]
  node_eng_api["Engineering endpoints"]
  node_sales_api["Sales endpoints"]
  node_prod_api["Production endpoints"]
  node_op_api["Work-order endpoint"]
  node_admin_api["Admin endpoints"]
end

subgraph group_domains["Business services"]
  node_eng["Products and BOM"]
  node_sales["Sales orders"]
  node_serial["Serial numbers"]
  node_production["Production orders"]
  node_admin["Admin services"]
  node_notifications["Notifications"]
  node_search["Search and paging<br/>[BuscaExtensions.cs]"]
end

subgraph group_data["Persistence"]
  node_db[("Application database<br/>[AppDbContext.cs]")]
end

subgraph group_importer["CSV import"]
  node_csv["Protheus CSV importer"]
end

node_client(("API client"))
node_fs[("Document filesystem")]

node_client -.->|"sends requests"| node_eng_api
node_client -.->|"sends requests"| node_sales_api
node_client -.->|"sends requests"| node_prod_api
node_client -.->|"sends requests"| node_op_api
node_client -.->|"sends requests"| node_admin_api
node_eng_api -->|"calls"| node_eng
node_eng_api -->|"calls"| node_eng
node_sales_api -->|"calls"| node_sales
node_sales_api -->|"calls"| node_serial
node_prod_api -->|"calls"| node_production
node_op_api -->|"calls"| node_production
node_admin_api -->|"calls"| node_admin
node_admin_api -->|"calls"| node_notifications
node_eng -->|"reads and writes"| node_db
node_sales -->|"reads and writes"| node_db
node_serial -->|"reads and writes"| node_db
node_production -->|"reads and writes"| node_db
node_admin -->|"uses context"| node_db
node_notifications -->|"reads and writes"| node_db
node_sales -->|"creates notifications"| node_notifications
node_production -->|"creates notifications"| node_notifications
node_eng -->|"opens documents"| node_fs
node_csv -.->|"imports data"| node_db

click node_eng_api "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Engenharia"
click node_sales_api "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Comercial"
click node_prod_api "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Producao"
click node_op_api "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Controllers/OrdemProducaoController.cs"
click node_admin_api "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Admin"
click node_eng "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Services/Engenharia"
click node_sales "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Comercial/PedidoVendaService.cs"
click node_serial "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Comercial/NumeroSerieService.cs"
click node_production "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Producao/OrdemProducaoService.cs"
click node_admin "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Services/Admin"
click node_notifications "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Admin/NotificacaoService.cs"
click node_search "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Data/Busca/BuscaExtensions.cs"
click node_db "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Data/AppDbContext.cs"
click node_csv "https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/ProtheusImporter"

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_eng_api,node_sales_api,node_prod_api,node_op_api,node_admin_api,node_client toneBlue
class node_eng,node_sales,node_serial,node_production,node_admin,node_notifications,node_search,node_fs toneAmber
class node_db toneMint
class node_csv toneRose
```

## Components

### API surface

- [Engineering endpoints](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Engenharia): `app/Controllers/Engenharia`
- [Sales endpoints](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Comercial): `app/Controllers/Comercial`
- [Production endpoints](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Producao): `app/Controllers/Producao`
- [Work-order endpoint](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Controllers/OrdemProducaoController.cs): `app/Controllers/OrdemProducaoController.cs`
- [Admin endpoints](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Controllers/Admin): `app/Controllers/Admin`

### Business services

- [Products and BOM](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Services/Engenharia): `app/Services/Engenharia`
- [Sales orders](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Comercial/PedidoVendaService.cs): `app/Services/Comercial/PedidoVendaService.cs`
- [Serial numbers](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Comercial/NumeroSerieService.cs): `app/Services/Comercial/NumeroSerieService.cs`
- [Production orders](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Producao/OrdemProducaoService.cs): `app/Services/Producao/OrdemProducaoService.cs`
- [Admin services](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/app/Services/Admin): `app/Services/Admin`
- [Notifications](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Services/Admin/NotificacaoService.cs): `app/Services/Admin/NotificacaoService.cs`
- [Search and paging](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Data/Busca/BuscaExtensions.cs): `app/Data/Busca/BuscaExtensions.cs`

### Persistence

- [Application database](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/blob/main/app/Data/AppDbContext.cs): `app/Data/AppDbContext.cs`

### CSV import

- [Protheus CSV importer](https://github.com/luizfaraujo/pos_dev_web--tcc_arjsys--back/tree/main/ProtheusImporter): `ProtheusImporter`

### Other components

- **API client**
- **Document filesystem**

## Connections

- API client → Engineering endpoints: sends requests
- API client → Sales endpoints: sends requests
- API client → Production endpoints: sends requests
- API client → Work-order endpoint: sends requests
- API client → Admin endpoints: sends requests
- Engineering endpoints → Products and BOM: calls (evidence: `app/Controllers/Engenharia/ProdutosController.cs`)
- Engineering endpoints → Products and BOM: calls (evidence: `app/Controllers/Engenharia/BomController.cs`)
- Sales endpoints → Sales orders: calls (evidence: `app/Controllers/Comercial/PedidoVendaController.cs`)
- Sales endpoints → Serial numbers: calls (evidence: `app/Controllers/Comercial/NumeroSerieController.cs`)
- Production endpoints → Production orders: calls (evidence: `app/Controllers/Producao/DemandaController.cs`)
- Work-order endpoint → Production orders: calls (evidence: `app/Controllers/OrdemProducaoController.cs`)
- Admin endpoints → Admin services: calls (evidence: `app/Controllers/Admin/ClientesController.cs`)
- Admin endpoints → Notifications: calls (evidence: `app/Controllers/Admin/NotificacoesController.cs`)
- Products and BOM → Application database: reads and writes (evidence: `app/Services/Engenharia/ProdutoService.cs`)
- Sales orders → Application database: reads and writes (evidence: `app/Services/Comercial/PedidoVendaService.cs`)
- Serial numbers → Application database: reads and writes (evidence: `app/Services/Comercial/NumeroSerieService.cs`)
- Production orders → Application database: reads and writes (evidence: `app/Services/Producao/OrdemProducaoService.cs`)
- Admin services → Application database: uses context (evidence: `app/Services/Admin/AuthService.cs`)
- Notifications → Application database: reads and writes (evidence: `app/Services/Admin/NotificacaoService.cs`)
- Sales orders → Notifications: creates notifications (evidence: `app/Services/Comercial/PedidoVendaService.cs`)
- Production orders → Notifications: creates notifications (evidence: `app/Services/Producao/OrdemProducaoService.cs`)
- Products and BOM → Document filesystem: opens documents (evidence: `app/Services/Engenharia/ProdutoService.cs`)
- Protheus CSV importer → Application database: imports data
