# sn0wbaall/wardriving architecture

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

- Interactive diagram: https://gitdiagram.com/sn0wbaall/wardriving
- Repository: https://github.com/sn0wbaall/wardriving

## Overview

Wardriving is a terminal browser for WiGLE-compatible SQLite databases. Users provide a database path or choose one interactively, then browse per-technology counts and representative network details. The map separates terminal workflow from read-only query logic; both query behavior and database opening are shown in the sampled source. The workflow is compact, so the two display stages share one component. Tests and dependency setup are excluded.

Main entry points: [`wardriving.py`](https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py) (Browse session), [`networks.py`](https://github.com/sn0wbaall/wardriving/blob/main/networks.py) (Network queries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Terminal workflow"]
  node_entry["CLI entry<br/>[wardriving.py]"]
  node_selection["Database selection<br/>[wardriving.py]"]
  node_browse["Browse session<br/>[wardriving.py]"]
  node_display["Summary and details<br/>[wardriving.py]"]
end

subgraph group_queries["Network queries"]
  node_query["Network queries<br/>[networks.py]"]
end

node_user(("Terminal user"))
node_database[("WiGLE SQLite database")]

node_user -->|"starts"| node_entry
node_entry -->|"prompts when needed"| node_selection
node_entry -->|"opens selected path"| node_browse
node_selection -->|"returns path"| node_browse
node_browse -->|"opens read-only"| node_database
node_browse -->|"requests counts and rows"| node_query
node_query -->|"reads network table"| node_database
node_browse -->|"shows summary and details"| node_display
node_user -->|"chooses type or action"| node_browse

click node_entry "https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py"
click node_selection "https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py"
click node_browse "https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py"
click node_display "https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py"
click node_query "https://github.com/sn0wbaall/wardriving/blob/main/networks.py"

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_entry,node_selection,node_browse,node_display,node_user toneBlue
class node_query,node_database toneAmber
```

## Components

### Terminal workflow

- [CLI entry](https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py): `wardriving.py`
- [Database selection](https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py): `wardriving.py`
- [Browse session](https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py): `wardriving.py`
- [Summary and details](https://github.com/sn0wbaall/wardriving/blob/main/wardriving.py): `wardriving.py`

### Network queries

- [Network queries](https://github.com/sn0wbaall/wardriving/blob/main/networks.py): `networks.py`

### Other components

- **Terminal user**
- **WiGLE SQLite database**

## Connections

- Terminal user → CLI entry: starts (evidence: `wardriving.py`)
- CLI entry → Database selection: prompts when needed (evidence: `wardriving.py`)
- CLI entry → Browse session: opens selected path (evidence: `wardriving.py`)
- Database selection → Browse session: returns path (evidence: `wardriving.py`)
- Browse session → WiGLE SQLite database: opens read-only (evidence: `wardriving.py`)
- Browse session → Network queries: requests counts and rows (evidence: `wardriving.py`)
- Network queries → WiGLE SQLite database: reads network table (evidence: `networks.py`)
- Browse session → Summary and details: shows summary and details (evidence: `wardriving.py`)
- Terminal user → Browse session: chooses type or action (evidence: `wardriving.py`)
