# 25-04085/livestock-birth-and-release-monitoring-system- architecture

> Architecture diagram of the GitHub repository 25-04085/livestock-birth-and-release-monitoring-system-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/25-04085/livestock-birth-and-release-monitoring-system-
- Repository: https://github.com/25-04085/livestock-birth-and-release-monitoring-system-

## Overview

This is an in-memory Java console application for recording livestock births and tracking releases. The user workflow starts at the menu, where Main validates animal details and creates a Livestock record, or gathers release details and asks AnimalManager to update an existing record. The manager also supports ID searches, formatted listing, and summary counts. Animal provides shared status and age behavior, while Livestock adds tag and section details. FarmOwner is a standalone model not connected to the menu. The graph reflects the sampled sources and README; FarmOwner’s isolation is documented there.

Main entry points: [`Main.java`](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java) (Console menu), [`AnimalManager.java`](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java) (Record manager), [`Animal.java`](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Animal.java) (Animal base), [`Livestock.java`](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Livestock.java) (Livestock record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console workflow"]
  node_menu["Console menu<br/>[Main.java]"]
  node_intake["Animal intake<br/>[Main.java]"]
  node_release_prompt["Release confirmation<br/>[Main.java]"]
end

subgraph group_operations["Monitoring operations"]
  node_manager["Record manager<br/>[AnimalManager.java]"]
  node_search["ID search<br/>[AnimalManager.java]"]
  node_listing_stats["Listing and stats<br/>[AnimalManager.java]"]
end

subgraph group_models["Domain models"]
  node_animal["Animal base<br/>[Animal.java]"]
  node_livestock["Livestock record<br/>[Livestock.java]"]
  node_owner["Farm owner<br/>[FarmOwner.java]"]
end

node_user(("Farm user"))

node_user -->|"chooses actions"| node_menu
node_menu -->|"routes choice"| node_intake
node_intake -->|"constructs record"| node_livestock
node_intake -->|"adds record"| node_manager
node_menu -->|"routes choice"| node_release_prompt
node_release_prompt -->|"looks up ID"| node_search
node_release_prompt -->|"confirms release"| node_manager
node_menu -->|"requests lookup"| node_search
node_menu -->|"requests display"| node_listing_stats
node_manager -->|"checks records"| node_search
node_manager -->|"reads and updates"| node_animal
node_listing_stats -->|"dispatches details"| node_animal
node_livestock -->|"extends"| node_animal

click node_menu "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java"
click node_intake "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java"
click node_release_prompt "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java"
click node_manager "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java"
click node_search "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java"
click node_listing_stats "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java"
click node_animal "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Animal.java"
click node_livestock "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Livestock.java"
click node_owner "https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/FarmOwner.java"

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_menu,node_intake,node_release_prompt,node_user toneBlue
class node_manager,node_search,node_listing_stats toneAmber
class node_animal,node_livestock,node_owner toneMint
```

## Components

### Console workflow

- [Console menu](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java): `Main.java`
- [Animal intake](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java): `Main.java`
- [Release confirmation](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Main.java): `Main.java`

### Monitoring operations

- [Record manager](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java): `AnimalManager.java`
- [ID search](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java): `AnimalManager.java`
- [Listing and stats](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/AnimalManager.java): `AnimalManager.java`

### Domain models

- [Animal base](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Animal.java): `Animal.java`
- [Livestock record](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/Livestock.java): `Livestock.java`
- [Farm owner](https://github.com/25-04085/livestock-birth-and-release-monitoring-system-/blob/main/FarmOwner.java): `FarmOwner.java`

### Other components

- **Farm user**

## Connections

- Farm user → Console menu: chooses actions (evidence: `README.md`)
- Console menu → Animal intake: routes choice (evidence: `Main.java`)
- Animal intake → Livestock record: constructs record (evidence: `Main.java`)
- Animal intake → Record manager: adds record (evidence: `Main.java`)
- Console menu → Release confirmation: routes choice (evidence: `Main.java`)
- Release confirmation → ID search: looks up ID (evidence: `Main.java`)
- Release confirmation → Record manager: confirms release (evidence: `Main.java`)
- Console menu → ID search: requests lookup (evidence: `Main.java`)
- Console menu → Listing and stats: requests display (evidence: `Main.java`)
- Record manager → ID search: checks records (evidence: `AnimalManager.java`)
- Record manager → Animal base: reads and updates (evidence: `AnimalManager.java`)
- Listing and stats → Animal base: dispatches details (evidence: `AnimalManager.java`)
- Livestock record → Animal base: extends (evidence: `Livestock.java`)
