# thenetworkchuck/networkchuck architecture

> Architecture diagram of the GitHub repository thenetworkchuck/networkchuck, 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/thenetworkchuck/networkchuck
- Repository: https://github.com/thenetworkchuck/networkchuck

## Overview

The evidenced product is a Flask web controller for Halloween props: a visitor requests the page or a named action, and the app switches Raspberry Pi GPIO outputs to activate individual props or the group for five seconds. The tree also contains unrelated scripts and configuration files, but no README or sampled source explains their behavior, so they are not mapped here.

Main entry points: [`halloweenproject/halloween.py`](https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/halloween.py) (Flask routes), [`halloweenproject/index.html`](https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/index.html) (Control page), [`halloweenproject/style.css`](https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/style.css) (Page styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["Flask routes<br/>[halloween.py]"]
  node_page["Control page<br/>[index.html]"]
  node_styles["Page styles<br/>[style.css]"]
end

subgraph group_hardware["Prop control"]
  node_gpio["RPi.GPIO"]
  node_props["Relay props"]
end

node_visitor(("Visitor"))

node_visitor -->|"HTTP requests"| node_app
node_app -->|"renders"| node_page
node_page -->|"styled by"| node_styles
node_app -->|"sets outputs"| node_gpio
node_gpio -->|"switches relays"| node_props

click node_app "https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/halloween.py"
click node_page "https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/index.html"
click node_styles "https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/style.css"

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,node_page,node_styles toneBlue
class node_gpio,node_props toneAmber
class node_visitor toneIndigo
```

## Components

### Web interface

- [Flask routes](https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/halloween.py): `halloweenproject/halloween.py`
- [Control page](https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/index.html): `halloweenproject/index.html`
- [Page styles](https://github.com/thenetworkchuck/networkchuck/blob/master/halloweenproject/style.css): `halloweenproject/style.css`

### Prop control

- **RPi.GPIO**
- **Relay props**

### Other components

- **Visitor**

## Connections

- Visitor → Flask routes: HTTP requests
- Flask routes → Control page: renders
- Control page → Page styles: styled by
- Flask routes → RPi.GPIO: sets outputs
- RPi.GPIO → Relay props: switches relays
