# anshrjpt/dev-log architecture

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

- Interactive diagram: https://gitdiagram.com/anshrjpt/dev-log
- Repository: https://github.com/anshrjpt/dev-log

## Overview

DevLog is a C++ command-line developer journal. Its main workflow is to collect a daily session, save it in the logs, and use saved entries for summaries or a generated HTML report. The README documents the command set and report contents; the sampled source confirms entry display and some log-reading behavior, but the excerpt omits much of the command router and report implementation.

Main entry points: [`main.cpp`](https://github.com/anshrjpt/dev-log/blob/main/main.cpp) (Command router), [`logs/2026-03-02.txt`](https://github.com/anshrjpt/dev-log/blob/main/logs/2026-03-02.txt) (Entry logs), [`reports/report.html`](https://github.com/anshrjpt/dev-log/blob/main/reports/report.html) (HTML report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and journal"]
  node_router["Command router<br/>[main.cpp]"]
  node_entry["Daily entry<br/>[main.cpp]"]
  node_logstore[("Entry logs<br/>[2026-03-02.txt]")]
  node_browse["Browse entries<br/>[main.cpp]"]
  node_edit["Edit entry<br/>[main.cpp]"]
  node_search["Search entries<br/>[main.cpp]"]
end

subgraph group_insights["Journal insights"]
  node_stats["Stats dashboard<br/>[main.cpp]"]
  node_weekly["Weekly summary<br/>[main.cpp]"]
end

subgraph group_reporting["HTML reporting"]
  node_reportgen["Report generator<br/>[main.cpp]"]
  node_report["HTML report<br/>[report.html]"]
end

node_developer(("Developer"))

node_developer -->|"runs command"| node_router
node_router -->|"dispatches new"| node_entry
node_entry -->|"saves entry"| node_logstore
node_router -->|"dispatches list/read"| node_browse
node_browse -->|"reads entries"| node_logstore
node_router -->|"dispatches search"| node_search
node_search -->|"searches entries"| node_logstore
node_router -->|"dispatches edit"| node_edit
node_edit -->|"updates entry"| node_logstore
node_router -->|"dispatches stats"| node_stats
node_stats -->|"reads entries"| node_logstore
node_router -->|"dispatches week"| node_weekly
node_weekly -->|"summarizes entries"| node_logstore
node_router -->|"dispatches report"| node_reportgen
node_reportgen -->|"reads logs"| node_logstore
node_reportgen -->|"generates HTML"| node_report

click node_router "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_entry "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_logstore "https://github.com/anshrjpt/dev-log/blob/main/logs/2026-03-02.txt"
click node_browse "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_edit "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_search "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_stats "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_weekly "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_reportgen "https://github.com/anshrjpt/dev-log/blob/main/main.cpp"
click node_report "https://github.com/anshrjpt/dev-log/blob/main/reports/report.html"

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_router,node_entry,node_logstore,node_browse,node_edit,node_search toneBlue
class node_stats,node_weekly toneAmber
class node_reportgen,node_report toneMint
class node_developer toneIndigo
```

## Components

### CLI and journal

- [Command router](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`
- [Daily entry](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`
- [Entry logs](https://github.com/anshrjpt/dev-log/blob/main/logs/2026-03-02.txt): `logs/2026-03-02.txt`
- [Browse entries](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`
- [Edit entry](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`
- [Search entries](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`

### Journal insights

- [Stats dashboard](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`
- [Weekly summary](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`

### HTML reporting

- [Report generator](https://github.com/anshrjpt/dev-log/blob/main/main.cpp): `main.cpp`
- [HTML report](https://github.com/anshrjpt/dev-log/blob/main/reports/report.html): `reports/report.html`

### Other components

- **Developer**

## Connections

- Developer → Command router: runs command (evidence: `README.md`)
- Command router → Daily entry: dispatches new (evidence: `README.md`)
- Daily entry → Entry logs: saves entry (evidence: `README.md`)
- Command router → Browse entries: dispatches list/read (evidence: `README.md`)
- Browse entries → Entry logs: reads entries (evidence: `main.cpp`)
- Command router → Search entries: dispatches search (evidence: `README.md`)
- Search entries → Entry logs: searches entries (evidence: `README.md`)
- Command router → Edit entry: dispatches edit (evidence: `README.md`)
- Edit entry → Entry logs: updates entry (evidence: `README.md`)
- Command router → Stats dashboard: dispatches stats (evidence: `README.md`)
- Stats dashboard → Entry logs: reads entries (evidence: `README.md`)
- Command router → Weekly summary: dispatches week (evidence: `README.md`)
- Weekly summary → Entry logs: summarizes entries (evidence: `README.md`)
- Command router → Report generator: dispatches report (evidence: `README.md`)
- Report generator → Entry logs: reads logs (evidence: `README.md`)
- Report generator → HTML report: generates HTML (evidence: `README.md`)
