# sarosch/grain-house architecture

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

- Interactive diagram: https://gitdiagram.com/sarosch/grain-house
- Repository: https://github.com/sarosch/grain-house

## Overview

This is a prototype silo-storage management project. Its documented user-facing path is through the Android app, which connects over Wi-Fi to firmware running on a Wemos D1 mini. The repository contains two firmware files, but no source excerpts establish how they call or coordinate with each other, so no internal call relationship is asserted. The README also describes serial communication with an Arduino Mega2560 as needed but missing; that intended hardware link is shown as unverified. The PDF documents project rationale, not a runtime component.

Main entry points: [`Silo.apk`](https://github.com/sarosch/grain-house/blob/main/Silo.apk) (Android app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile access"]
  node_app["Android app<br/>[Silo.apk]"]
end

subgraph group_firmware["Wemos firmware"]
  node_server_firmware["HTML server firmware<br/>[html_server.ino]"]
  node_support_firmware["Support firmware<br/>[apoio.ino]"]
end

subgraph group_hardware["Prototype hardware"]
  node_wemos["Wemos D1 mini"]
  node_mega["Arduino Mega2560"]
end

node_app -->|"connects via Wi-Fi"| node_wemos
node_wemos -.->|"intended serial link"| node_mega

click node_app "https://github.com/sarosch/grain-house/blob/main/Silo.apk"
click node_server_firmware "https://github.com/sarosch/grain-house/blob/main/html_server/html_server.ino"
click node_support_firmware "https://github.com/sarosch/grain-house/blob/main/html_server/apoio.ino"

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_app toneBlue
class node_server_firmware,node_support_firmware toneAmber
class node_wemos,node_mega toneMint
```

## Components

### Mobile access

- [Android app](https://github.com/sarosch/grain-house/blob/main/Silo.apk): `Silo.apk`

### Wemos firmware

- [HTML server firmware](https://github.com/sarosch/grain-house/blob/main/html_server/html_server.ino): `html_server/html_server.ino`
- [Support firmware](https://github.com/sarosch/grain-house/blob/main/html_server/apoio.ino): `html_server/apoio.ino`

### Prototype hardware

- **Wemos D1 mini**
- **Arduino Mega2560**

## Connections

- Android app → Wemos D1 mini: connects via Wi-Fi (evidence: `README.md`)
- Wemos D1 mini → Arduino Mega2560: intended serial link
