# ishaan812/devlog architecture

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

- Interactive diagram: https://gitdiagram.com/ishaan812/devlog
- Repository: https://github.com/ishaan812/devlog

## Overview

DevLog is a local-first developer work logger: it reads Git history across repositories and branches, stores indexed commit data, and produces branch-organized work logs with optional AI summaries. The CLI also supports onboarding, profiles, scheduled ingestion, commit-message generation, export, and an interactive console; the frontend is a separate documentation/marketing site. The ingest and worklog excerpts establish their main dependencies, while several other command links are documented in the README. Unsampled command internals are represented by their exact tree paths, not inferred implementation details.

Main entry points: [`internal/cli/ingest.go`](https://github.com/ishaan812/devlog/blob/master/internal/cli/ingest.go) (Git ingestion), [`internal/cli/worklog.go`](https://github.com/ishaan812/devlog/blob/master/internal/cli/worklog.go) (Worklog generation), [`internal/db/db.go`](https://github.com/ishaan812/devlog/blob/master/internal/db/db.go) (Profile database manager), [`internal/db/repository.go`](https://github.com/ishaan812/devlog/blob/master/internal/db/repository.go) (SQL repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Ingestion and logs"]
  node_ingest["Git ingestion<br/>[ingest.go]"]
  node_git_history["Git history reader<br/>[walker.go]"]
  node_branch_setup["Branch selection<br/>[branch_select.go]"]
  node_code_scanner["Codebase scanner<br/>[scanner.go]"]
  node_worklog["Worklog generation<br/>[worklog.go]"]
end

subgraph group_storage["Profiles and storage"]
  node_database_manager["Profile database manager<br/>[db.go]"]
  node_sql_repository["SQL repository<br/>[repository.go]"]
  node_profile_config["Profile configuration<br/>[config.go]"]
end

subgraph group_ai["AI summaries"]
  node_summarizer["Code summarizer<br/>[summarizer.go]"]
  node_prompt_library["Prompt templates<br/>[prompts.go]"]
  node_llm_client["LLM provider client<br/>[client.go]"]
  node_llm_services{{"LLM services"}}
end

subgraph group_commands["CLI capabilities"]
  node_cli_entry["CLI entry<br/>[main.go]"]
  node_cli_router["Command router<br/>[root.go]"]
  node_commit_command["AI commit messages<br/>[commit.go]"]
  node_onboarding["Onboarding setup<br/>[onboard.go]"]
  node_cron["Scheduled ingestion<br/>[cron.go]"]
  node_export["Obsidian export<br/>[export.go]"]
  node_console_command["Console command<br/>[console.go]"]
  node_console_ui["Interactive worklog console<br/>[console.go]"]
end

subgraph group_web["Project website"]
  node_frontend_app["Website app<br/>[App.jsx]"]
  node_docs_page["Documentation page<br/>[DocsPage.jsx]"]
  node_frontend_mount["Frontend mount<br/>[main.jsx]"]
end

node_developer(("Developer"))
node_obsidian["Obsidian vault"]

node_developer -->|"runs commands"| node_cli_entry
node_cli_entry -->|"executes CLI"| node_cli_router
node_cli_router -.->|"dispatches ingest"| node_ingest
node_cli_router -.->|"dispatches worklog"| node_worklog
node_developer -->|"requests ingestion"| node_ingest
node_ingest -->|"reads Git history"| node_git_history
node_ingest -->|"selects branches"| node_branch_setup
node_ingest -->|"scans codebase"| node_code_scanner
node_ingest -->|"accesses profile DB"| node_database_manager
node_ingest -->|"generates summaries"| node_summarizer
node_worklog -->|"queries and caches"| node_sql_repository
node_worklog -->|"requests summaries"| node_llm_client
node_worklog -->|"builds prompts"| node_prompt_library
node_database_manager -->|"resolves DB paths"| node_profile_config
node_database_manager -->|"creates repository"| node_sql_repository
node_sql_repository -.->|"uses SQL connection"| node_database_manager
node_summarizer -->|"builds prompts"| node_prompt_library
node_summarizer -->|"requests completion"| node_llm_client
node_llm_client -->|"selects provider"| node_llm_services
node_developer -->|"generates commit"| node_commit_command
node_developer -->|"configures DevLog"| node_onboarding
node_developer -->|"schedules ingestion"| node_cron
node_cron -.->|"schedules daily run"| node_ingest
node_developer -->|"exports worklogs"| node_export
node_export -->|"writes log exports"| node_obsidian
node_developer -->|"opens console"| node_console_command
node_console_command -.->|"starts console UI"| node_console_ui
node_console_ui -->|"loads worklogs"| node_sql_repository
node_frontend_mount -->|"mounts app"| node_frontend_app
node_frontend_app -->|"renders docs"| node_docs_page

click node_cli_entry "https://github.com/ishaan812/devlog/blob/master/cmd/devlog/main.go"
click node_cli_router "https://github.com/ishaan812/devlog/blob/master/internal/cli/root.go"
click node_ingest "https://github.com/ishaan812/devlog/blob/master/internal/cli/ingest.go"
click node_git_history "https://github.com/ishaan812/devlog/blob/master/internal/git/walker.go"
click node_branch_setup "https://github.com/ishaan812/devlog/blob/master/internal/tui/branch_select.go"
click node_code_scanner "https://github.com/ishaan812/devlog/blob/master/internal/indexer/scanner.go"
click node_worklog "https://github.com/ishaan812/devlog/blob/master/internal/cli/worklog.go"
click node_database_manager "https://github.com/ishaan812/devlog/blob/master/internal/db/db.go"
click node_sql_repository "https://github.com/ishaan812/devlog/blob/master/internal/db/repository.go"
click node_profile_config "https://github.com/ishaan812/devlog/blob/master/internal/config/config.go"
click node_summarizer "https://github.com/ishaan812/devlog/blob/master/internal/indexer/summarizer.go"
click node_prompt_library "https://github.com/ishaan812/devlog/blob/master/internal/prompts/prompts.go"
click node_llm_client "https://github.com/ishaan812/devlog/blob/master/internal/llm/client.go"
click node_llm_services "https://github.com/ishaan812/devlog/tree/master/internal/llm"
click node_commit_command "https://github.com/ishaan812/devlog/blob/master/internal/cli/commit.go"
click node_onboarding "https://github.com/ishaan812/devlog/blob/master/internal/cli/onboard.go"
click node_cron "https://github.com/ishaan812/devlog/blob/master/internal/cli/cron.go"
click node_export "https://github.com/ishaan812/devlog/blob/master/internal/cli/export.go"
click node_console_command "https://github.com/ishaan812/devlog/blob/master/internal/cli/console.go"
click node_console_ui "https://github.com/ishaan812/devlog/blob/master/internal/tui/console.go"
click node_frontend_app "https://github.com/ishaan812/devlog/blob/master/frontend/src/App.jsx"
click node_docs_page "https://github.com/ishaan812/devlog/blob/master/frontend/src/DocsPage.jsx"
click node_frontend_mount "https://github.com/ishaan812/devlog/blob/master/frontend/src/main.jsx"

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_ingest,node_git_history,node_branch_setup,node_code_scanner,node_worklog toneBlue
class node_database_manager,node_sql_repository,node_profile_config toneAmber
class node_summarizer,node_prompt_library,node_llm_client,node_llm_services toneMint
class node_cli_entry,node_cli_router,node_commit_command,node_onboarding,node_cron,node_export,node_console_command,node_console_ui toneRose
class node_frontend_app,node_docs_page,node_frontend_mount,node_developer,node_obsidian toneIndigo
```

## Components

### Ingestion and logs

- [Git ingestion](https://github.com/ishaan812/devlog/blob/master/internal/cli/ingest.go): `internal/cli/ingest.go`
- [Git history reader](https://github.com/ishaan812/devlog/blob/master/internal/git/walker.go): `internal/git/walker.go`
- [Branch selection](https://github.com/ishaan812/devlog/blob/master/internal/tui/branch_select.go): `internal/tui/branch_select.go`
- [Codebase scanner](https://github.com/ishaan812/devlog/blob/master/internal/indexer/scanner.go): `internal/indexer/scanner.go`
- [Worklog generation](https://github.com/ishaan812/devlog/blob/master/internal/cli/worklog.go): `internal/cli/worklog.go`

### Profiles and storage

- [Profile database manager](https://github.com/ishaan812/devlog/blob/master/internal/db/db.go): `internal/db/db.go`
- [SQL repository](https://github.com/ishaan812/devlog/blob/master/internal/db/repository.go): `internal/db/repository.go`
- [Profile configuration](https://github.com/ishaan812/devlog/blob/master/internal/config/config.go): `internal/config/config.go`

### AI summaries

- [Code summarizer](https://github.com/ishaan812/devlog/blob/master/internal/indexer/summarizer.go): `internal/indexer/summarizer.go`
- [Prompt templates](https://github.com/ishaan812/devlog/blob/master/internal/prompts/prompts.go): `internal/prompts/prompts.go`
- [LLM provider client](https://github.com/ishaan812/devlog/blob/master/internal/llm/client.go): `internal/llm/client.go`
- [LLM services](https://github.com/ishaan812/devlog/tree/master/internal/llm): `internal/llm`

### CLI capabilities

- [CLI entry](https://github.com/ishaan812/devlog/blob/master/cmd/devlog/main.go): `cmd/devlog/main.go`
- [Command router](https://github.com/ishaan812/devlog/blob/master/internal/cli/root.go): `internal/cli/root.go`
- [AI commit messages](https://github.com/ishaan812/devlog/blob/master/internal/cli/commit.go): `internal/cli/commit.go`
- [Onboarding setup](https://github.com/ishaan812/devlog/blob/master/internal/cli/onboard.go): `internal/cli/onboard.go`
- [Scheduled ingestion](https://github.com/ishaan812/devlog/blob/master/internal/cli/cron.go): `internal/cli/cron.go`
- [Obsidian export](https://github.com/ishaan812/devlog/blob/master/internal/cli/export.go): `internal/cli/export.go`
- [Console command](https://github.com/ishaan812/devlog/blob/master/internal/cli/console.go): `internal/cli/console.go`
- [Interactive worklog console](https://github.com/ishaan812/devlog/blob/master/internal/tui/console.go): `internal/tui/console.go`

### Project website

- [Website app](https://github.com/ishaan812/devlog/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Documentation page](https://github.com/ishaan812/devlog/blob/master/frontend/src/DocsPage.jsx): `frontend/src/DocsPage.jsx`
- [Frontend mount](https://github.com/ishaan812/devlog/blob/master/frontend/src/main.jsx): `frontend/src/main.jsx`

### Other components

- **Developer**
- **Obsidian vault**

## Connections

- Developer → CLI entry: runs commands
- CLI entry → Command router: executes CLI (evidence: `cmd/devlog/main.go`)
- Command router → Git ingestion: dispatches ingest
- Command router → Worklog generation: dispatches worklog
- Developer → Git ingestion: requests ingestion
- Git ingestion → Git history reader: reads Git history (evidence: `internal/cli/ingest.go`)
- Git ingestion → Branch selection: selects branches (evidence: `internal/cli/ingest.go`)
- Git ingestion → Codebase scanner: scans codebase (evidence: `internal/cli/ingest.go`)
- Git ingestion → Profile database manager: accesses profile DB (evidence: `internal/cli/ingest.go`)
- Git ingestion → Code summarizer: generates summaries (evidence: `internal/cli/ingest.go`)
- Worklog generation → SQL repository: queries and caches (evidence: `internal/cli/worklog.go`)
- Worklog generation → LLM provider client: requests summaries (evidence: `internal/cli/worklog.go`)
- Worklog generation → Prompt templates: builds prompts (evidence: `internal/cli/worklog.go`)
- Profile database manager → Profile configuration: resolves DB paths (evidence: `internal/db/db.go`)
- Profile database manager → SQL repository: creates repository (evidence: `internal/db/db.go`)
- SQL repository → Profile database manager: uses SQL connection
- Code summarizer → Prompt templates: builds prompts (evidence: `internal/indexer/summarizer.go`)
- Code summarizer → LLM provider client: requests completion (evidence: `internal/indexer/summarizer.go`)
- LLM provider client → LLM services: selects provider (evidence: `internal/llm/client.go`)
- Developer → AI commit messages: generates commit
- Developer → Onboarding setup: configures DevLog
- Developer → Scheduled ingestion: schedules ingestion
- Scheduled ingestion → Git ingestion: schedules daily run
- Developer → Obsidian export: exports worklogs
- Obsidian export → Obsidian vault: writes log exports
- Developer → Console command: opens console
- Console command → Interactive worklog console: starts console UI
- Interactive worklog console → SQL repository: loads worklogs (evidence: `internal/tui/console.go`)
- Frontend mount → Website app: mounts app (evidence: `frontend/src/main.jsx`)
- Website app → Documentation page: renders docs (evidence: `frontend/src/App.jsx`)
