# lenguyenduc22102007-star/aura-farming- architecture

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

- Interactive diagram: https://gitdiagram.com/lenguyenduc22102007-star/aura-farming-
- Repository: https://github.com/lenguyenduc22102007-star/aura-farming-

## Overview

Aura Farming is a Java/JavaFX farming simulation. The principal loop is to use tools on farm cells, grow crops across weather-driven days, harvest produce, and trade it; the README explicitly describes the tool invocation and daily crop update. The tree also shows distinct exploration, fishing, livestock, crafting, quests, festivals, and production features. Several of those implementations were not excerpted, so their connections are shown only as unverified dashed links; the graph avoids asserting detailed internal call order.

Main entry points: [`view/screen_controller/InGameController.java`](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_controller/InGameController.java) (In-game screen), [`model/soil/Cell.java`](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/soil/Cell.java) (Farm cell), [`model/player_inventory/Player.java`](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/player_inventory/Player.java) (Player and inventory), [`controller/lifecyclemanager/GameManager.java`](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/lifecyclemanager/GameManager.java) (Day and status)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Farm gameplay"]
  node_tools["Tool actions"]
  node_toolstrategy["Tool strategies<br/>[ToolStrategy.java]"]
  node_farmmap["Farm map<br/>[FarmMap.java]"]
  node_cell["Farm cell<br/>[Cell.java]"]
  node_crop["Crop growth<br/>[Crop.java]"]
  node_weather["Weather effects<br/>[Weather.java]"]
  node_environment["Environment tick"]
  node_farmcontroller["Farm updates"]
  node_animals["Livestock<br/>[FarmAnimal.java]"]
end

subgraph group_economy["Economy and crafting"]
  node_playerstate["Player and inventory<br/>[Player.java]"]
  node_shop["Shop"]
  node_cooking["Cooking recipes"]
  node_factory["Factory production"]
  node_market["Market<br/>[MarketManager.java]"]
end

subgraph group_world["World activities"]
  node_quests["Quests<br/>[QuestManager.java]"]
  node_festival["Festivals"]
  node_mining["Mining<br/>[MineManager.java]"]
  node_fishing["Fishing<br/>[FishingGame.java]"]
  node_npcs["NPC interactions<br/>[NpcManager.java]"]
end

subgraph group_runtime["Game runtime"]
  node_main["Game entry<br/>[Main.java]"]
  node_gamemanager["Day and status<br/>[GameManager.java]"]
  node_save[("Save and load<br/>[SaveManager.java]")]
end

subgraph group_interface["JavaFX interface"]
  node_ingame["In-game screen"]
  node_storage["Storage screen"]
  node_router["Scene routing<br/>[SceneRouter.java]"]
end

node_player(("Player"))

node_player -.->|"plays through"| node_ingame
node_main -.->|"starts"| node_ingame
node_ingame -.->|"selects tools"| node_tools
node_tools -->|"executes"| node_toolstrategy
node_toolstrategy -->|"acts on"| node_cell
node_cell -->|"holds crop"| node_crop
node_farmcontroller -.->|"updates cells"| node_farmmap
node_farmmap -.->|"contains cells"| node_cell
node_cell -.->|"applies effects"| node_weather
node_gamemanager -.->|"notifies by day"| node_environment
node_ingame -.->|"advances days"| node_farmcontroller
node_player -.->|"controls"| node_playerstate
node_ingame -.->|"opens shop"| node_shop
node_shop -.->|"charges and stocks"| node_playerstate
node_ingame -.->|"opens storage"| node_storage
node_storage -->|"trades inventory"| node_playerstate
node_ingame -.->|"offers cooking"| node_cooking
node_ingame -.->|"offers production"| node_factory
node_ingame -.->|"offers selling"| node_market
node_ingame -.->|"supports quests"| node_quests
node_ingame -.->|"supports festivals"| node_festival
node_ingame -.->|"opens mining"| node_mining
node_ingame -.->|"opens fishing"| node_fishing
node_ingame -.->|"interacts with"| node_npcs
node_ingame -.->|"tends livestock"| node_animals
node_gamemanager -.->|"persists state"| node_save
node_ingame -.->|"routes scenes"| node_router

click node_main "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/Main.java"
click node_ingame "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_controller/InGameController.java"
click node_tools "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/actionmanager/PlayerController.java"
click node_toolstrategy "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/actionmanager/ToolStrategy.java"
click node_farmmap "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/soil/FarmMap.java"
click node_cell "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/soil/Cell.java"
click node_crop "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/crop/Crop.java"
click node_weather "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/weather/Weather.java"
click node_environment "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/environmentcontroller/EnvironmentController.java"
click node_farmcontroller "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/farmcontroller/FarmController.java"
click node_playerstate "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/player_inventory/Player.java"
click node_shop "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/shopmanager/ShopController.java"
click node_storage "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_controller/StorageViewController.java"
click node_cooking "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/cooking/CookingRecipeManager.java"
click node_factory "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/factory/FactoryManager.java"
click node_market "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/factory/MarketManager.java"
click node_quests "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/quest/QuestManager.java"
click node_festival "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/festival/FestivalManager.java"
click node_mining "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/mine/MineManager.java"
click node_fishing "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/river/FishingGame.java"
click node_npcs "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/npc/NpcManager.java"
click node_animals "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/livestock/FarmAnimal.java"
click node_gamemanager "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/lifecyclemanager/GameManager.java"
click node_save "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/lifecyclemanager/SaveManager.java"
click node_router "https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_util/SceneRouter.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_tools,node_toolstrategy,node_farmmap,node_cell,node_crop,node_weather,node_environment,node_farmcontroller,node_animals toneBlue
class node_playerstate,node_shop,node_cooking,node_factory,node_market toneAmber
class node_quests,node_festival,node_mining,node_fishing,node_npcs toneMint
class node_main,node_gamemanager,node_save toneRose
class node_ingame,node_storage,node_router,node_player toneIndigo
```

## Components

### Farm gameplay

- [Tool actions](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/actionmanager/PlayerController.java): `controller/actionmanager/PlayerController.java`
- [Tool strategies](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/actionmanager/ToolStrategy.java): `controller/actionmanager/ToolStrategy.java`
- [Farm map](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/soil/FarmMap.java): `model/soil/FarmMap.java`
- [Farm cell](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/soil/Cell.java): `model/soil/Cell.java`
- [Crop growth](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/crop/Crop.java): `model/crop/Crop.java`
- [Weather effects](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/weather/Weather.java): `model/weather/Weather.java`
- [Environment tick](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/environmentcontroller/EnvironmentController.java): `controller/environmentcontroller/EnvironmentController.java`
- [Farm updates](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/farmcontroller/FarmController.java): `controller/farmcontroller/FarmController.java`
- [Livestock](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/livestock/FarmAnimal.java): `model/livestock/FarmAnimal.java`

### Economy and crafting

- [Player and inventory](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/player_inventory/Player.java): `model/player_inventory/Player.java`
- [Shop](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/shopmanager/ShopController.java): `controller/shopmanager/ShopController.java`
- [Cooking recipes](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/cooking/CookingRecipeManager.java): `model/cooking/CookingRecipeManager.java`
- [Factory production](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/factory/FactoryManager.java): `model/factory/FactoryManager.java`
- [Market](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/factory/MarketManager.java): `model/factory/MarketManager.java`

### World activities

- [Quests](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/quest/QuestManager.java): `model/quest/QuestManager.java`
- [Festivals](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/model/festival/FestivalManager.java): `model/festival/FestivalManager.java`
- [Mining](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/mine/MineManager.java): `view/mine/MineManager.java`
- [Fishing](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/river/FishingGame.java): `view/river/FishingGame.java`
- [NPC interactions](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/npc/NpcManager.java): `view/npc/NpcManager.java`

### Game runtime

- [Game entry](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/Main.java): `Main.java`
- [Day and status](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/lifecyclemanager/GameManager.java): `controller/lifecyclemanager/GameManager.java`
- [Save and load](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/controller/lifecyclemanager/SaveManager.java): `controller/lifecyclemanager/SaveManager.java`

### JavaFX interface

- [In-game screen](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_controller/InGameController.java): `view/screen_controller/InGameController.java`
- [Storage screen](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_controller/StorageViewController.java): `view/screen_controller/StorageViewController.java`
- [Scene routing](https://github.com/lenguyenduc22102007-star/aura-farming-/blob/main/view/screen_util/SceneRouter.java): `view/screen_util/SceneRouter.java`

### Other components

- **Player**

## Connections

- Player → In-game screen: plays through
- Game entry → In-game screen: starts (evidence: `Main.java`)
- In-game screen → Tool actions: selects tools (evidence: `view/screen_controller/InGameController.java`)
- Tool actions → Tool strategies: executes (evidence: `controller/actionmanager/PlayerController.java`)
- Tool strategies → Farm cell: acts on
- Farm cell → Crop growth: holds crop (evidence: `model/soil/Cell.java`)
- Farm updates → Farm map: updates cells (evidence: `controller/farmcontroller/FarmController.java`)
- Farm map → Farm cell: contains cells (evidence: `model/soil/FarmMap.java`)
- Farm cell → Weather effects: applies effects (evidence: `model/soil/Cell.java`)
- Day and status → Environment tick: notifies by day (evidence: `controller/environmentcontroller/EnvironmentController.java`)
- In-game screen → Farm updates: advances days
- Player → Player and inventory: controls
- In-game screen → Shop: opens shop (evidence: `view/screen_controller/InGameController.java`)
- Shop → Player and inventory: charges and stocks (evidence: `controller/shopmanager/ShopController.java`)
- In-game screen → Storage screen: opens storage
- Storage screen → Player and inventory: trades inventory (evidence: `view/screen_controller/StorageViewController.java`)
- In-game screen → Cooking recipes: offers cooking
- In-game screen → Factory production: offers production
- In-game screen → Market: offers selling
- In-game screen → Quests: supports quests
- In-game screen → Festivals: supports festivals
- In-game screen → Mining: opens mining
- In-game screen → Fishing: opens fishing (evidence: `view/screen_controller/InGameController.java`)
- In-game screen → NPC interactions: interacts with
- In-game screen → Livestock: tends livestock (evidence: `view/screen_controller/InGameController.java`)
- Day and status → Save and load: persists state (evidence: `controller/lifecyclemanager/SaveManager.java`)
- In-game screen → Scene routing: routes scenes (evidence: `view/screen_controller/InGameController.java`)
