# facunesci/trabajo-gestion-gallinero architecture

> Architecture diagram of the GitHub repository facunesci/trabajo-gestion-gallinero, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/facunesci/trabajo-gestion-gallinero
- Repository: https://github.com/facunesci/trabajo-gestion-gallinero

## Overview

The README describes a poultry-management web app: an operator records production, health, feed, and sales data, then reviews metrics, finances, and alerts. It documents a Flask frontend, Java REST API, and PostgreSQL, plus dashboard and PWA capabilities. The checked-in tree is sparse: most implementation directories are empty, and the only sampled backend code starts an HTTP server with a health endpoint. Accordingly, documented feature nodes are shown as intended subsystems, not verified implementations; edges reflect only documented architecture.

Main entry points: [`frontend/app`](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app) (Flask web app), [`backend/src/main/java/com/gallinero/service`](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/service) (Business rules), [`frontend/app/static/js`](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/static/js) (Dashboard and charts), [`frontend/app/services`](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/services) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_webapp["Flask web app"]
  node_templates["Web views<br/>[base.html]"]
  node_api_client["API client"]
  node_dashboard["Dashboard and charts"]
end

subgraph group_domain["Farm operations"]
  node_production["Egg production"]
  node_metrics["Posture metrics"]
  node_health["Health and vaccines"]
  node_feed["Feed and supplies"]
  node_commerce["Sales and finances"]
  node_alerts["Performance alerts"]
end

subgraph group_backend["Backend API"]
  node_app["HTTP server<br/>[App.java]"]
  node_controllers["REST endpoints"]
  node_services["Business rules"]
  node_repositories["Data access"]
end

subgraph group_data["Persistence"]
  node_postgres[("PostgreSQL")]
end

node_operator(("Farm operator"))

node_operator -->|"uses"| node_webapp
node_webapp -->|"renders"| node_templates
node_webapp -->|"uses"| node_api_client
node_webapp -->|"records"| node_production
node_webapp -->|"records"| node_health
node_webapp -->|"records"| node_feed
node_webapp -->|"records"| node_commerce
node_dashboard -->|"visualizes"| node_metrics
node_dashboard -->|"visualizes"| node_commerce
node_services -->|"calculates"| node_metrics
node_services -->|"supports"| node_alerts
node_api_client -->|"HTTP JSON"| node_app
node_app -.->|"routes to"| node_controllers
node_controllers -.->|"delegates"| node_services
node_services -.->|"uses"| node_repositories
node_repositories -->|"reads/writes"| node_postgres

click node_webapp "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app"
click node_templates "https://github.com/facunesci/trabajo-gestion-gallinero/blob/main/frontend/app/templates/base.html"
click node_api_client "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/services"
click node_dashboard "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/static/js"
click node_production "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes"
click node_metrics "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/service"
click node_health "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes"
click node_feed "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes"
click node_commerce "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes"
click node_alerts "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/observer"
click node_app "https://github.com/facunesci/trabajo-gestion-gallinero/blob/main/backend/src/main/java/com/gallinero/App.java"
click node_controllers "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/controller"
click node_services "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/service"
click node_repositories "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/repository"
click node_postgres "https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/database"

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_webapp,node_templates,node_api_client,node_dashboard toneBlue
class node_production,node_metrics,node_health,node_feed,node_commerce,node_alerts toneAmber
class node_app,node_controllers,node_services,node_repositories toneMint
class node_postgres toneRose
class node_operator toneIndigo
```

## Components

### Web interface

- [Flask web app](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app): `frontend/app`
- [Web views](https://github.com/facunesci/trabajo-gestion-gallinero/blob/main/frontend/app/templates/base.html): `frontend/app/templates/base.html`
- [API client](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/services): `frontend/app/services`
- [Dashboard and charts](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/static/js): `frontend/app/static/js`

### Farm operations

- [Egg production](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes): `frontend/app/routes`
- [Posture metrics](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/service): `backend/src/main/java/com/gallinero/service`
- [Health and vaccines](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes): `frontend/app/routes`
- [Feed and supplies](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes): `frontend/app/routes`
- [Sales and finances](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/frontend/app/routes): `frontend/app/routes`
- [Performance alerts](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/observer): `backend/src/main/java/com/gallinero/observer`

### Backend API

- [HTTP server](https://github.com/facunesci/trabajo-gestion-gallinero/blob/main/backend/src/main/java/com/gallinero/App.java): `backend/src/main/java/com/gallinero/App.java`
- [REST endpoints](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/controller): `backend/src/main/java/com/gallinero/controller`
- [Business rules](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/service): `backend/src/main/java/com/gallinero/service`
- [Data access](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/backend/src/main/java/com/gallinero/repository): `backend/src/main/java/com/gallinero/repository`

### Persistence

- [PostgreSQL](https://github.com/facunesci/trabajo-gestion-gallinero/tree/main/database): `database`

### Other components

- **Farm operator**

## Connections

- Farm operator → Flask web app: uses (evidence: `README.md`)
- Flask web app → Web views: renders (evidence: `README.md`)
- Flask web app → API client: uses (evidence: `README.md`)
- Flask web app → Egg production: records (evidence: `README.md`)
- Flask web app → Health and vaccines: records (evidence: `README.md`)
- Flask web app → Feed and supplies: records (evidence: `README.md`)
- Flask web app → Sales and finances: records (evidence: `README.md`)
- Dashboard and charts → Posture metrics: visualizes (evidence: `README.md`)
- Dashboard and charts → Sales and finances: visualizes (evidence: `README.md`)
- Business rules → Posture metrics: calculates (evidence: `README.md`)
- Business rules → Performance alerts: supports (evidence: `README.md`)
- API client → HTTP server: HTTP JSON (evidence: `README.md`)
- HTTP server → REST endpoints: routes to
- REST endpoints → Business rules: delegates
- Business rules → Data access: uses
- Data access → PostgreSQL: reads/writes (evidence: `README.md`)
