# hmaxwilson/todo-tasks architecture

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

- Interactive diagram: https://gitdiagram.com/hmaxwilson/todo-tasks
- Repository: https://github.com/hmaxwilson/todo-tasks

## Overview

This repository is a full-stack Todo application: users view and sort todos, add or complete them, delete them, and manually reorder them. The Angular app calls the ASP.NET Core OData API, whose repository persists items in a JSON file; the README also documents an alternative Express API. The graph includes the main UI components and API stages. Some template-level wiring and the alternative API’s runtime configuration were not shown, so those relationships are omitted.

Main entry points: [`todo-client/src/app/app.component.ts`](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/app.component.ts) (Todo app state), [`TodoApi/Controllers/TodoItemsController.cs`](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Controllers/TodoItemsController.cs) (Todo endpoints), [`TodoApi/Repositories/JsonTodoRepository.cs`](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Repositories/JsonTodoRepository.cs) (Todo repository), [`todo-client/src/app/services/todo.service.ts`](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/services/todo.service.ts) (Todo HTTP service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Angular client"]
  node_app["Todo app state<br/>[app.component.ts]"]
  node_sort["Sort options<br/>[todo-sort.model.ts]"]
  node_service["Todo HTTP service<br/>[todo.service.ts]"]
  node_add["Add form"]
  node_list["Todo list"]
  node_item["Todo row"]
  node_todo_model["Todo data model<br/>[todo-item.model.ts]"]
end

subgraph group_aspnet["ASP.NET OData API"]
  node_api_setup["OData setup<br/>[Program.cs]"]
  node_controller["Todo endpoints"]
  node_domain["Todo entity<br/>[TodoItem.cs]"]
  node_repository["Todo repository"]
end

subgraph group_storage["JSON persistence"]
  node_json_store[("Todo JSON file")]
end

subgraph group_node["Alternative Node API"]
  node_node_entry["Express entry<br/>[index.ts]"]
  node_node_router["Todo routes<br/>[router.ts]"]
  node_node_repo["Node repository<br/>[repository.ts]"]
  node_node_types["Node todo types<br/>[types.ts]"]
  node_node_store[("Node JSON file<br/>[repository.ts]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"requests data"| node_service
node_app -->|"uses options"| node_sort
node_app -->|"uses type"| node_todo_model
node_service -->|"uses type"| node_todo_model
node_service -->|"sends HTTP"| node_controller
node_api_setup -->|"maps controllers"| node_controller
node_api_setup -->|"registers service"| node_repository
node_controller -->|"calls"| node_repository
node_controller -->|"uses entity"| node_domain
node_repository -->|"reads and writes"| node_domain
node_repository -->|"reads and writes"| node_json_store
node_node_entry -->|"registers routes"| node_node_router
node_node_router -->|"calls"| node_node_repo
node_node_repo -->|"uses type"| node_node_types
node_node_repo -->|"reads and writes"| node_node_store
node_add -.->|"submits event"| node_app
node_list -.->|"renders rows"| node_item
node_list -.->|"emits actions"| node_app

click node_app "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/app.component.ts"
click node_sort "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/models/todo-sort.model.ts"
click node_service "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/services/todo.service.ts"
click node_add "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/components/add-todo/add-todo.component.ts"
click node_list "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/components/todo-list/todo-list.component.ts"
click node_item "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/components/todo-item/todo-item.component.ts"
click node_todo_model "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/models/todo-item.model.ts"
click node_api_setup "https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Program.cs"
click node_controller "https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Controllers/TodoItemsController.cs"
click node_domain "https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Models/TodoItem.cs"
click node_repository "https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Repositories/JsonTodoRepository.cs"
click node_json_store "https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Repositories/JsonTodoRepository.cs"
click node_node_entry "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/index.ts"
click node_node_router "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/router.ts"
click node_node_repo "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/repository.ts"
click node_node_types "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/types.ts"
click node_node_store "https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/repository.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_app,node_sort,node_service,node_add,node_list,node_item,node_todo_model,node_user toneBlue
class node_api_setup,node_controller,node_domain,node_repository toneAmber
class node_json_store toneMint
class node_node_entry,node_node_router,node_node_repo,node_node_types,node_node_store toneRose
```

## Components

### Angular client

- [Todo app state](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/app.component.ts): `todo-client/src/app/app.component.ts`
- [Sort options](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/models/todo-sort.model.ts): `todo-client/src/app/models/todo-sort.model.ts`
- [Todo HTTP service](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/services/todo.service.ts): `todo-client/src/app/services/todo.service.ts`
- [Add form](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/components/add-todo/add-todo.component.ts): `todo-client/src/app/components/add-todo/add-todo.component.ts`
- [Todo list](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/components/todo-list/todo-list.component.ts): `todo-client/src/app/components/todo-list/todo-list.component.ts`
- [Todo row](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/components/todo-item/todo-item.component.ts): `todo-client/src/app/components/todo-item/todo-item.component.ts`
- [Todo data model](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-client/src/app/models/todo-item.model.ts): `todo-client/src/app/models/todo-item.model.ts`

### ASP.NET OData API

- [OData setup](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Program.cs): `TodoApi/Program.cs`
- [Todo endpoints](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Controllers/TodoItemsController.cs): `TodoApi/Controllers/TodoItemsController.cs`
- [Todo entity](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Models/TodoItem.cs): `TodoApi/Models/TodoItem.cs`
- [Todo repository](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Repositories/JsonTodoRepository.cs): `TodoApi/Repositories/JsonTodoRepository.cs`

### JSON persistence

- [Todo JSON file](https://github.com/hmaxwilson/todo-tasks/blob/main/TodoApi/Repositories/JsonTodoRepository.cs): `TodoApi/Repositories/JsonTodoRepository.cs`

### Alternative Node API

- [Express entry](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/index.ts): `todo-node-api/src/index.ts`
- [Todo routes](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/router.ts): `todo-node-api/src/router.ts`
- [Node repository](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/repository.ts): `todo-node-api/src/repository.ts`
- [Node todo types](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/types.ts): `todo-node-api/src/types.ts`
- [Node JSON file](https://github.com/hmaxwilson/todo-tasks/blob/main/todo-node-api/src/repository.ts): `todo-node-api/src/repository.ts`

### Other components

- **User**

## Connections

- User → Todo app state: uses (evidence: `README.md`)
- Todo app state → Todo HTTP service: requests data (evidence: `todo-client/src/app/app.component.ts`)
- Todo app state → Sort options: uses options (evidence: `todo-client/src/app/app.component.ts`)
- Todo app state → Todo data model: uses type (evidence: `todo-client/src/app/app.component.ts`)
- Todo HTTP service → Todo data model: uses type (evidence: `todo-client/src/app/services/todo.service.ts`)
- Todo HTTP service → Todo endpoints: sends HTTP (evidence: `todo-client/src/app/services/todo.service.ts`)
- OData setup → Todo endpoints: maps controllers (evidence: `TodoApi/Program.cs`)
- OData setup → Todo repository: registers service (evidence: `TodoApi/Program.cs`)
- Todo endpoints → Todo repository: calls (evidence: `TodoApi/Controllers/TodoItemsController.cs`)
- Todo endpoints → Todo entity: uses entity (evidence: `TodoApi/Controllers/TodoItemsController.cs`)
- Todo repository → Todo entity: reads and writes (evidence: `TodoApi/Repositories/JsonTodoRepository.cs`)
- Todo repository → Todo JSON file: reads and writes (evidence: `TodoApi/Repositories/JsonTodoRepository.cs`)
- Express entry → Todo routes: registers routes (evidence: `todo-node-api/src/index.ts`)
- Todo routes → Node repository: calls (evidence: `todo-node-api/src/router.ts`)
- Node repository → Node todo types: uses type (evidence: `todo-node-api/src/repository.ts`)
- Node repository → Node JSON file: reads and writes (evidence: `todo-node-api/src/repository.ts`)
- Add form → Todo app state: submits event
- Todo list → Todo row: renders rows
- Todo list → Todo app state: emits actions
