# zakari-a/a_maze_ing architecture

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

- Interactive diagram: https://gitdiagram.com/zakari-a/a_maze_ing
- Repository: https://github.com/zakari-a/a_maze_ing

## Overview

A-MAZE-ING is a configured maze-generation, solving, export, and visualization application. The principal workflow is: a user supplies a config file, the CLI parses it, generates a maze, solves it, writes a hexadecimal dump, and opens an animated graphical view. The README also documents ASCII rendering and DFS/Prim generation; the sampled code confirms generation and solving, but does not expose enough detail to map every algorithm or the ASCII renderer separately. Edges reflect calls or documented capabilities; unsampled subsystems use directory paths where supported.

Main entry points: [`a_maze_ing.py`](https://github.com/zakari-a/a_maze_ing/blob/main/a_maze_ing.py) (CLI workflow), [`rendering/render.py`](https://github.com/zakari-a/a_maze_ing/blob/main/rendering/render.py) (Graphical rendering), [`utils/utils.py`](https://github.com/zakari-a/a_maze_ing/blob/main/utils/utils.py) (Maze file writer), [`parsing/config_parser.py`](https://github.com/zakari-a/a_maze_ing/blob/main/parsing/config_parser.py) (Config parsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Input and orchestration"]
  node_cli["CLI workflow<br/>[a_maze_ing.py]"]
  node_config_parser["Config parsing<br/>[config_parser.py]"]
  node_config_errors["Config errors<br/>[errors.py]"]
end

subgraph group_maze["Maze domain"]
  node_maze_generation["Maze generation<br/>[generator.py]"]
  node_maze_solver["Shortest-path solving<br/>[generator.py]"]
  node_maze_hex["Hex encoding<br/>[generator.py]"]
  node_maze_errors["Maze errors<br/>[errors.py]"]
end

subgraph group_output["Export"]
  node_file_writer["Maze file writer<br/>[utils.py]"]
  node_maze_output["Maze output"]
end

subgraph group_view["Visualization"]
  node_graphical_view["Graphical rendering<br/>[render.py]"]
  node_render_helpers["Rendering helpers<br/>[render_helpers.py]"]
  node_ascii_view["ASCII rendering"]
end

node_user(("User"))
node_config_input["Config file"]
node_mlx["MLX library"]

node_user -->|"runs"| node_cli
node_cli -->|"accepts"| node_config_input
node_cli -->|"parses via"| node_config_parser
node_config_parser -->|"raises"| node_config_errors
node_cli -->|"generates"| node_maze_generation
node_cli -->|"solves"| node_maze_solver
node_cli -->|"encodes"| node_maze_hex
node_cli -->|"writes via"| node_file_writer
node_file_writer -->|"writes"| node_maze_output
node_cli -->|"opens"| node_graphical_view
node_graphical_view -->|"uses"| node_render_helpers
node_graphical_view -->|"writes on redraw"| node_file_writer
node_graphical_view -->|"uses"| node_mlx
node_maze_generation -->|"raises"| node_maze_errors
node_user -.->|"can render"| node_ascii_view

click node_cli "https://github.com/zakari-a/a_maze_ing/blob/main/a_maze_ing.py"
click node_config_parser "https://github.com/zakari-a/a_maze_ing/blob/main/parsing/config_parser.py"
click node_config_errors "https://github.com/zakari-a/a_maze_ing/blob/main/parsing/errors.py"
click node_maze_generation "https://github.com/zakari-a/a_maze_ing/blob/main/maze_generator/generator.py"
click node_maze_solver "https://github.com/zakari-a/a_maze_ing/blob/main/maze_generator/generator.py"
click node_maze_hex "https://github.com/zakari-a/a_maze_ing/blob/main/maze_generator/generator.py"
click node_maze_errors "https://github.com/zakari-a/a_maze_ing/blob/main/parsing/errors.py"
click node_file_writer "https://github.com/zakari-a/a_maze_ing/blob/main/utils/utils.py"
click node_graphical_view "https://github.com/zakari-a/a_maze_ing/blob/main/rendering/render.py"
click node_render_helpers "https://github.com/zakari-a/a_maze_ing/blob/main/rendering/render_helpers.py"
click node_ascii_view "https://github.com/zakari-a/a_maze_ing/tree/main/rendering"

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_cli,node_config_parser,node_config_errors,node_user toneBlue
class node_maze_generation,node_maze_solver,node_maze_hex,node_maze_errors toneAmber
class node_file_writer,node_maze_output toneMint
class node_graphical_view,node_render_helpers,node_ascii_view toneRose
class node_config_input,node_mlx toneIndigo
```

## Components

### Input and orchestration

- [CLI workflow](https://github.com/zakari-a/a_maze_ing/blob/main/a_maze_ing.py): `a_maze_ing.py`
- [Config parsing](https://github.com/zakari-a/a_maze_ing/blob/main/parsing/config_parser.py): `parsing/config_parser.py`
- [Config errors](https://github.com/zakari-a/a_maze_ing/blob/main/parsing/errors.py): `parsing/errors.py`

### Maze domain

- [Maze generation](https://github.com/zakari-a/a_maze_ing/blob/main/maze_generator/generator.py): `maze_generator/generator.py`
- [Shortest-path solving](https://github.com/zakari-a/a_maze_ing/blob/main/maze_generator/generator.py): `maze_generator/generator.py`
- [Hex encoding](https://github.com/zakari-a/a_maze_ing/blob/main/maze_generator/generator.py): `maze_generator/generator.py`
- [Maze errors](https://github.com/zakari-a/a_maze_ing/blob/main/parsing/errors.py): `parsing/errors.py`

### Export

- [Maze file writer](https://github.com/zakari-a/a_maze_ing/blob/main/utils/utils.py): `utils/utils.py`
- **Maze output**

### Visualization

- [Graphical rendering](https://github.com/zakari-a/a_maze_ing/blob/main/rendering/render.py): `rendering/render.py`
- [Rendering helpers](https://github.com/zakari-a/a_maze_ing/blob/main/rendering/render_helpers.py): `rendering/render_helpers.py`
- [ASCII rendering](https://github.com/zakari-a/a_maze_ing/tree/main/rendering): `rendering`

### Other components

- **User**
- **Config file**
- **MLX library**

## Connections

- User → CLI workflow: runs (evidence: `README.md`)
- CLI workflow → Config file: accepts (evidence: `a_maze_ing.py`)
- CLI workflow → Config parsing: parses via (evidence: `a_maze_ing.py`)
- Config parsing → Config errors: raises (evidence: `parsing/config_parser.py`)
- CLI workflow → Maze generation: generates (evidence: `a_maze_ing.py`)
- CLI workflow → Shortest-path solving: solves (evidence: `a_maze_ing.py`)
- CLI workflow → Hex encoding: encodes (evidence: `a_maze_ing.py`)
- CLI workflow → Maze file writer: writes via (evidence: `a_maze_ing.py`)
- Maze file writer → Maze output: writes (evidence: `utils/utils.py`)
- CLI workflow → Graphical rendering: opens (evidence: `a_maze_ing.py`)
- Graphical rendering → Rendering helpers: uses (evidence: `rendering/render.py`)
- Graphical rendering → Maze file writer: writes on redraw (evidence: `rendering/render.py`)
- Graphical rendering → MLX library: uses (evidence: `rendering/render.py`)
- Maze generation → Maze errors: raises (evidence: `maze_generator/generator.py`)
- User → ASCII rendering: can render (evidence: `README.md`)
