# abhinavsaxena2308/taskflow architecture

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

- Interactive diagram: https://gitdiagram.com/abhinavsaxena2308/taskflow
- Repository: https://github.com/abhinavsaxena2308/taskflow

## Overview

1. **Overall shape**
   - TaskFlow is a client-side React 19 single-page app built with Vite.
   - The front end owns almost all interaction logic; Supabase provides authentication, persistence, and real-time backend services.

2. **Application shell and bootstrap**
   - `src/main.jsx` is the entry point that mounts the app and global providers.
   - Global styling comes from `src/index.css`, `src/styles/globals.css`, Tailwind, and component-level CSS such as `src/App.css`.

3. **Route-level architecture**
   - The app is organized around pages in `src/pages`: `LandingPage`, `Login`, `Signup`, `Dashboard`, and `Documentation`.
   - Legal pages are separate components under `src/components/legal`, suggesting dedicated routes for privacy and terms.
   - `ProtectedRoute.jsx` acts as the main boundary between public pages and authenticated task management screens.

4. **Authentication boundary**
   - `src/contexts/AuthContext.jsx` centralizes Supabase session state and exposes login/logout behavior to the UI.
   - `src/lib/supabaseClient.js` is the single integration point for Supabase credentials and API access.
   - The auth flow is: public signup/login → session creation in Supabase Auth → protected access to dashboard/task features.

5. **Task management subsystem**
   - The dashboard task experience is decomposed into focused components under `src/components/tasks`.
   - `TaskList`, `TaskCard`, `TaskModal`, `AddTask`, `QuickAddTask`, `FilterPanel`, `SortPanel`, and `SubTaskList` together implement CRUD, filtering, sorting, and nested subtasks.
   - The README’s priority, due-date, progress, and status features map directly to this subsystem.

6. **Data flow for tasks**
   - Task data likely comes from Supabase tables and is rendered into the dashboard, then updated through task forms/modals.
   - `src/utils/taskUtils.js` and `src/utils/filterUtils.js` provide the non-UI transformation layer for filtering, sorting, and computed task state.
   - `src/data/dummyTasks.js` serves as local sample data, likely for development or empty-state/demo behavior.

7. **Real-time and backend schema**
   - The project uses Supabase real-time features, so task state is expected to update across sessions without manual refresh.
   - `schema.sql` and the migration files under `supabase/migrations` define the database shape and access rules.
   - The presence of RLS policies and later migrations for `priority` and `progress` shows the backend schema is an explicit part of the architecture, not an incidental detail.

8. **Global UI and shared components**
   - `src/components/ui` contains the reusable design system: buttons, inputs, cards, badges, modal, progress, spinner, skeletons, empty states, and error boundary.
   - Toast handling is isolated under `src/components/ui/toast`, giving the app a consistent notification channel.
   - `src/components/layout` contains the navigation shell and page framing used across authenticated and public views.

9. **Theme, responsiveness, and interaction utilities**
   - `ThemeContext.jsx`, `SharedThemeContext.jsx`, and `ThemeToggle.jsx` implement the dark/light theme boundary.
   - `useKeyboardShortcuts.js` adds app-wide keyboard actions such as quick task creation and tab switching.
   - Tailwind and the shared layout components drive the responsive behavior described in the README.

10. **Operational and deployment boundary**
   - `vercel.json` indicates deployment to static hosting with routing handled at the edge.
   - `vite.config.js`, `tailwind.config.js`, and `postcss.config.js` define the build pipeline, styling compilation, and production asset generation.
   - `public/screenshots` is documentation-only content used to present the app, not part of runtime behavior.

11. **How the main user flow works**
   - A user lands on the public marketing page, signs up or logs in, then enters the protected dashboard.
   - On the dashboard, the user creates or edits tasks, applies filters/sorts, and tracks subtasks/progress.
   - State changes are persisted through Supabase and reflected back into the UI, with theme, toast, and keyboard shortcuts acting as cross-cutting services.

12. **Key diagram boundaries to show**
   - Public vs authenticated routes.
   - UI shell vs task domain components.
   - Front-end state/contexts vs Supabase auth/database.
   - Local transformation utilities vs persisted task records.
   - Shared UI primitives vs feature-specific task screens.

Main entry points: [`src/App.jsx`](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/App.jsx) (App shell), [`src/components/tasks/TaskList.jsx`](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskList.jsx) (Task list), [`src/pages/Dashboard.jsx`](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Dashboard.jsx) (Dashboard), [`src/lib/supabaseClient.js`](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/lib/supabaseClient.js) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g1["App shell"]
  node_n1["Main entry<br/>bootstrap<br/>[main.jsx]"]
  node_n2["App shell<br/>router shell<br/>[App.jsx]"]
  node_n3["Landing page<br/>public page<br/>[LandingPage.jsx]"]
  node_n4["Login<br/>auth page<br/>[Login.jsx]"]
  node_n5["Signup<br/>auth page<br/>[Signup.jsx]"]
  node_n6["Dashboard<br/>protected page<br/>[Dashboard.jsx]"]
  node_n7["Docs<br/>content page<br/>[Documentation.jsx]"]
  node_n8["Protected route<br/>auth gate<br/>[ProtectedRoute.jsx]"]
end

subgraph group_g2["Auth and backend"]
  node_n9["Auth context<br/>session state<br/>[AuthContext.jsx]"]
  node_n10["Supabase client<br/>backend adapter<br/>[supabaseClient.js]"]
  node_n11[("Schema<br/>[schema.sql]")]
  node_n12["Migrations"]
end

subgraph group_g3["Task workspace"]
  node_n13["Task list<br/>collection view<br/>[TaskList.jsx]"]
  node_n14["Task card<br/>task item<br/>[TaskCard.jsx]"]
  node_n15["Task modal<br/>task editor<br/>[TaskModal.jsx]"]
  node_n16["Task controls<br/>[AddTask.jsx]"]
  node_n17["Subtasks<br/>nested tasks<br/>[SubTaskList.jsx]"]
  node_n18["Task utils<br/>transform utils<br/>[taskUtils.js]"]
  node_n19["Filter utils<br/>query utils<br/>[filterUtils.js]"]
  node_n20["Dummy tasks<br/>sample data<br/>[dummyTasks.js]"]
end

subgraph group_g4["Shared UI"]
  node_n21["Layout<br/>[Layout.jsx]"]
  node_n22["Navbar<br/>navigation<br/>[Navbar.jsx]"]
  node_n23["UI library<br/>design system<br/>[index.js]"]
  node_n24["Toast provider<br/>notification layer<br/>[ToastProvider.jsx]"]
  node_n25["Theme context<br/>theme state<br/>[ThemeContext.jsx]"]
  node_n26["Keyboard shortcuts<br/>interaction hook"]
end

node_n1 -->|"boots"| node_n2
node_n2 -->|"routes to"| node_n3
node_n2 -->|"routes to"| node_n4
node_n2 -->|"routes to"| node_n5
node_n2 -->|"routes to"| node_n6
node_n2 -->|"routes to"| node_n7
node_n6 -->|"guards"| node_n8
node_n8 -->|"reads session"| node_n9
node_n9 -->|"uses"| node_n10
node_n10 -->|"persists to"| node_n11
node_n10 -->|"applies"| node_n12
node_n6 -->|"renders"| node_n13
node_n13 -->|"lists"| node_n14
node_n13 -->|"edits via"| node_n15
node_n13 -->|"controls"| node_n16
node_n14 -->|"contains"| node_n17
node_n13 -->|"derives from"| node_n18
node_n13 -->|"filters with"| node_n19
node_n13 -->|"falls back to"| node_n20
node_n2 -->|"uses"| node_n21
node_n21 -->|"includes"| node_n22
node_n2 -->|"builds from"| node_n23
node_n2 -->|"notifies via"| node_n24
node_n2 -->|"themes with"| node_n25
node_n2 -->|"enhanced by"| node_n26

click node_n1 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/main.jsx"
click node_n2 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/App.jsx"
click node_n3 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/LandingPage.jsx"
click node_n4 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Login.jsx"
click node_n5 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Signup.jsx"
click node_n6 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Dashboard.jsx"
click node_n7 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Documentation.jsx"
click node_n8 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/ProtectedRoute.jsx"
click node_n9 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/contexts/AuthContext.jsx"
click node_n10 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/lib/supabaseClient.js"
click node_n11 "https://github.com/abhinavsaxena2308/taskflow/blob/main/schema.sql"
click node_n12 "https://github.com/abhinavsaxena2308/taskflow/tree/main/supabase/migrations"
click node_n13 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskList.jsx"
click node_n14 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskCard.jsx"
click node_n15 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskModal.jsx"
click node_n16 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/AddTask.jsx"
click node_n17 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/SubTaskList.jsx"
click node_n18 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/utils/taskUtils.js"
click node_n19 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/utils/filterUtils.js"
click node_n20 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/data/dummyTasks.js"
click node_n21 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/layout/Layout.jsx"
click node_n22 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/layout/Navbar.jsx"
click node_n23 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/ui/index.js"
click node_n24 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/ui/toast/ToastProvider.jsx"
click node_n25 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/contexts/ThemeContext.jsx"
click node_n26 "https://github.com/abhinavsaxena2308/taskflow/blob/main/src/hooks/useKeyboardShortcuts.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_n1,node_n2,node_n3,node_n4,node_n5,node_n6,node_n7,node_n8 toneBlue
class node_n9,node_n10,node_n11,node_n12 toneAmber
class node_n13,node_n14,node_n15,node_n16,node_n17,node_n18,node_n19,node_n20 toneMint
class node_n21,node_n22,node_n23,node_n24,node_n25,node_n26 toneRose
```

## Components

### App shell

Entry point, routes, and page-level composition.

- [Main entry](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/main.jsx): bootstrap · Mounts the React app and global providers. · `src/main.jsx`
- [App shell](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/App.jsx): router shell · Top-level app composition and route wiring. · `src/App.jsx`
- [Landing page](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/LandingPage.jsx): public page · Marketing and first-contact entry screen. · `src/pages/LandingPage.jsx`
- [Login](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Login.jsx): auth page · Sign-in screen for existing users. · `src/pages/Login.jsx`
- [Signup](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Signup.jsx): auth page · Account creation screen for new users. · `src/pages/Signup.jsx`
- [Dashboard](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Dashboard.jsx): protected page · Authenticated task workspace entry point. · `src/pages/Dashboard.jsx`
- [Docs](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/pages/Documentation.jsx): content page · Product and usage documentation page. · `src/pages/Documentation.jsx`
- [Protected route](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/ProtectedRoute.jsx): auth gate · Boundary that blocks unauthenticated dashboard access. · `src/components/ProtectedRoute.jsx`

### Auth and backend

Session state and Supabase integration.

- [Auth context](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/contexts/AuthContext.jsx): session state · Centralizes Supabase session state and auth actions. · `src/contexts/AuthContext.jsx`
- [Supabase client](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/lib/supabaseClient.js): backend adapter · Single integration point for auth and database access. · `src/lib/supabaseClient.js`
- [Schema](https://github.com/abhinavsaxena2308/taskflow/blob/main/schema.sql): database schema · Defines tables, constraints, and access rules. · `schema.sql`
- [Migrations](https://github.com/abhinavsaxena2308/taskflow/tree/main/supabase/migrations): db migrations · Evolution of RLS and task fields such as priority and progress. · `supabase/migrations`

### Task workspace

Dashboard task management and local task transforms.

- [Task list](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskList.jsx): collection view · Renders the dashboard task collection. · `src/components/tasks/TaskList.jsx`
- [Task card](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskCard.jsx): task item · Displays a single task and its state. · `src/components/tasks/TaskCard.jsx`
- [Task modal](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/TaskModal.jsx): task editor · Create and edit task details in a modal flow. · `src/components/tasks/TaskModal.jsx`
- [Task controls](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/AddTask.jsx): task controls · Quick add, add form, filters, and sorting controls. · `src/components/tasks/AddTask.jsx`
- [Subtasks](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/tasks/SubTaskList.jsx): nested tasks · Handles subtask lists and completion structure. · `src/components/tasks/SubTaskList.jsx`
- [Task utils](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/utils/taskUtils.js): transform utils · Computes task-derived state and presentation values. · `src/utils/taskUtils.js`
- [Filter utils](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/utils/filterUtils.js): query utils · Implements filtering and sorting helpers. · `src/utils/filterUtils.js`
- [Dummy tasks](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/data/dummyTasks.js): sample data · Local fallback or demo task dataset. · `src/data/dummyTasks.js`

### Shared UI

Reusable layout, design system, and cross-cutting client services.

- [Layout](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/layout/Layout.jsx): shell layout · Shared page framing and navigation wrapper. · `src/components/layout/Layout.jsx`
- [Navbar](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/layout/Navbar.jsx): navigation · Primary navigation for public and authenticated views. · `src/components/layout/Navbar.jsx`
- [UI library](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/ui/index.js): design system · Reusable buttons, inputs, cards, modals, feedback, and empty states. · `src/components/ui/index.js`
- [Toast provider](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/components/ui/toast/ToastProvider.jsx): notification layer · App-wide toast state and delivery channel. · `src/components/ui/toast/ToastProvider.jsx`
- [Theme context](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/contexts/ThemeContext.jsx): theme state · Manages light/dark theme state and persistence. · `src/contexts/ThemeContext.jsx`
- [Keyboard shortcuts](https://github.com/abhinavsaxena2308/taskflow/blob/main/src/hooks/useKeyboardShortcuts.js): interaction hook · Global shortcuts for quick actions and navigation. · `src/hooks/useKeyboardShortcuts.js`

## Connections

- Main entry → App shell: boots · Entry point mounts the app shell.
- App shell → Landing page: routes to · Public landing route.
- App shell → Login: routes to · Login route.
- App shell → Signup: routes to · Signup route.
- App shell → Dashboard: routes to · Dashboard route.
- App shell → Docs: routes to · Documentation route.
- Dashboard → Protected route: guards · Dashboard access passes through the protected boundary.
- Protected route → Auth context: reads session · Protected access depends on auth state.
- Auth context → Supabase client: uses · Auth context delegates to Supabase client.
- Supabase client → Schema: persists to · Client operates against the defined backend schema.
- Supabase client → Migrations: applies · Migration history shapes backend behavior.
- Dashboard → Task list: renders · Dashboard centers the task collection view.
- Task list → Task card: lists · Task list is composed of task cards.
- Task list → Task modal: edits via · Create and update flow opens the task modal.
- Task list → Task controls: controls · List is driven by add, filter, and sort controls.
- Task card → Subtasks: contains · Task cards can surface nested subtasks.
- Task list → Task utils: derives from · Display state is computed from task utilities.
- Task list → Filter utils: filters with · Filtering and sorting logic is externalized.
- Task list → Dummy tasks: falls back to · Sample data supports local/demo task views.
- App shell → Layout: uses · Routes share a common layout shell.
- Layout → Navbar: includes · Layout frames navigation.
- App shell → UI library: builds from · App screens use shared UI primitives.
- App shell → Toast provider: notifies via · Global toast channel is available across the app.
- App shell → Theme context: themes with · Theme state affects the whole app.
- App shell → Keyboard shortcuts: enhanced by · Keyboard shortcuts extend app-wide interaction.
