# prithvishsarkar/taskmanager architecture

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

- Interactive diagram: https://gitdiagram.com/prithvishsarkar/taskmanager
- Repository: https://github.com/prithvishsarkar/taskmanager

## Overview

#### Purpose and Runtime
This is a client-only task manager: users create, complete, edit, delete, and bulk-clear tasks. React runs in the browser; browser Local Storage is the persistence boundary. There is no backend, API, authentication, or server-side data layer indicated.

- Browser bootstrap: `src/main.jsx`
- Application root: `src/App.jsx`
- Vite host/build entry: `index.html`

#### Application Composition
`App` is the top-level composition point, delegating the primary task UI to a central main container and shared footer.

- Root UI: `src/App.jsx`
- Main task workspace: `components/MainComponent.jsx`
- Footer/presentation shell: `components/Footer.jsx`

#### Task State and Persistence Flow
The central task workspace owns or coordinates task-list state. Tasks carry text, completion status, and creation timestamp. User mutations—add, status toggle, edit, individual delete, and bulk delete—update rendered state and persist the resulting list in Local Storage. On later browser loads, persisted tasks are restored.

- State orchestration and persistence integration: `components/MainComponent.jsx`
- List rendering boundary: `components/ToDoList.jsx`
- Individual task representation/actions: `components/SingleTask.jsx`

#### Creation and Validation
The input component captures new task text and sends creation requests upward to the state owner. Empty submissions do not create a task; they trigger a transient alert modal instead.

- Input and add-task interaction: `components/ToDoInput.jsx`
- Validation feedback modal: `components/AlertModal.jsx`
- Parent mutation handling: `components/MainComponent.jsx`

#### List Item Lifecycle
The list maps task records to individual task components. Each item exposes completion toggling, edit initiation, and deletion. Item-level events flow back to the central state owner rather than communicating directly with storage.

- Collection rendering: `components/ToDoList.jsx`
- Per-task UI and action controls: `components/SingleTask.jsx`
- Mutation coordinator: `components/MainComponent.jsx`

#### Modal-Controlled Destructive and Edit Flows
Editing is mediated by a modal that receives the selected task and returns an updated description or cancellation. “Delete All” is similarly confirmation-gated; confirmation clears task data from Local Storage and reloads or resets the application state.

- Edit transaction UI: `components/EditModal.jsx`
- Bulk-delete confirmation: `components/DeleteDataModal.jsx`
- Modal visibility, selected-task state, and commits: `components/MainComponent.jsx`

#### Styling and Delivery Infrastructure
The project uses Vite for local development and production bundling, React for rendering, and Tailwind CSS for responsive styling. CSS enters through the source stylesheet files and Tailwind configuration.

- CSS entry/source styles: `src/input.css`, `src/tailwind.css`
- Tailwind setup: `tailwind.config.js`
- Vite configuration: `vite.config.js`

Main entry points: [`components/MainComponent.jsx`](https://github.com/prithvishsarkar/taskmanager/blob/main/components/MainComponent.jsx) (Task workspace), [`src/App.jsx`](https://github.com/prithvishsarkar/taskmanager/blob/main/src/App.jsx) (App), [`vite.config.js`](https://github.com/prithvishsarkar/taskmanager/blob/main/vite.config.js) (Vite), [`src/main.jsx`](https://github.com/prithvishsarkar/taskmanager/blob/main/src/main.jsx) (React bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser Runtime"]
  node_main["React bootstrap<br/>browser entry<br/>[main.jsx]"]
  node_app["App<br/>root composition<br/>[App.jsx]"]
  node_storage[("Local Storage<br/>browser persistence")]
end

subgraph group_ui["Task UI"]
  node_workspace["Task workspace<br/>state &amp; persistence coordinator<br/>[MainComponent.jsx]"]
  node_input["Task input<br/>creation UI<br/>[ToDoInput.jsx]"]
  node_list["Task list<br/>collection renderer<br/>[ToDoList.jsx]"]
  node_task["Task item<br/>task actions UI<br/>[SingleTask.jsx]"]
  node_footer["Footer<br/>presentation shell<br/>[Footer.jsx]"]
end

subgraph group_modals["Modal Flows"]
  node_alert["Empty-task alert<br/>validation modal<br/>[AlertModal.jsx]"]
  node_edit["Edit task modal<br/>edit transaction UI<br/>[EditModal.jsx]"]
  node_delete_all["Delete-all modal<br/>confirmation UI"]
end

subgraph group_delivery["Build &amp; Styling"]
  node_vite{{"Vite<br/>dev server &amp; bundler<br/>[vite.config.js]"}}
  node_html["HTML host<br/>document entry<br/>[index.html]"]
  node_styles["Source styles<br/>CSS entry styles"]
  node_tailwind["Tailwind setup<br/>CSS configuration<br/>[tailwind.config.js]"]
end

node_vite -->|"serves / bundles"| node_html
node_html -->|"loads"| node_main
node_main -->|"renders"| node_app
node_app -->|"composes"| node_workspace
node_app -->|"composes"| node_footer
node_workspace -->|"hosts"| node_input
node_workspace -->|"provides tasks"| node_list
node_list -->|"maps records to"| node_task
node_input -->|"add request"| node_workspace
node_task -->|"toggle, edit, delete"| node_workspace
node_workspace -->|"restores and persists tasks"| node_storage
node_workspace -->|"opens for empty input"| node_alert
node_workspace -->|"opens and commits edit"| node_edit
node_workspace -->|"opens for bulk clear"| node_delete_all
node_delete_all -->|"confirmed clear"| node_workspace
node_styles -->|"uses"| node_tailwind
node_vite -->|"processes"| node_styles

click node_vite "https://github.com/prithvishsarkar/taskmanager/blob/main/vite.config.js"
click node_html "https://github.com/prithvishsarkar/taskmanager/blob/main/index.html"
click node_main "https://github.com/prithvishsarkar/taskmanager/blob/main/src/main.jsx"
click node_app "https://github.com/prithvishsarkar/taskmanager/blob/main/src/App.jsx"
click node_workspace "https://github.com/prithvishsarkar/taskmanager/blob/main/components/MainComponent.jsx"
click node_input "https://github.com/prithvishsarkar/taskmanager/blob/main/components/ToDoInput.jsx"
click node_list "https://github.com/prithvishsarkar/taskmanager/blob/main/components/ToDoList.jsx"
click node_task "https://github.com/prithvishsarkar/taskmanager/blob/main/components/SingleTask.jsx"
click node_footer "https://github.com/prithvishsarkar/taskmanager/blob/main/components/Footer.jsx"
click node_alert "https://github.com/prithvishsarkar/taskmanager/blob/main/components/AlertModal.jsx"
click node_edit "https://github.com/prithvishsarkar/taskmanager/blob/main/components/EditModal.jsx"
click node_delete_all "https://github.com/prithvishsarkar/taskmanager/blob/main/components/DeleteDataModal.jsx"
click node_tailwind "https://github.com/prithvishsarkar/taskmanager/blob/main/tailwind.config.js"

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_main,node_app,node_storage toneBlue
class node_workspace,node_input,node_list,node_task,node_footer toneAmber
class node_alert,node_edit,node_delete_all toneMint
class node_vite,node_html,node_styles,node_tailwind toneRose
```

## Components

### Browser Runtime

- [React bootstrap](https://github.com/prithvishsarkar/taskmanager/blob/main/src/main.jsx): browser entry · `src/main.jsx`
- [App](https://github.com/prithvishsarkar/taskmanager/blob/main/src/App.jsx): root composition · `src/App.jsx`
- **Local Storage**: browser persistence · Stores the task list across browser loads.

### Task UI

- [Task workspace](https://github.com/prithvishsarkar/taskmanager/blob/main/components/MainComponent.jsx): state & persistence coordinator · Coordinates task mutations, modal state, restoration, and persistence. · `components/MainComponent.jsx`
- [Task input](https://github.com/prithvishsarkar/taskmanager/blob/main/components/ToDoInput.jsx): creation UI · `components/ToDoInput.jsx`
- [Task list](https://github.com/prithvishsarkar/taskmanager/blob/main/components/ToDoList.jsx): collection renderer · `components/ToDoList.jsx`
- [Task item](https://github.com/prithvishsarkar/taskmanager/blob/main/components/SingleTask.jsx): task actions UI · `components/SingleTask.jsx`
- [Footer](https://github.com/prithvishsarkar/taskmanager/blob/main/components/Footer.jsx): presentation shell · `components/Footer.jsx`

### Modal Flows

- [Empty-task alert](https://github.com/prithvishsarkar/taskmanager/blob/main/components/AlertModal.jsx): validation modal · `components/AlertModal.jsx`
- [Edit task modal](https://github.com/prithvishsarkar/taskmanager/blob/main/components/EditModal.jsx): edit transaction UI · `components/EditModal.jsx`
- [Delete-all modal](https://github.com/prithvishsarkar/taskmanager/blob/main/components/DeleteDataModal.jsx): confirmation UI · `components/DeleteDataModal.jsx`

### Build & Styling

- [Vite](https://github.com/prithvishsarkar/taskmanager/blob/main/vite.config.js): dev server & bundler · `vite.config.js`
- [HTML host](https://github.com/prithvishsarkar/taskmanager/blob/main/index.html): document entry · `index.html`
- **Source styles**: CSS entry styles
- [Tailwind setup](https://github.com/prithvishsarkar/taskmanager/blob/main/tailwind.config.js): CSS configuration · `tailwind.config.js`

## Connections

- Vite → HTML host: serves / bundles
- HTML host → React bootstrap: loads
- React bootstrap → App: renders
- App → Task workspace: composes
- App → Footer: composes
- Task workspace → Task input: hosts
- Task workspace → Task list: provides tasks
- Task list → Task item: maps records to
- Task input → Task workspace: add request
- Task item → Task workspace: toggle, edit, delete
- Task workspace → Local Storage: restores and persists tasks
- Task workspace → Empty-task alert: opens for empty input
- Task workspace → Edit task modal: opens and commits edit
- Task workspace → Delete-all modal: opens for bulk clear
- Delete-all modal → Task workspace: confirmed clear
- Source styles → Tailwind setup: uses
- Vite → Source styles: processes
