# kanchamramakrishna/taskmanager architecture

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

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

## Overview

TaskManager is a full-stack task manager with account authentication, task CRUD, and optional Google Calendar integration. A user signs in or registers in the React app, then manages tasks through the Express API; authenticated task operations persist in MongoDB and can synchronize linked events with Google Calendar. The app also displays calendar events fetched from Google. The graph reflects shown calls and README capabilities; some UI and route details are unsampled, so those connections are left out rather than inferred.

Main entry points: [`backend/server.js`](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/server.js) (Express API and task handlers), [`backend/routes/auth.js`](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/routes/auth.js) (Account and OAuth routes), [`backend/routes/calendar.js`](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/routes/calendar.js) (Calendar event routes), [`backend/utils/googleCalendar.js`](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/utils/googleCalendar.js) (Calendar task sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Task dashboard<br/>[App.jsx]"]
  node_api_config["API configuration<br/>[config.js]"]
end

subgraph group_api["API and identity"]
  node_server["Express API and task handlers<br/>[server.js]"]
  node_auth_routes["Account and OAuth routes<br/>[auth.js]"]
  node_auth_middleware["JWT authentication<br/>[auth.js]"]
end

subgraph group_data["Persistent data"]
  node_user_model[("User records<br/>[User.js]")]
  node_task_model[("Task records<br/>[Task.js]")]
  node_mongodb[("MongoDB")]
end

subgraph group_calendar["Calendar integration"]
  node_calendar_routes["Calendar event routes<br/>[calendar.js]"]
  node_calendar_service["Calendar task sync<br/>[googleCalendar.js]"]
  node_google["Google Calendar and OAuth"]
end

node_user(("Task manager user"))

node_user -->|"uses"| node_app
node_app -->|"reads endpoint"| node_api_config
node_app -->|"requests tasks and events"| node_server
node_server -->|"mounts routes"| node_auth_routes
node_server -->|"mounts routes"| node_calendar_routes
node_server -->|"protects task routes"| node_auth_middleware
node_auth_routes -->|"protects disconnect"| node_auth_middleware
node_auth_routes -->|"reads and updates"| node_user_model
node_server -->|"loads users"| node_user_model
node_server -->|"reads and writes tasks"| node_task_model
node_server -->|"connects"| node_mongodb
node_auth_routes -->|"starts OAuth"| node_google
node_auth_routes -->|"exchanges OAuth code"| node_google
node_calendar_routes -->|"requires authentication"| node_auth_middleware
node_calendar_routes -->|"loads linked account"| node_user_model
node_calendar_routes -->|"lists and deletes events"| node_google
node_calendar_routes -->|"gets OAuth client"| node_calendar_service
node_server -->|"syncs task events"| node_calendar_service
node_calendar_service -->|"creates updates deletes"| node_google
node_calendar_service -->|"saves refreshed tokens"| node_user_model

click node_app "https://github.com/kanchamramakrishna/taskmanager/blob/main/frontend/src/App.jsx"
click node_api_config "https://github.com/kanchamramakrishna/taskmanager/blob/main/frontend/src/config.js"
click node_server "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/server.js"
click node_auth_routes "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/routes/auth.js"
click node_auth_middleware "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/middleware/auth.js"
click node_user_model "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/models/User.js"
click node_task_model "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/models/Task.js"
click node_calendar_routes "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/routes/calendar.js"
click node_calendar_service "https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/utils/googleCalendar.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_api_config toneBlue
class node_server,node_auth_routes,node_auth_middleware toneAmber
class node_user_model,node_task_model,node_mongodb toneMint
class node_calendar_routes,node_calendar_service,node_google,node_user toneRose
```

## Components

### Web application

- [Task dashboard](https://github.com/kanchamramakrishna/taskmanager/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API configuration](https://github.com/kanchamramakrishna/taskmanager/blob/main/frontend/src/config.js): `frontend/src/config.js`

### API and identity

- [Express API and task handlers](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/server.js): `backend/server.js`
- [Account and OAuth routes](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [JWT authentication](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`

### Persistent data

- [User records](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/models/User.js): `backend/models/User.js`
- [Task records](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/models/Task.js): `backend/models/Task.js`
- **MongoDB**

### Calendar integration

- [Calendar event routes](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/routes/calendar.js): `backend/routes/calendar.js`
- [Calendar task sync](https://github.com/kanchamramakrishna/taskmanager/blob/main/backend/utils/googleCalendar.js): `backend/utils/googleCalendar.js`
- **Google Calendar and OAuth**

### Other components

- **Task manager user**

## Connections

- Task manager user → Task dashboard: uses (evidence: `README.md`)
- Task dashboard → API configuration: reads endpoint (evidence: `frontend/src/App.jsx`)
- Task dashboard → Express API and task handlers: requests tasks and events (evidence: `frontend/src/App.jsx`)
- Express API and task handlers → Account and OAuth routes: mounts routes (evidence: `backend/server.js`)
- Express API and task handlers → Calendar event routes: mounts routes (evidence: `backend/server.js`)
- Express API and task handlers → JWT authentication: protects task routes (evidence: `backend/server.js`)
- Account and OAuth routes → JWT authentication: protects disconnect (evidence: `backend/routes/auth.js`)
- Account and OAuth routes → User records: reads and updates (evidence: `backend/routes/auth.js`)
- Express API and task handlers → User records: loads users (evidence: `backend/server.js`)
- Express API and task handlers → Task records: reads and writes tasks (evidence: `backend/server.js`)
- Express API and task handlers → MongoDB: connects (evidence: `backend/server.js`)
- Account and OAuth routes → Google Calendar and OAuth: starts OAuth (evidence: `backend/routes/auth.js`)
- Account and OAuth routes → Google Calendar and OAuth: exchanges OAuth code (evidence: `backend/routes/auth.js`)
- Calendar event routes → JWT authentication: requires authentication (evidence: `backend/routes/calendar.js`)
- Calendar event routes → User records: loads linked account (evidence: `backend/routes/calendar.js`)
- Calendar event routes → Google Calendar and OAuth: lists and deletes events (evidence: `backend/routes/calendar.js`)
- Calendar event routes → Calendar task sync: gets OAuth client (evidence: `backend/routes/calendar.js`)
- Express API and task handlers → Calendar task sync: syncs task events (evidence: `backend/server.js`)
- Calendar task sync → Google Calendar and OAuth: creates updates deletes (evidence: `backend/utils/googleCalendar.js`)
- Calendar task sync → User records: saves refreshed tokens (evidence: `backend/utils/googleCalendar.js`)
