# eyt-dev/master architecture

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

- Interactive diagram: https://gitdiagram.com/eyt-dev/master
- Repository: https://github.com/eyt-dev/master

## Overview

This Laravel application appears to provide poultry-farm operations alongside feed formulation and administrative management. The principal visible workflow is an Add2Farm API request to retrieve or change daily records, which queries farm, flock, hangar, and stock-related data and returns a translated response. Other visible areas include authentication, formulation, and store-view administration. The README describes Laravel rather than this product; unsampled routes and controllers limit certainty about how the broader subsystems are wired, so only evidenced relationships are drawn.

Main entry points: [`app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/DailyRecordController.php) (Daily Records API), [`app/Models/Farm.php`](https://github.com/eyt-dev/master/blob/main/app/Models/Farm.php) (Farms), [`app/Models/Flock.php`](https://github.com/eyt-dev/master/blob/main/app/Models/Flock.php) (Flocks), [`app/Models/Hangar.php`](https://github.com/eyt-dev/master/blob/main/app/Models/Hangar.php) (Hangars)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_farm_ops["Farm Operations"]
  node_daily_api["Daily Records API"]
  node_api_base["API Base<br/>[BaseController.php]"]
  node_farms[("Farms<br/>[Farm.php]")]
  node_flocks[("Flocks<br/>[Flock.php]")]
  node_daily_records[("Daily Records<br/>[DailyRecord.php]")]
  node_hangars[("Hangars<br/>[Hangar.php]")]
  node_flock_hangars[("Flock Allocations<br/>[FlockHangar.php]")]
  node_stock_hangars[("Hangar Stock")]
  node_material_stock[("Material Stock<br/>[MaterialStock.php]")]
  node_farm_api["Farm API<br/>[FarmController.php]"]
  node_flock_api["Flock API"]
  node_translations["API Translations"]
end

subgraph group_feed_admin["Feed and Configuration"]
  node_formulation_api["Formulation API"]
  node_formulations[("Formulations<br/>[Formulation.php]")]
  node_forms[("Feed Forms<br/>[Form.php]")]
end

subgraph group_identity["Identity and Administration"]
  node_admins[("Admin Accounts<br/>[Admin.php]")]
  node_login["Web Login"]
  node_settings[("Settings<br/>[Setting.php]")]
  node_store_views["Store Views"]
  node_store_view_data[("Store View Data<br/>[StoreView.php]")]
  node_regions[("Country Regions<br/>[CountryRegion.php]")]
end

node_api_user(("API Client"))

node_api_user -->|"requests"| node_daily_api
node_daily_api -->|"queries and writes"| node_daily_records
node_daily_api -->|"queries"| node_farms
node_daily_api -->|"queries"| node_flocks
node_daily_api -->|"queries"| node_hangars
node_daily_api -->|"uses allocations"| node_stock_hangars
node_daily_api -->|"extends"| node_api_base
node_api_base -->|"uses"| node_translations
node_farms -->|"has many"| node_hangars
node_farms -->|"has many"| node_flocks
node_flocks -->|"allocates"| node_flock_hangars
node_hangars -->|"allocates stock"| node_stock_hangars
node_stock_hangars -->|"references"| node_material_stock
node_formulation_api -->|"queries"| node_formulations
node_formulation_api -->|"queries"| node_forms
node_formulations -->|"belongs to"| node_admins
node_login -->|"authenticates"| node_admins
node_login -->|"reads"| node_settings
node_store_views -->|"manages"| node_store_view_data
node_store_views -->|"loads options"| node_regions
node_admins -->|"has setting"| node_settings

click node_daily_api "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/DailyRecordController.php"
click node_api_base "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/BaseController.php"
click node_farms "https://github.com/eyt-dev/master/blob/main/app/Models/Farm.php"
click node_flocks "https://github.com/eyt-dev/master/blob/main/app/Models/Flock.php"
click node_daily_records "https://github.com/eyt-dev/master/blob/main/app/Models/DailyRecord.php"
click node_hangars "https://github.com/eyt-dev/master/blob/main/app/Models/Hangar.php"
click node_flock_hangars "https://github.com/eyt-dev/master/blob/main/app/Models/FlockHangar.php"
click node_stock_hangars "https://github.com/eyt-dev/master/blob/main/app/Models/MaterialStockHangar.php"
click node_material_stock "https://github.com/eyt-dev/master/blob/main/app/Models/MaterialStock.php"
click node_farm_api "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/FarmController.php"
click node_flock_api "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/FlockController.php"
click node_formulation_api "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/FormulationController.php"
click node_formulations "https://github.com/eyt-dev/master/blob/main/app/Models/Formulation.php"
click node_forms "https://github.com/eyt-dev/master/blob/main/app/Models/Form.php"
click node_admins "https://github.com/eyt-dev/master/blob/main/app/Models/Admin.php"
click node_login "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Auth/LoginController.php"
click node_settings "https://github.com/eyt-dev/master/blob/main/app/Models/Setting.php"
click node_store_views "https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Backend/StoreViewController.php"
click node_store_view_data "https://github.com/eyt-dev/master/blob/main/app/Models/StoreView.php"
click node_regions "https://github.com/eyt-dev/master/blob/main/app/Models/CountryRegion.php"
click node_translations "https://github.com/eyt-dev/master/blob/main/app/Services/Add2Farm/TranslationService.php"

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_daily_api,node_api_base,node_farms,node_flocks,node_daily_records,node_hangars,node_flock_hangars,node_stock_hangars,node_material_stock,node_farm_api,node_flock_api,node_translations,node_api_user toneBlue
class node_formulation_api,node_formulations,node_forms toneAmber
class node_admins,node_login,node_settings,node_store_views,node_store_view_data,node_regions toneMint
```

## Components

### Farm Operations

- [Daily Records API](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/DailyRecordController.php): `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`
- [API Base](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/BaseController.php): `app/Http/Controllers/Api/Add2Farm/BaseController.php`
- [Farms](https://github.com/eyt-dev/master/blob/main/app/Models/Farm.php): `app/Models/Farm.php`
- [Flocks](https://github.com/eyt-dev/master/blob/main/app/Models/Flock.php): `app/Models/Flock.php`
- [Daily Records](https://github.com/eyt-dev/master/blob/main/app/Models/DailyRecord.php): `app/Models/DailyRecord.php`
- [Hangars](https://github.com/eyt-dev/master/blob/main/app/Models/Hangar.php): `app/Models/Hangar.php`
- [Flock Allocations](https://github.com/eyt-dev/master/blob/main/app/Models/FlockHangar.php): `app/Models/FlockHangar.php`
- [Hangar Stock](https://github.com/eyt-dev/master/blob/main/app/Models/MaterialStockHangar.php): `app/Models/MaterialStockHangar.php`
- [Material Stock](https://github.com/eyt-dev/master/blob/main/app/Models/MaterialStock.php): `app/Models/MaterialStock.php`
- [Farm API](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/FarmController.php): `app/Http/Controllers/Api/Add2Farm/FarmController.php`
- [Flock API](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/Add2Farm/FlockController.php): `app/Http/Controllers/Api/Add2Farm/FlockController.php`
- [API Translations](https://github.com/eyt-dev/master/blob/main/app/Services/Add2Farm/TranslationService.php): `app/Services/Add2Farm/TranslationService.php`

### Feed and Configuration

- [Formulation API](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Api/FormulationController.php): `app/Http/Controllers/Api/FormulationController.php`
- [Formulations](https://github.com/eyt-dev/master/blob/main/app/Models/Formulation.php): `app/Models/Formulation.php`
- [Feed Forms](https://github.com/eyt-dev/master/blob/main/app/Models/Form.php): `app/Models/Form.php`

### Identity and Administration

- [Admin Accounts](https://github.com/eyt-dev/master/blob/main/app/Models/Admin.php): `app/Models/Admin.php`
- [Web Login](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Settings](https://github.com/eyt-dev/master/blob/main/app/Models/Setting.php): `app/Models/Setting.php`
- [Store Views](https://github.com/eyt-dev/master/blob/main/app/Http/Controllers/Backend/StoreViewController.php): `app/Http/Controllers/Backend/StoreViewController.php`
- [Store View Data](https://github.com/eyt-dev/master/blob/main/app/Models/StoreView.php): `app/Models/StoreView.php`
- [Country Regions](https://github.com/eyt-dev/master/blob/main/app/Models/CountryRegion.php): `app/Models/CountryRegion.php`

### Other components

- **API Client**

## Connections

- API Client → Daily Records API: requests
- Daily Records API → Daily Records: queries and writes (evidence: `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`)
- Daily Records API → Farms: queries (evidence: `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`)
- Daily Records API → Flocks: queries (evidence: `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`)
- Daily Records API → Hangars: queries (evidence: `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`)
- Daily Records API → Hangar Stock: uses allocations (evidence: `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`)
- Daily Records API → API Base: extends (evidence: `app/Http/Controllers/Api/Add2Farm/DailyRecordController.php`)
- API Base → API Translations: uses (evidence: `app/Http/Controllers/Api/Add2Farm/BaseController.php`)
- Farms → Hangars: has many (evidence: `app/Models/Farm.php`)
- Farms → Flocks: has many (evidence: `app/Models/Farm.php`)
- Flocks → Flock Allocations: allocates (evidence: `app/Models/Flock.php`)
- Hangars → Hangar Stock: allocates stock (evidence: `app/Models/Hangar.php`)
- Hangar Stock → Material Stock: references (evidence: `app/Models/MaterialStockHangar.php`)
- Formulation API → Formulations: queries (evidence: `app/Http/Controllers/Api/FormulationController.php`)
- Formulation API → Feed Forms: queries (evidence: `app/Http/Controllers/Api/FormulationController.php`)
- Formulations → Admin Accounts: belongs to (evidence: `app/Models/Formulation.php`)
- Web Login → Admin Accounts: authenticates (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Web Login → Settings: reads (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Store Views → Store View Data: manages (evidence: `app/Http/Controllers/Backend/StoreViewController.php`)
- Store Views → Country Regions: loads options (evidence: `app/Http/Controllers/Backend/StoreViewController.php`)
- Admin Accounts → Settings: has setting (evidence: `app/Models/Admin.php`)
