# cjtarre/takda-act2-copy architecture

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

- Interactive diagram: https://gitdiagram.com/cjtarre/takda-act2-copy
- Repository: https://github.com/cjtarre/takda-act2-copy

## Overview

Takda is a student task-management web app. Users register or sign in, enter a protected workspace, and manage tasks through create, update, completion, deletion/restoration, search, filtering, sorting, pagination, and calendar views. The frontend keeps task and authentication state, sends requests to Express, and the backend verifies identity and scopes operations before using Supabase for account and persistent data. Profile management, notifications, themes, and responsive navigation are additional product branches. Some frontend-to-API wiring and unsampled feature internals are shown only by the README or source-index references.

Main entry points: [`frontend/src/routes/AppRoutes.jsx`](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/routes/AppRoutes.jsx) (App routes), [`frontend/src/features/tasks/context/TaskContext.jsx`](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/context/TaskContext.jsx) (Task state), [`backend/config/supabaseAdmin.js`](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/config/supabaseAdmin.js) (Admin client), [`frontend/src/App.jsx`](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/App.jsx) (React app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend shell"]
  node_app["React app<br/>[App.jsx]"]
  node_routes["App routes<br/>[AppRoutes.jsx]"]
  node_layout["Main layout<br/>[MainLayout.jsx]"]
  node_theme["Theme state<br/>[ThemeContext.jsx]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_tasks["Task workspace"]
  node_dashboard["Task dashboard<br/>[Dashboard.jsx]"]
  node_taskcontext["Task state<br/>[TaskContext.jsx]"]
  node_taskops["Task operations<br/>[useTasks.js]"]
  node_calendar["Calendar view<br/>[Calendar.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
  node_taskservice["Task service<br/>[taskService.js]"]
  node_tagservice["Tag service<br/>[tagService.js]"]
end

subgraph group_accounts["Accounts"]
  node_profile["Profile page<br/>[Profile.jsx]"]
  node_authpages["Login and signup<br/>[Login.jsx]"]
  node_authcontext["Authentication state<br/>[AuthContext.jsx]"]
  node_authservice["Auth service<br/>[authService.js]"]
end

subgraph group_server["API server"]
  node_express["Express app<br/>[app.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_taskroutes["Task routes<br/>[taskRoutes.js]"]
  node_authcontroller["Auth controller<br/>[authController.js]"]
  node_taskcontroller["Task controller<br/>[taskController.js]"]
  node_tagcontroller["Tag controller<br/>[tagController.js]"]
  node_usercontroller["User controller<br/>[userController.js]"]
end

subgraph group_supabase["Supabase services"]
  node_adminclient["Admin client<br/>[supabaseAdmin.js]"]
  node_userclient["User-scoped client<br/>[supabaseClient.js]"]
  node_supabase["Supabase"]
  node_postgres[("PostgreSQL data")]
  node_supaauth["Supabase Auth"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_routes
node_app -->|"provides auth"| node_authcontext
node_app -->|"provides theme"| node_theme
node_routes -->|"routes through"| node_layout
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_calendar
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_notifications
node_dashboard -->|"reads state"| node_taskcontext
node_dashboard -->|"uses operations"| node_taskops
node_calendar -->|"reads tasks"| node_taskcontext
node_notifications -->|"reads tasks"| node_taskcontext
node_taskcontext -->|"loads tasks"| node_taskservice
node_taskcontext -->|"loads tags"| node_tagservice
node_taskops -->|"calls CRUD"| node_taskservice
node_authpages -->|"uses auth"| node_authcontext
node_profile -->|"uses auth"| node_authcontext
node_authcontext -->|"calls"| node_authservice
node_taskservice -->|"sends requests"| node_api
node_tagservice -.->|"sends requests"| node_api
node_authservice -->|"sends requests"| node_api
node_api -->|"HTTP API"| node_express
node_express -->|"mounts routes"| node_authroutes
node_express -->|"mounts routes"| node_taskroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_taskroutes -->|"dispatches"| node_taskcontroller
node_authcontroller -->|"auth operations"| node_userclient
node_authcontroller -->|"profile lookup"| node_adminclient
node_taskcontroller -->|"reads and writes"| node_adminclient
node_tagcontroller -->|"uses client"| node_adminclient
node_usercontroller -->|"updates profile"| node_adminclient
node_usercontroller -->|"account changes"| node_userclient
node_adminclient -->|"connects"| node_supabase
node_userclient -->|"connects"| node_supabase
node_supabase -->|"persists data"| node_postgres
node_supabase -->|"manages identity"| node_supaauth

click node_app "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/App.jsx"
click node_routes "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/routes/AppRoutes.jsx"
click node_layout "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/layouts/MainLayout.jsx"
click node_theme "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/shared/context/ThemeContext.jsx"
click node_dashboard "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/pages/Dashboard.jsx"
click node_taskcontext "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/context/TaskContext.jsx"
click node_taskops "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/hooks/useTasks.js"
click node_calendar "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/calendar/pages/Calendar.jsx"
click node_notifications "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/notifications/pages/Notifications.jsx"
click node_profile "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/profile/pages/Profile.jsx"
click node_authpages "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/auth/pages/Login.jsx"
click node_authcontext "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/auth/context/AuthContext.jsx"
click node_authservice "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/auth/services/authService.js"
click node_taskservice "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/services/taskService.js"
click node_tagservice "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/services/tagService.js"
click node_api "https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/shared/services/api.js"
click node_express "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/app.js"
click node_authroutes "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/routes/authRoutes.js"
click node_taskroutes "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/routes/taskRoutes.js"
click node_authcontroller "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/authController.js"
click node_taskcontroller "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/taskController.js"
click node_tagcontroller "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/tagController.js"
click node_usercontroller "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/userController.js"
click node_adminclient "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/config/supabaseAdmin.js"
click node_userclient "https://github.com/cjtarre/takda-act2-copy/blob/main/backend/config/supabaseClient.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_routes,node_layout,node_theme,node_api,node_user toneBlue
class node_dashboard,node_taskcontext,node_taskops,node_calendar,node_notifications,node_taskservice,node_tagservice toneAmber
class node_profile,node_authpages,node_authcontext,node_authservice toneMint
class node_express,node_authroutes,node_taskroutes,node_authcontroller,node_taskcontroller,node_tagcontroller,node_usercontroller toneRose
class node_adminclient,node_userclient,node_supabase,node_postgres,node_supaauth toneIndigo
```

## Components

### Frontend shell

- [React app](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [App routes](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/routes/AppRoutes.jsx): `frontend/src/routes/AppRoutes.jsx`
- [Main layout](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/layouts/MainLayout.jsx): `frontend/src/layouts/MainLayout.jsx`
- [Theme state](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/shared/context/ThemeContext.jsx): `frontend/src/shared/context/ThemeContext.jsx`
- [HTTP client](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/shared/services/api.js): `frontend/src/shared/services/api.js`

### Task workspace

- [Task dashboard](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/pages/Dashboard.jsx): `frontend/src/features/tasks/pages/Dashboard.jsx`
- [Task state](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/context/TaskContext.jsx): `frontend/src/features/tasks/context/TaskContext.jsx`
- [Task operations](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/hooks/useTasks.js): `frontend/src/features/tasks/hooks/useTasks.js`
- [Calendar view](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/calendar/pages/Calendar.jsx): `frontend/src/features/calendar/pages/Calendar.jsx`
- [Notifications](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/notifications/pages/Notifications.jsx): `frontend/src/features/notifications/pages/Notifications.jsx`
- [Task service](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/services/taskService.js): `frontend/src/features/tasks/services/taskService.js`
- [Tag service](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/tasks/services/tagService.js): `frontend/src/features/tasks/services/tagService.js`

### Accounts

- [Profile page](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/profile/pages/Profile.jsx): `frontend/src/features/profile/pages/Profile.jsx`
- [Login and signup](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/auth/pages/Login.jsx): `frontend/src/features/auth/pages/Login.jsx`
- [Authentication state](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/auth/context/AuthContext.jsx): `frontend/src/features/auth/context/AuthContext.jsx`
- [Auth service](https://github.com/cjtarre/takda-act2-copy/blob/main/frontend/src/features/auth/services/authService.js): `frontend/src/features/auth/services/authService.js`

### API server

- [Express app](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/app.js): `backend/app.js`
- [Auth routes](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Task routes](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/routes/taskRoutes.js): `backend/routes/taskRoutes.js`
- [Auth controller](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Task controller](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/taskController.js): `backend/controllers/taskController.js`
- [Tag controller](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/tagController.js): `backend/controllers/tagController.js`
- [User controller](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/controllers/userController.js): `backend/controllers/userController.js`

### Supabase services

- [Admin client](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/config/supabaseAdmin.js): `backend/config/supabaseAdmin.js`
- [User-scoped client](https://github.com/cjtarre/takda-act2-copy/blob/main/backend/config/supabaseClient.js): `backend/config/supabaseClient.js`
- **Supabase**
- **PostgreSQL data**
- **Supabase Auth**

### Other components

- **User**

## Connections

- User → React app: uses (evidence: `README.md`)
- React app → App routes: renders (evidence: `frontend/src/App.jsx`)
- React app → Authentication state: provides auth (evidence: `frontend/src/App.jsx`)
- React app → Theme state: provides theme (evidence: `frontend/src/App.jsx`)
- App routes → Main layout: routes through (evidence: `frontend/src/routes/AppRoutes.jsx`)
- App routes → Task dashboard: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- App routes → Calendar view: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- App routes → Profile page: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- App routes → Notifications: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Task dashboard → Task state: reads state (evidence: `frontend/src/features/tasks/pages/Dashboard.jsx`)
- Task dashboard → Task operations: uses operations (evidence: `frontend/src/features/tasks/pages/Dashboard.jsx`)
- Calendar view → Task state: reads tasks (evidence: `frontend/src/features/calendar/pages/Calendar.jsx`)
- Notifications → Task state: reads tasks (evidence: `frontend/src/features/notifications/pages/Notifications.jsx`)
- Task state → Task service: loads tasks (evidence: `frontend/src/features/tasks/context/TaskContext.jsx`)
- Task state → Tag service: loads tags (evidence: `frontend/src/features/tasks/context/TaskContext.jsx`)
- Task operations → Task service: calls CRUD (evidence: `frontend/src/features/tasks/hooks/useTasks.js`)
- Login and signup → Authentication state: uses auth (evidence: `frontend/src/features/auth/pages/Login.jsx`)
- Profile page → Authentication state: uses auth (evidence: `frontend/src/features/profile/pages/Profile.jsx`)
- Authentication state → Auth service: calls (evidence: `frontend/src/features/auth/context/AuthContext.jsx`)
- Task service → HTTP client: sends requests (evidence: `frontend/src/features/tasks/services/taskService.js`)
- Tag service → HTTP client: sends requests (evidence: `README.md`)
- Auth service → HTTP client: sends requests (evidence: `frontend/src/features/auth/services/authService.js`)
- HTTP client → Express app: HTTP API (evidence: `README.md`)
- Express app → Auth routes: mounts routes (evidence: `backend/app.js`)
- Express app → Task routes: mounts routes (evidence: `backend/app.js`)
- Auth routes → Auth controller: dispatches (evidence: `backend/routes/authRoutes.js`)
- Task routes → Task controller: dispatches (evidence: `backend/routes/taskRoutes.js`)
- Auth controller → User-scoped client: auth operations (evidence: `backend/controllers/authController.js`)
- Auth controller → Admin client: profile lookup (evidence: `backend/controllers/authController.js`)
- Task controller → Admin client: reads and writes (evidence: `backend/controllers/taskController.js`)
- Tag controller → Admin client: uses client (evidence: `backend/controllers/tagController.js`)
- User controller → Admin client: updates profile (evidence: `backend/controllers/userController.js`)
- User controller → User-scoped client: account changes (evidence: `backend/controllers/userController.js`)
- Admin client → Supabase: connects (evidence: `README.md`)
- User-scoped client → Supabase: connects (evidence: `README.md`)
- Supabase → PostgreSQL data: persists data (evidence: `README.md`)
- Supabase → Supabase Auth: manages identity (evidence: `README.md`)
