# alexeyw/lot-map architecture

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

- Interactive diagram: https://gitdiagram.com/alexeyw/lot-map
- Repository: https://github.com/alexeyw/lot-map

## Overview

lot-map is a Claude Code mod that turns session and tool activity into a live map and feed in a side pane. Claude Code events are recorded on a session board, with tool inputs classified into stations; the pane then renders the board as a terminal map or graphical map. Separate capabilities include agent activity, hook outcomes, memory attribution, context/model changes, and localized labels. The excerpts show registration, board updates, pane rendering, classification and drawing; other event coverage and persistence behavior is included only where the README documents it.

Main entry points: [`hooks/register.tsx`](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx) (Event registration), [`hooks/map.ts`](https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts) (Tool classifier), [`hooks/text.ts`](https://github.com/alexeyw/lot-map/blob/main/hooks/text.ts) (Language strings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Claude Code integration"]
  node_register["Event registration<br/>[register.tsx]"]
end

subgraph group_activity["Activity tracking"]
  node_classifier["Tool classifier<br/>[map.ts]"]
  node_station_events["Station activity<br/>[register.tsx]"]
  node_agents["Agent activity<br/>[register.tsx]"]
  node_hook_outcomes["Hook outcomes<br/>[register.tsx]"]
  node_memory["Memory attribution<br/>[map.ts]"]
  node_context_model["Context and model<br/>[register.tsx]"]
end

subgraph group_presentation["Map presentation"]
  node_localization["Language strings<br/>[text.ts]"]
  node_map_drawing["Map drawing<br/>[map.ts]"]
  node_pane["Side-pane feed<br/>[register.tsx]"]
end

subgraph group_state["Session and settings"]
  node_board[("Activity board<br/>[register.tsx]")]
  node_model_store[("Last model by folder<br/>[register.tsx]")]
  node_configuration["Map options<br/>[map.ts]"]
  node_types["Board types<br/>[index.d.ts]"]
end

node_user(("User"))
node_claude["Claude Code"]

node_user -->|"sends messages"| node_claude
node_claude -->|"emits session events"| node_register
node_register -->|"uses classification"| node_classifier
node_register -->|"records activity"| node_station_events
node_register -->|"tracks subagents"| node_agents
node_register -->|"records outcomes"| node_hook_outcomes
node_classifier -->|"identifies memory"| node_memory
node_register -->|"records model steps"| node_context_model
node_register -->|"updates and reads"| node_board
node_register -->|"loads and saves"| node_model_store
node_claude -->|"persists model name"| node_model_store
node_configuration -->|"configures categories"| node_classifier
node_register -->|"loads options"| node_configuration
node_register -->|"renders pane"| node_pane
node_pane -->|"reads activity"| node_board
node_pane -->|"draws graphical map"| node_map_drawing
node_map_drawing -->|"uses labels"| node_localization
node_register -->|"loads strings"| node_localization
node_user -->|"opens map command"| node_pane
node_register -->|"queries context usage"| node_claude

click node_register "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_classifier "https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts"
click node_station_events "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_agents "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_hook_outcomes "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_memory "https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts"
click node_context_model "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_board "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_model_store "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_configuration "https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts"
click node_localization "https://github.com/alexeyw/lot-map/blob/main/hooks/text.ts"
click node_map_drawing "https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts"
click node_pane "https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx"
click node_types "https://github.com/alexeyw/lot-map/blob/main/types/index.d.ts"

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_register,node_user toneBlue
class node_classifier,node_station_events,node_agents,node_hook_outcomes,node_memory,node_context_model toneAmber
class node_localization,node_map_drawing,node_pane toneMint
class node_board,node_model_store,node_configuration,node_types toneRose
class node_claude toneIndigo
```

## Components

### Claude Code integration

- [Event registration](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`

### Activity tracking

- [Tool classifier](https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts): `hooks/map.ts`
- [Station activity](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Agent activity](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Hook outcomes](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Memory attribution](https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts): `hooks/map.ts`
- [Context and model](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`

### Map presentation

- [Language strings](https://github.com/alexeyw/lot-map/blob/main/hooks/text.ts): `hooks/text.ts`
- [Map drawing](https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts): `hooks/map.ts`
- [Side-pane feed](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`

### Session and settings

- [Activity board](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Last model by folder](https://github.com/alexeyw/lot-map/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Map options](https://github.com/alexeyw/lot-map/blob/main/hooks/map.ts): `hooks/map.ts`
- [Board types](https://github.com/alexeyw/lot-map/blob/main/types/index.d.ts): `types/index.d.ts`

### Other components

- **User**
- **Claude Code**

## Connections

- User → Claude Code: sends messages (evidence: `README.md`)
- Claude Code → Event registration: emits session events (evidence: `README.md`)
- Event registration → Tool classifier: uses classification (evidence: `hooks/register.tsx`)
- Event registration → Station activity: records activity (evidence: `hooks/register.tsx`)
- Event registration → Agent activity: tracks subagents (evidence: `hooks/register.tsx`)
- Event registration → Hook outcomes: records outcomes (evidence: `hooks/register.tsx`)
- Tool classifier → Memory attribution: identifies memory (evidence: `hooks/map.ts`)
- Event registration → Context and model: records model steps (evidence: `hooks/register.tsx`)
- Event registration → Activity board: updates and reads (evidence: `hooks/register.tsx`)
- Event registration → Last model by folder: loads and saves (evidence: `README.md`)
- Claude Code → Last model by folder: persists model name (evidence: `README.md`)
- Map options → Tool classifier: configures categories (evidence: `hooks/map.ts`)
- Event registration → Map options: loads options (evidence: `hooks/register.tsx`)
- Event registration → Side-pane feed: renders pane (evidence: `hooks/register.tsx`)
- Side-pane feed → Activity board: reads activity (evidence: `hooks/register.tsx`)
- Side-pane feed → Map drawing: draws graphical map (evidence: `hooks/register.tsx`)
- Map drawing → Language strings: uses labels (evidence: `hooks/map.ts`)
- Event registration → Language strings: loads strings
- User → Side-pane feed: opens map command (evidence: `README.md`)
- Event registration → Claude Code: queries context usage (evidence: `README.md`)
