# waterrmalann/kards architecture

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

- Interactive diagram: https://gitdiagram.com/waterrmalann/kards
- Repository: https://github.com/waterrmalann/kards

## Overview

Kards is a browser-based Kanban board for creating boards, organizing cards, and managing task items, including drag-and-drop reordering and movement. Its principal workflow is user interaction with the board UI, followed by updates to board/card/item state and rendering; data is stored locally by the browser. The runtime is concentrated in one JavaScript file, so components below represent responsibilities within that file rather than separate modules. The excerpts show selected interactions, while local persistence is documented in the README.

Main entry points: [`js/main.js`](https://github.com/waterrmalann/kards/blob/main/js/main.js) (Board Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_board["Board Management"]
  node_boardnav["Board Navigation<br/>[main.js]"]
  node_boardstate["Board State<br/>[main.js]"]
  node_persistence["Data Persistence<br/>[main.js]"]
end

subgraph group_work["Cards and Tasks"]
  node_cardstate["Card State<br/>[main.js]"]
  node_itemstate["Task State<br/>[main.js]"]
end

subgraph group_interaction["Board Interaction"]
  node_ui["Board Interface<br/>[main.js]"]
  node_drag["Drag and Drop<br/>[main.js]"]
end

node_user(("Board User"))
node_browserstore[("Browser Local Storage")]

node_user -->|"interacts with"| node_ui
node_ui -->|"selects boards"| node_boardnav
node_boardnav -->|"renders board"| node_boardstate
node_boardstate -->|"creates cards"| node_cardstate
node_cardstate -->|"holds tasks"| node_itemstate
node_drag -->|"moves tasks"| node_itemstate
node_drag -->|"rerenders card"| node_cardstate
node_ui -->|"saves data"| node_persistence
node_persistence -->|"stores locally"| node_browserstore

click node_ui "https://github.com/waterrmalann/kards/blob/main/js/main.js"
click node_boardnav "https://github.com/waterrmalann/kards/blob/main/js/main.js"
click node_boardstate "https://github.com/waterrmalann/kards/blob/main/js/main.js"
click node_cardstate "https://github.com/waterrmalann/kards/blob/main/js/main.js"
click node_itemstate "https://github.com/waterrmalann/kards/blob/main/js/main.js"
click node_drag "https://github.com/waterrmalann/kards/blob/main/js/main.js"
click node_persistence "https://github.com/waterrmalann/kards/blob/main/js/main.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_boardnav,node_boardstate,node_persistence,node_user toneBlue
class node_cardstate,node_itemstate,node_browserstore toneAmber
class node_ui,node_drag toneMint
```

## Components

### Board Management

- [Board Navigation](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`
- [Board State](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`
- [Data Persistence](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`

### Cards and Tasks

- [Card State](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`
- [Task State](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`

### Board Interaction

- [Board Interface](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`
- [Drag and Drop](https://github.com/waterrmalann/kards/blob/main/js/main.js): `js/main.js`

### Other components

- **Board User**
- **Browser Local Storage**

## Connections

- Board User → Board Interface: interacts with (evidence: `README.md`)
- Board Interface → Board Navigation: selects boards (evidence: `js/main.js`)
- Board Navigation → Board State: renders board (evidence: `js/main.js`)
- Board State → Card State: creates cards (evidence: `js/main.js`)
- Card State → Task State: holds tasks (evidence: `js/main.js`)
- Drag and Drop → Task State: moves tasks (evidence: `js/main.js`)
- Drag and Drop → Card State: rerenders card (evidence: `js/main.js`)
- Board Interface → Data Persistence: saves data (evidence: `js/main.js`)
- Data Persistence → Browser Local Storage: stores locally (evidence: `README.md`)
