# Arquitetura do Sistema Apolo Diagrama detalhado dos serviços hospedados no servidor Apolo. ```mermaid flowchart LR %% Nós Externos Internet((Internet)) -->|HTTPS/443| T[Traefik Proxy] Internet -->|SSH/2323| FG[Forgejo Git] %% Core Infra subgraph Core ["Infraestrutura Core"] direction TB FG[Forgejo] PGADM[pgAdmin] ZOT[Zot Registry] GL[Glances Mon] runner[Forgejo Runner] end %% Databases subgraph Data ["Camada de Dados"] PG[(PostgreSQL Main)] PG_FG[(PostgreSQL Forgejo)] RD[(Redis GoHorse)] end %% SaveInMed Ecosystem subgraph SaveInMed ["SaveInMed"] SIM_BE[Backend API] SIM_BO[Backoffice] SIM_MK[Marketplace] SIM_SD[Seeder] SIM_WEB[Website] end %% RodiziosDaqui Ecosystem subgraph Rodizio ["Rodízios Daqui"] RD_BE[Backend] RD_BO[Backoffice] RD_FE[Frontend] RD_SD[Seeder] end %% ObraMarket Ecosystem subgraph Obra ["ObraMarket"] OM_BE[Backend] OM_BO[Backoffice] OM_FE[Frontend] OM_SD[Seeder] end %% Outros Apps subgraph Apps ["Outras Aplicações"] FARM_BE[Farmácia Backend] FARM_FE[Farmácia Frontend] VEST_BE[Vestuário Backend] VEST_FE[Vestuário Frontend] Q1_BE[Q1 Agenda BE] Q1_FE[Q1 Agenda FE] end %% Roteamento Traefik T --> FG T --> PGADM T --> ZOT T --> GL T --> SIM_BE T --> SIM_BO T --> SIM_MK T --> SIM_SD T --> SIM_WEB T --> RD_BE T --> RD_BO T --> RD_FE T --> RD_SD T --> OM_BE T --> OM_BO T --> OM_FE T --> OM_SD T --> FARM_BE T --> FARM_FE T --> VEST_BE T --> VEST_FE T --> Q1_BE T --> Q1_FE %% TCP Routing (Bancos expostos) T -.->|TCP/27537| PG T -.->|TCP/26380| RD %% Conexões de Dados FG --> PG_FG runner --> FG SIM_BE --> PG SIM_BO --> PG SIM_SD --> PG RD_BE --> PG RD_BO --> PG RD_SD --> PG OM_BE --> PG OM_BO --> PG OM_SD --> PG FARM_BE --> PG VEST_BE --> PG Q1_BE --> PG %% Legenda de Estilo linkStyle default stroke-width:1px,fill:none,stroke:gray; ``` ## Descrição dos Subsistemas ### 🌐 Traefik Proxy O Traefik atua como gateway principal. Além de rotear tráfego HTTP/HTTPS (portas 80/443), ele também expõe serviços TCP como banco de dados (27537) e Redis (26380) para acesso externo controlado. ### 🏭 Infraestrutura & CI/CD - **Forgejo**: Servidor Git self-hosted (codeberg fork). Possui banco de dados próprio (`forgejo-db`). - **Zot**: Registry de containers para imagens privadas. - **Glances**: Monitoramento de recursos do servidor. ### 🏥 SaveInMed Ecossistema completo de saúde, incluindo Backend, Backoffice administrativo, Marketplace e Site institucional. ### 🏗️ ObraMarket e 🍕 RodíziosDaqui Plataformas que seguem arquitetura similar: Backend API, Backoffice Admin, Frontend Web e Seeder (para popular dados). ### 🛒 Farmácia e Vestuário Lojas/Apps específicos, compostos por pares de Backend/Frontend.