# ivantumanow/dcut-test architecture

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

- Interactive diagram: https://gitdiagram.com/ivantumanow/dcut-test
- Repository: https://github.com/ivantumanow/dcut-test

## Overview

This is a React SPA for sign-in-gated todo management: users sign in, manage and filter todos on the home page, track completion, and view deleted items in an archive. The router protects home and archive routes; Zustand stores user/todo data persistently, while a separate token store supports the simulated authentication flow. The README also documents logout and theme switching. Some connections—especially header integration and unsampled widgets—are not visible in the excerpts, so those links are omitted rather than inferred.

Main entry points: [`src/page/home/ui/page.tsx`](https://github.com/ivantumanow/dcut-test/blob/main/src/page/home/ui/page.tsx) (Home page), [`src/app/routing/router.tsx`](https://github.com/ivantumanow/dcut-test/blob/main/src/app/routing/router.tsx) (Route dispatch), [`src/widgets/todo-lists/ui/todo-carousel.tsx`](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-lists/ui/todo-carousel.tsx) (Todo carousel), [`src/entities/users/model/user.store.ts`](https://github.com/ivantumanow/dcut-test/blob/main/src/entities/users/model/user.store.ts) (User and todo store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_bootstrap["App bootstrap<br/>[main.tsx]"]
  node_router["Route dispatch<br/>[router.tsx]"]
  node_routeguards["Route guards<br/>[routes.tsx]"]
  node_loginpage["Login page<br/>[page.tsx]"]
  node_homepage["Home page<br/>[page.tsx]"]
  node_archivepage["Archive page<br/>[page.tsx]"]
  node_header["Header<br/>[header.tsx]"]
end

subgraph group_auth["Authentication"]
  node_loginform["Login form<br/>[login.tsx]"]
  node_tokenstore[("Token store<br/>[token.store.ts]")]
  node_logout["Logout feature<br/>[logout.tsx]"]
end

subgraph group_todos["Todo management"]
  node_userstore[("User and todo store<br/>[user.store.ts]")]
  node_todoentity["Todo entity<br/>[todo.tsx]"]
  node_todolist["Todo carousel<br/>[todo-carousel.tsx]"]
  node_todoedit["Todo editing"]
  node_filter["Completion filter"]
  node_subtags["Custom tag filtering<br/>[todo-sub-tag.tsx]"]
  node_tagservice["Unique tag service"]
  node_progress["Completion progress<br/>[todo-progress.tsx]"]
end

subgraph group_shared["Shared UI and state"]
  node_theme["Theme switching<br/>[change-theme.tsx]"]
  node_themeconfig["Theme configuration<br/>[theme.ts]"]
end

node_user(("User"))

node_user -->|"opens app"| node_bootstrap
node_bootstrap -->|"mounts"| node_router
node_router -->|"routes to"| node_loginpage
node_router -->|"routes to"| node_homepage
node_router -->|"routes to"| node_archivepage
node_router -->|"applies guards"| node_routeguards
node_routeguards -->|"checks token"| node_tokenstore
node_loginpage -->|"renders"| node_loginform
node_loginform -->|"saves token"| node_tokenstore
node_loginform -->|"creates user"| node_userstore
node_homepage -->|"reads todos"| node_userstore
node_homepage -->|"filters completion"| node_filter
node_homepage -->|"filters by tags"| node_subtags
node_homepage -->|"renders todos"| node_todolist
node_homepage -->|"shows progress"| node_progress
node_archivepage -->|"reads archive"| node_userstore
node_archivepage -->|"renders archived"| node_todolist
node_todolist -->|"updates todos"| node_userstore
node_todolist -->|"renders cards"| node_todoentity
node_todolist -->|"opens editor"| node_todoedit
node_subtags -->|"uses tag service"| node_tagservice
node_tagservice -.->|"derives tags"| node_userstore
node_logout -->|"clears token"| node_tokenstore
node_bootstrap -->|"configures theme"| node_themeconfig
node_user -.-> node_header
node_header -.-> node_theme

click node_bootstrap "https://github.com/ivantumanow/dcut-test/blob/main/src/app/main.tsx"
click node_router "https://github.com/ivantumanow/dcut-test/blob/main/src/app/routing/router.tsx"
click node_routeguards "https://github.com/ivantumanow/dcut-test/blob/main/src/app/routing/routes.tsx"
click node_loginpage "https://github.com/ivantumanow/dcut-test/blob/main/src/page/login/ui/page.tsx"
click node_homepage "https://github.com/ivantumanow/dcut-test/blob/main/src/page/home/ui/page.tsx"
click node_archivepage "https://github.com/ivantumanow/dcut-test/blob/main/src/page/archive/ui/page.tsx"
click node_loginform "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/form-login/ui/login.tsx"
click node_tokenstore "https://github.com/ivantumanow/dcut-test/blob/main/src/features/token/model/token.store.ts"
click node_userstore "https://github.com/ivantumanow/dcut-test/blob/main/src/entities/users/model/user.store.ts"
click node_todoentity "https://github.com/ivantumanow/dcut-test/blob/main/src/entities/todos/ui/todo.tsx"
click node_todolist "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-lists/ui/todo-carousel.tsx"
click node_todoedit "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-lists/model/use-todo-edit.hooks.tsx"
click node_filter "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-filter/model/use-filter.hooks.tsx"
click node_subtags "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-subtag/ui/todo-sub-tag.tsx"
click node_tagservice "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-subtag/model/unique-sub-tags.services.ts"
click node_progress "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-progress/ui/todo-progress.tsx"
click node_logout "https://github.com/ivantumanow/dcut-test/blob/main/src/features/logout/ui/logout.tsx"
click node_theme "https://github.com/ivantumanow/dcut-test/blob/main/src/features/change-theme/ui/change-theme.tsx"
click node_themeconfig "https://github.com/ivantumanow/dcut-test/blob/main/src/app/theme/theme.ts"
click node_header "https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/header/ui/header.tsx"

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_bootstrap,node_router,node_routeguards,node_loginpage,node_homepage,node_archivepage,node_header,node_user toneBlue
class node_loginform,node_tokenstore,node_logout toneAmber
class node_userstore,node_todoentity,node_todolist,node_todoedit,node_filter,node_subtags,node_tagservice,node_progress toneMint
class node_theme,node_themeconfig toneRose
```

## Components

### Application

- [App bootstrap](https://github.com/ivantumanow/dcut-test/blob/main/src/app/main.tsx): `src/app/main.tsx`
- [Route dispatch](https://github.com/ivantumanow/dcut-test/blob/main/src/app/routing/router.tsx): `src/app/routing/router.tsx`
- [Route guards](https://github.com/ivantumanow/dcut-test/blob/main/src/app/routing/routes.tsx): `src/app/routing/routes.tsx`
- [Login page](https://github.com/ivantumanow/dcut-test/blob/main/src/page/login/ui/page.tsx): `src/page/login/ui/page.tsx`
- [Home page](https://github.com/ivantumanow/dcut-test/blob/main/src/page/home/ui/page.tsx): `src/page/home/ui/page.tsx`
- [Archive page](https://github.com/ivantumanow/dcut-test/blob/main/src/page/archive/ui/page.tsx): `src/page/archive/ui/page.tsx`
- [Header](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/header/ui/header.tsx): `src/widgets/header/ui/header.tsx`

### Authentication

- [Login form](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/form-login/ui/login.tsx): `src/widgets/form-login/ui/login.tsx`
- [Token store](https://github.com/ivantumanow/dcut-test/blob/main/src/features/token/model/token.store.ts): `src/features/token/model/token.store.ts`
- [Logout feature](https://github.com/ivantumanow/dcut-test/blob/main/src/features/logout/ui/logout.tsx): `src/features/logout/ui/logout.tsx`

### Todo management

- [User and todo store](https://github.com/ivantumanow/dcut-test/blob/main/src/entities/users/model/user.store.ts): `src/entities/users/model/user.store.ts`
- [Todo entity](https://github.com/ivantumanow/dcut-test/blob/main/src/entities/todos/ui/todo.tsx): `src/entities/todos/ui/todo.tsx`
- [Todo carousel](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-lists/ui/todo-carousel.tsx): `src/widgets/todo-lists/ui/todo-carousel.tsx`
- [Todo editing](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-lists/model/use-todo-edit.hooks.tsx): `src/widgets/todo-lists/model/use-todo-edit.hooks.tsx`
- [Completion filter](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-filter/model/use-filter.hooks.tsx): `src/widgets/todo-filter/model/use-filter.hooks.tsx`
- [Custom tag filtering](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-subtag/ui/todo-sub-tag.tsx): `src/widgets/todo-subtag/ui/todo-sub-tag.tsx`
- [Unique tag service](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-subtag/model/unique-sub-tags.services.ts): `src/widgets/todo-subtag/model/unique-sub-tags.services.ts`
- [Completion progress](https://github.com/ivantumanow/dcut-test/blob/main/src/widgets/todo-progress/ui/todo-progress.tsx): `src/widgets/todo-progress/ui/todo-progress.tsx`

### Shared UI and state

- [Theme switching](https://github.com/ivantumanow/dcut-test/blob/main/src/features/change-theme/ui/change-theme.tsx): `src/features/change-theme/ui/change-theme.tsx`
- [Theme configuration](https://github.com/ivantumanow/dcut-test/blob/main/src/app/theme/theme.ts): `src/app/theme/theme.ts`

### Other components

- **User**

## Connections

- User → App bootstrap: opens app (evidence: `src/app/main.tsx`)
- App bootstrap → Route dispatch: mounts (evidence: `src/app/main.tsx`)
- Route dispatch → Login page: routes to (evidence: `src/app/routing/router.tsx`)
- Route dispatch → Home page: routes to (evidence: `src/app/routing/router.tsx`)
- Route dispatch → Archive page: routes to (evidence: `src/app/routing/router.tsx`)
- Route dispatch → Route guards: applies guards (evidence: `src/app/routing/router.tsx`)
- Route guards → Token store: checks token (evidence: `src/app/routing/routes.tsx`)
- Login page → Login form: renders (evidence: `src/page/login/ui/page.tsx`)
- Login form → Token store: saves token (evidence: `src/widgets/form-login/ui/login.tsx`)
- Login form → User and todo store: creates user (evidence: `src/widgets/form-login/ui/login.tsx`)
- Home page → User and todo store: reads todos (evidence: `src/page/home/ui/page.tsx`)
- Home page → Completion filter: filters completion (evidence: `src/page/home/ui/page.tsx`)
- Home page → Custom tag filtering: filters by tags (evidence: `src/page/home/ui/page.tsx`)
- Home page → Todo carousel: renders todos (evidence: `src/page/home/ui/page.tsx`)
- Home page → Completion progress: shows progress (evidence: `src/page/home/ui/page.tsx`)
- Archive page → User and todo store: reads archive (evidence: `src/page/archive/ui/page.tsx`)
- Archive page → Todo carousel: renders archived (evidence: `src/page/archive/ui/page.tsx`)
- Todo carousel → User and todo store: updates todos (evidence: `src/widgets/todo-lists/ui/todo-carousel.tsx`)
- Todo carousel → Todo entity: renders cards (evidence: `src/widgets/todo-lists/ui/todo-carousel.tsx`)
- Todo carousel → Todo editing: opens editor (evidence: `src/widgets/todo-lists/ui/todo-carousel.tsx`)
- Custom tag filtering → Unique tag service: uses tag service (evidence: `src/widgets/todo-subtag/ui/todo-sub-tag.tsx`)
- Unique tag service → User and todo store: derives tags
- Logout feature → Token store: clears token (evidence: `src/features/logout/ui/logout.tsx`)
- App bootstrap → Theme configuration: configures theme (evidence: `src/app/main.tsx`)
- User → Header
- Header → Theme switching
