# nss-evening-cohort-33/modern-farm-client-qdwhhd architecture

> Architecture diagram of the GitHub repository nss-evening-cohort-33/modern-farm-client-qdwhhd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nss-evening-cohort-33/modern-farm-client-qdwhhd
- Repository: https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd

## Overview

Modern Farm is a small crop-growing workflow: generate a crop plan, define crop seeds, sow them into shared field state, harvest according to plant output, and display the harvest. The README also documents selling/rendering the harvest and optional storage and processing challenges; the sampled runtime shows only console output, so those optional subsystems are not mapped as implemented. Relationships reflect sampled calls and data access; the seed constructors share a directory, and the tractor reads seed exports from the main module.

Main entry points: [`src/scripts/main.js`](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/main.js) (Farm Workflow), [`src/scripts/tractor.js`](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/tractor.js) (Sowing), [`src/scripts/field.js`](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/field.js) (Field State), [`src/scripts/plan.js`](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/plan.js) (Crop Plan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Planning"]
  node_plan["Crop Plan<br/>[plan.js]"]
end

subgraph group_crops["Crop Setup"]
  node_seeds["Seed Creators"]
end

subgraph group_fieldwork["Fieldwork"]
  node_main["Farm Workflow<br/>[main.js]"]
  node_tractor["Sowing<br/>[tractor.js]"]
  node_field[("Field State<br/>[field.js]")]
end

subgraph group_harvest["Harvest Output"]
  node_harvester["Harvesting<br/>[harvester.js]"]
end

node_operator(("Farm Operator"))
node_console["Console Output"]

node_main -->|"creates plan"| node_plan
node_main -->|"creates seeds"| node_seeds
node_main -->|"sows plan"| node_tractor
node_tractor -->|"reads seeds"| node_main
node_tractor -->|"adds plants"| node_field
node_tractor -->|"reads field"| node_field
node_main -->|"harvests plants"| node_harvester
node_main -->|"logs harvest"| node_console
node_operator -->|"runs workflow"| node_main

click node_main "https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/main.js"
click node_plan "https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/plan.js"
click node_seeds "https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/tree/main/src/scripts/seeds"
click node_tractor "https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/tractor.js"
click node_field "https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/field.js"
click node_harvester "https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/harvester.js"

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_plan toneBlue
class node_seeds toneAmber
class node_main,node_tractor,node_field toneMint
class node_harvester toneRose
class node_operator,node_console toneIndigo
```

## Components

### Planning

- [Crop Plan](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/plan.js): `src/scripts/plan.js`

### Crop Setup

- [Seed Creators](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/tree/main/src/scripts/seeds): `src/scripts/seeds`

### Fieldwork

- [Farm Workflow](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/main.js): `src/scripts/main.js`
- [Sowing](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/tractor.js): `src/scripts/tractor.js`
- [Field State](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/field.js): `src/scripts/field.js`

### Harvest Output

- [Harvesting](https://github.com/nss-evening-cohort-33/modern-farm-client-qdwhhd/blob/main/src/scripts/harvester.js): `src/scripts/harvester.js`

### Other components

- **Farm Operator**
- **Console Output**

## Connections

- Farm Workflow → Crop Plan: creates plan
- Farm Workflow → Seed Creators: creates seeds
- Farm Workflow → Sowing: sows plan
- Sowing → Farm Workflow: reads seeds
- Sowing → Field State: adds plants
- Sowing → Field State: reads field
- Farm Workflow → Harvesting: harvests plants
- Farm Workflow → Console Output: logs harvest
- Farm Operator → Farm Workflow: runs workflow
