# spoja-10/task-manager architecture

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

- Interactive diagram: https://gitdiagram.com/spoja-10/task-manager
- Repository: https://github.com/spoja-10/task-manager

## Overview

TaskFlow is a React and Express task manager. Users enter through the landing page, continue as a guest or authenticate, then create and manage tasks in a Kanban workflow or list view, with filtering and persisted theme preferences. Signed-in task operations pass through the client task context and API, protected server routes and controllers, and MongoDB models; guest tasks remain in browser storage and can be migrated after sign-in. Google OAuth is a documented capability, but its route wiring is not present in the sampled auth routes, so that connection is not asserted.

Main entry points: [`client/src/pages/Dashboard.jsx`](https://github.com/spoja-10/task-manager/blob/main/client/src/pages/Dashboard.jsx) (Task dashboard), [`client/src/context/TaskContext.jsx`](https://github.com/spoja-10/task-manager/blob/main/client/src/context/TaskContext.jsx) (Task state), [`client/src/App.jsx`](https://github.com/spoja-10/task-manager/blob/main/client/src/App.jsx) (Route shell), [`client/src/context/AuthContext.jsx`](https://github.com/spoja-10/task-manager/blob/main/client/src/context/AuthContext.jsx) (Auth state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["Route shell<br/>[App.jsx]"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
  node_dashboard["Task dashboard<br/>[Dashboard.jsx]"]
  node_authpage["Authentication UI<br/>[AuthPage.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_taskstate["Task state<br/>[TaskContext.jsx]"]
  node_api["HTTP client<br/>[axios.js]"]
  node_kanban["Kanban board<br/>[KanbanBoard.jsx]"]
  node_taskcard["Task card<br/>[TaskCard.jsx]"]
  node_taskmodal["Task editor<br/>[TaskModal.jsx]"]
  node_listview["List view<br/>[ListView.jsx]"]
  node_filters["Task filters<br/>[FilterBar.jsx]"]
  node_navbar["Navigation and theme UI<br/>[Navbar.jsx]"]
  node_themestate["Theme state<br/>[ThemeContext.jsx]"]
  node_guestprompt["Guest sign-in prompts"]
end

subgraph group_server["API and domain"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_taskroutes["Task routes<br/>[taskRoutes.js]"]
  node_authmiddleware["Token protection<br/>[auth.js]"]
  node_authcontroller["Auth operations<br/>[authController.js]"]
  node_taskcontroller["Task operations<br/>[taskController.js]"]
end

subgraph group_storage["Persistence"]
  node_userdb[("User records<br/>[User.js]")]
  node_taskdb[("Task records<br/>[Task.js]")]
end

node_user(("TaskFlow user"))
node_mongod[("MongoDB")]
node_google["Google identity"]
node_browserstorage[("Browser localStorage")]

node_user -->|"opens app"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_authpage
node_dashboard -->|"uses tasks"| node_taskstate
node_dashboard -->|"renders"| node_kanban
node_dashboard -->|"renders"| node_taskmodal
node_dashboard -->|"renders"| node_guestprompt
node_kanban -->|"renders"| node_taskcard
node_listview -->|"renders"| node_taskcard
node_listview -->|"opens editor"| node_taskmodal
node_taskcard -->|"updates tasks"| node_taskstate
node_taskmodal -->|"creates or updates"| node_taskstate
node_dashboard -->|"renders"| node_filters
node_dashboard -->|"renders"| node_listview
node_filters -.->|"filters tasks"| node_taskstate
node_authpage -->|"authenticates"| node_authstate
node_navbar -->|"uses auth"| node_authstate
node_navbar -->|"toggles theme"| node_themestate
node_app -->|"provides theme"| node_themestate
node_authstate -->|"sends auth requests"| node_api
node_taskstate -->|"checks guest mode"| node_authstate
node_taskstate -->|"sends task requests"| node_api
node_taskstate -->|"reads and writes guest tasks"| node_browserstorage
node_authstate -->|"stores token"| node_browserstorage
node_api -.->|"calls auth API"| node_authroutes
node_api -.->|"calls task API"| node_taskroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects profile route"| node_authmiddleware
node_taskroutes -->|"protects routes"| node_authmiddleware
node_taskroutes -->|"dispatches"| node_taskcontroller
node_authmiddleware -->|"loads user"| node_userdb
node_authcontroller -->|"reads and writes users"| node_userdb
node_authcontroller -->|"verifies credential"| node_google
node_taskcontroller -->|"reads and writes tasks"| node_taskdb
node_userdb -.->|"persists records"| node_mongod
node_taskdb -.->|"persists records"| node_mongod

click node_app "https://github.com/spoja-10/task-manager/blob/main/client/src/App.jsx"
click node_landing "https://github.com/spoja-10/task-manager/blob/main/client/src/pages/LandingPage.jsx"
click node_dashboard "https://github.com/spoja-10/task-manager/blob/main/client/src/pages/Dashboard.jsx"
click node_authpage "https://github.com/spoja-10/task-manager/blob/main/client/src/pages/AuthPage.jsx"
click node_authstate "https://github.com/spoja-10/task-manager/blob/main/client/src/context/AuthContext.jsx"
click node_taskstate "https://github.com/spoja-10/task-manager/blob/main/client/src/context/TaskContext.jsx"
click node_api "https://github.com/spoja-10/task-manager/blob/main/client/src/api/axios.js"
click node_kanban "https://github.com/spoja-10/task-manager/blob/main/client/src/components/KanbanBoard.jsx"
click node_taskcard "https://github.com/spoja-10/task-manager/blob/main/client/src/components/TaskCard.jsx"
click node_taskmodal "https://github.com/spoja-10/task-manager/blob/main/client/src/components/TaskModal.jsx"
click node_listview "https://github.com/spoja-10/task-manager/blob/main/client/src/components/ListView.jsx"
click node_filters "https://github.com/spoja-10/task-manager/blob/main/client/src/components/FilterBar.jsx"
click node_navbar "https://github.com/spoja-10/task-manager/blob/main/client/src/components/Navbar.jsx"
click node_themestate "https://github.com/spoja-10/task-manager/blob/main/client/src/context/ThemeContext.jsx"
click node_guestprompt "https://github.com/spoja-10/task-manager/blob/main/client/src/components/SignInPromptModal.jsx"
click node_authroutes "https://github.com/spoja-10/task-manager/blob/main/server/routes/authRoutes.js"
click node_taskroutes "https://github.com/spoja-10/task-manager/blob/main/server/routes/taskRoutes.js"
click node_authmiddleware "https://github.com/spoja-10/task-manager/blob/main/server/middleware/auth.js"
click node_authcontroller "https://github.com/spoja-10/task-manager/blob/main/server/controllers/authController.js"
click node_taskcontroller "https://github.com/spoja-10/task-manager/blob/main/server/controllers/taskController.js"
click node_userdb "https://github.com/spoja-10/task-manager/blob/main/server/models/User.js"
click node_taskdb "https://github.com/spoja-10/task-manager/blob/main/server/models/Task.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_app,node_landing,node_dashboard,node_authpage,node_authstate,node_taskstate,node_api,node_kanban,node_taskcard,node_taskmodal,node_listview,node_filters,node_navbar,node_themestate,node_guestprompt toneBlue
class node_authroutes,node_taskroutes,node_authmiddleware,node_authcontroller,node_taskcontroller,node_mongod,node_browserstorage toneAmber
class node_userdb,node_taskdb toneMint
class node_user toneRose
class node_google toneIndigo
```

## Components

### Client experience

- [Route shell](https://github.com/spoja-10/task-manager/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Landing page](https://github.com/spoja-10/task-manager/blob/main/client/src/pages/LandingPage.jsx): `client/src/pages/LandingPage.jsx`
- [Task dashboard](https://github.com/spoja-10/task-manager/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Authentication UI](https://github.com/spoja-10/task-manager/blob/main/client/src/pages/AuthPage.jsx): `client/src/pages/AuthPage.jsx`
- [Auth state](https://github.com/spoja-10/task-manager/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Task state](https://github.com/spoja-10/task-manager/blob/main/client/src/context/TaskContext.jsx): `client/src/context/TaskContext.jsx`
- [HTTP client](https://github.com/spoja-10/task-manager/blob/main/client/src/api/axios.js): `client/src/api/axios.js`
- [Kanban board](https://github.com/spoja-10/task-manager/blob/main/client/src/components/KanbanBoard.jsx): `client/src/components/KanbanBoard.jsx`
- [Task card](https://github.com/spoja-10/task-manager/blob/main/client/src/components/TaskCard.jsx): `client/src/components/TaskCard.jsx`
- [Task editor](https://github.com/spoja-10/task-manager/blob/main/client/src/components/TaskModal.jsx): `client/src/components/TaskModal.jsx`
- [List view](https://github.com/spoja-10/task-manager/blob/main/client/src/components/ListView.jsx): `client/src/components/ListView.jsx`
- [Task filters](https://github.com/spoja-10/task-manager/blob/main/client/src/components/FilterBar.jsx): `client/src/components/FilterBar.jsx`
- [Navigation and theme UI](https://github.com/spoja-10/task-manager/blob/main/client/src/components/Navbar.jsx): `client/src/components/Navbar.jsx`
- [Theme state](https://github.com/spoja-10/task-manager/blob/main/client/src/context/ThemeContext.jsx): `client/src/context/ThemeContext.jsx`
- [Guest sign-in prompts](https://github.com/spoja-10/task-manager/blob/main/client/src/components/SignInPromptModal.jsx): `client/src/components/SignInPromptModal.jsx`

### API and domain

- [Auth routes](https://github.com/spoja-10/task-manager/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Task routes](https://github.com/spoja-10/task-manager/blob/main/server/routes/taskRoutes.js): `server/routes/taskRoutes.js`
- [Token protection](https://github.com/spoja-10/task-manager/blob/main/server/middleware/auth.js): `server/middleware/auth.js`
- [Auth operations](https://github.com/spoja-10/task-manager/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Task operations](https://github.com/spoja-10/task-manager/blob/main/server/controllers/taskController.js): `server/controllers/taskController.js`

### Persistence

- [User records](https://github.com/spoja-10/task-manager/blob/main/server/models/User.js): `server/models/User.js`
- [Task records](https://github.com/spoja-10/task-manager/blob/main/server/models/Task.js): `server/models/Task.js`

### Other components

- **TaskFlow user**
- **MongoDB**
- **Google identity**
- **Browser localStorage**

## Connections

- TaskFlow user → Route shell: opens app (evidence: `client/src/App.jsx`)
- Route shell → Landing page: routes to (evidence: `client/src/App.jsx`)
- Route shell → Task dashboard: routes to (evidence: `client/src/App.jsx`)
- Route shell → Authentication UI: routes to (evidence: `client/src/App.jsx`)
- Task dashboard → Task state: uses tasks (evidence: `client/src/pages/Dashboard.jsx`)
- Task dashboard → Kanban board: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Task dashboard → Task editor: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Task dashboard → Guest sign-in prompts: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Kanban board → Task card: renders (evidence: `client/src/components/KanbanBoard.jsx`)
- List view → Task card: renders (evidence: `client/src/components/ListView.jsx`)
- List view → Task editor: opens editor (evidence: `client/src/components/ListView.jsx`)
- Task card → Task state: updates tasks (evidence: `client/src/components/TaskCard.jsx`)
- Task editor → Task state: creates or updates (evidence: `client/src/components/TaskModal.jsx`)
- Task dashboard → Task filters: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Task dashboard → List view: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Task filters → Task state: filters tasks
- Authentication UI → Auth state: authenticates (evidence: `client/src/pages/AuthPage.jsx`)
- Navigation and theme UI → Auth state: uses auth (evidence: `client/src/components/Navbar.jsx`)
- Navigation and theme UI → Theme state: toggles theme (evidence: `client/src/components/Navbar.jsx`)
- Route shell → Theme state: provides theme (evidence: `client/src/App.jsx`)
- Auth state → HTTP client: sends auth requests (evidence: `client/src/context/AuthContext.jsx`)
- Task state → Auth state: checks guest mode (evidence: `client/src/context/TaskContext.jsx`)
- Task state → HTTP client: sends task requests (evidence: `client/src/context/TaskContext.jsx`)
- Task state → Browser localStorage: reads and writes guest tasks (evidence: `client/src/context/TaskContext.jsx`)
- Auth state → Browser localStorage: stores token (evidence: `client/src/context/AuthContext.jsx`)
- HTTP client → Auth routes: calls auth API
- HTTP client → Task routes: calls task API
- Auth routes → Auth operations: dispatches (evidence: `server/routes/authRoutes.js`)
- Auth routes → Token protection: protects profile route (evidence: `server/routes/authRoutes.js`)
- Task routes → Token protection: protects routes (evidence: `server/routes/taskRoutes.js`)
- Task routes → Task operations: dispatches (evidence: `server/routes/taskRoutes.js`)
- Token protection → User records: loads user (evidence: `server/middleware/auth.js`)
- Auth operations → User records: reads and writes users (evidence: `server/controllers/authController.js`)
- Auth operations → Google identity: verifies credential (evidence: `server/controllers/authController.js`)
- Task operations → Task records: reads and writes tasks (evidence: `server/controllers/taskController.js`)
- User records → MongoDB: persists records
- Task records → MongoDB: persists records
