# j3rryl/task-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/j3rryl/task-tracker
- Repository: https://github.com/j3rryl/task-tracker

## Overview

Task Tracker is a Next.js task-management application. Users reach task management to create, view, complete, and delete tasks; server actions persist changes, and the dashboard displays task counts. A separate chat workflow sends user messages to an AI action that can retrieve or add tasks. The shared layout provides navigation and application-wide UI. The README also describes faction selection, but no implementation for it appears in the supplied tree; source excerpts are incomplete, so uncertain connections are omitted.

Main entry points: [`components/TaskChat.tsx`](https://github.com/j3rryl/task-tracker/blob/main/components/TaskChat.tsx) (Chat Interface), [`app/tasks/TasksComponent.tsx`](https://github.com/j3rryl/task-tracker/blob/main/app/tasks/TasksComponent.tsx) (Task Controls), [`app/ai/actions.tsx`](https://github.com/j3rryl/task-tracker/blob/main/app/ai/actions.tsx) (AI Actions), [`app/tasks/TasksList.tsx`](https://github.com/j3rryl/task-tracker/blob/main/app/tasks/TasksList.tsx) (Task List)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_taskpage["Tasks Page<br/>[page.tsx]"]
  node_dashboard["Dashboard Page<br/>[page.tsx]"]
  node_skeleton["Dashboard Loading<br/>[TaskSkeleton.tsx]"]
  node_chatpage["Chat Page<br/>[page.tsx]"]
  node_layout["App Layout<br/>[layout.tsx]"]
  node_sidebar["Navigation Sidebar<br/>[sidebar.tsx]"]
  node_factions["Faction Selection<br/>[README.md]"]
end

subgraph group_tasks["Task Management"]
  node_taskui["Task Controls<br/>[TasksComponent.tsx]"]
  node_tasklist["Task List<br/>[TasksList.tsx]"]
  node_actions["Task Actions<br/>[actions.ts]"]
  node_stats["Task Statistics<br/>[TaskStatistics.tsx]"]
end

subgraph group_assistant["AI Assistant"]
  node_chat["Chat Interface<br/>[TaskChat.tsx]"]
  node_ai["AI Actions<br/>[actions.tsx]"]
end

subgraph group_data["Task Data"]
  node_db[("Database Client<br/>[db.ts]")]
  node_schema["Task Schema<br/>[schema.ts]"]
end

subgraph group_ui["UI Components"]
  node_cards["Card Components<br/>[card.tsx]"]
  node_buttons["Button Component<br/>[button.tsx]"]
  node_inputs["Input Component<br/>[input.tsx]"]
  node_dialog["Dialog Component<br/>[dialog.tsx]"]
  node_avatar["Avatar Component<br/>[avatar.tsx]"]
  node_scroll["Scroll Area<br/>[scroll-area.tsx]"]
  node_skeletonui["Skeleton Component<br/>[skeleton.tsx]"]
end

node_user(("User"))
node_openai{{"OpenAI Model"}}

node_user -->|"opens"| node_taskpage
node_taskpage -->|"renders"| node_taskui
node_taskui -->|"creates or deletes"| node_actions
node_taskui -->|"renders"| node_tasklist
node_taskpage -->|"loads tasks"| node_db
node_actions -->|"writes tasks"| node_db
node_actions -->|"uses table"| node_schema
node_tasklist -->|"updates or deletes"| node_actions
node_user -->|"opens"| node_dashboard
node_dashboard -->|"renders"| node_stats
node_dashboard -->|"renders fallback"| node_skeleton
node_stats -->|"queries counts"| node_db
node_stats -->|"queries table"| node_schema
node_user -->|"opens"| node_chatpage
node_chatpage -->|"renders"| node_chat
node_chat -->|"sends message"| node_ai
node_ai -->|"streams response"| node_openai
node_ai -->|"queries tasks"| node_db
node_ai -->|"queries table"| node_schema
node_ai -->|"creates task"| node_actions
node_ai -->|"renders results"| node_tasklist
node_layout -->|"renders navigation"| node_sidebar
node_taskui -->|"uses"| node_buttons
node_taskui -->|"uses"| node_inputs
node_taskui -->|"uses"| node_dialog
node_tasklist -->|"renders cards"| node_cards
node_tasklist -->|"uses"| node_buttons
node_stats -->|"renders cards"| node_cards
node_skeleton -->|"renders cards"| node_cards
node_skeleton -->|"renders placeholders"| node_skeletonui
node_chat -->|"renders avatars"| node_avatar
node_chat -->|"uses"| node_buttons
node_chat -->|"renders"| node_cards
node_chat -->|"uses"| node_inputs
node_chat -->|"renders messages"| node_scroll

click node_taskpage "https://github.com/j3rryl/task-tracker/blob/main/app/tasks/page.tsx"
click node_taskui "https://github.com/j3rryl/task-tracker/blob/main/app/tasks/TasksComponent.tsx"
click node_tasklist "https://github.com/j3rryl/task-tracker/blob/main/app/tasks/TasksList.tsx"
click node_actions "https://github.com/j3rryl/task-tracker/blob/main/app/actions.ts"
click node_dashboard "https://github.com/j3rryl/task-tracker/blob/main/app/dashboard/page.tsx"
click node_stats "https://github.com/j3rryl/task-tracker/blob/main/app/dashboard/TaskStatistics.tsx"
click node_skeleton "https://github.com/j3rryl/task-tracker/blob/main/app/dashboard/TaskSkeleton.tsx"
click node_chatpage "https://github.com/j3rryl/task-tracker/blob/main/app/chat/page.tsx"
click node_chat "https://github.com/j3rryl/task-tracker/blob/main/components/TaskChat.tsx"
click node_ai "https://github.com/j3rryl/task-tracker/blob/main/app/ai/actions.tsx"
click node_db "https://github.com/j3rryl/task-tracker/blob/main/db.ts"
click node_schema "https://github.com/j3rryl/task-tracker/blob/main/db/schema.ts"
click node_layout "https://github.com/j3rryl/task-tracker/blob/main/app/layout.tsx"
click node_sidebar "https://github.com/j3rryl/task-tracker/blob/main/components/layouts/sidebar.tsx"
click node_cards "https://github.com/j3rryl/task-tracker/blob/main/components/ui/card.tsx"
click node_buttons "https://github.com/j3rryl/task-tracker/blob/main/components/ui/button.tsx"
click node_inputs "https://github.com/j3rryl/task-tracker/blob/main/components/ui/input.tsx"
click node_dialog "https://github.com/j3rryl/task-tracker/blob/main/components/ui/dialog.tsx"
click node_avatar "https://github.com/j3rryl/task-tracker/blob/main/components/ui/avatar.tsx"
click node_scroll "https://github.com/j3rryl/task-tracker/blob/main/components/ui/scroll-area.tsx"
click node_skeletonui "https://github.com/j3rryl/task-tracker/blob/main/components/ui/skeleton.tsx"
click node_factions "https://github.com/j3rryl/task-tracker/blob/main/README.md"

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_taskpage,node_dashboard,node_skeleton,node_chatpage,node_layout,node_sidebar,node_factions,node_user toneBlue
class node_taskui,node_tasklist,node_actions,node_stats toneAmber
class node_chat,node_ai toneMint
class node_db,node_schema toneRose
class node_cards,node_buttons,node_inputs,node_dialog,node_avatar,node_scroll,node_skeletonui,node_openai toneIndigo
```

## Components

### Application UI

- [Tasks Page](https://github.com/j3rryl/task-tracker/blob/main/app/tasks/page.tsx): `app/tasks/page.tsx`
- [Dashboard Page](https://github.com/j3rryl/task-tracker/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Dashboard Loading](https://github.com/j3rryl/task-tracker/blob/main/app/dashboard/TaskSkeleton.tsx): `app/dashboard/TaskSkeleton.tsx`
- [Chat Page](https://github.com/j3rryl/task-tracker/blob/main/app/chat/page.tsx): `app/chat/page.tsx`
- [App Layout](https://github.com/j3rryl/task-tracker/blob/main/app/layout.tsx): `app/layout.tsx`
- [Navigation Sidebar](https://github.com/j3rryl/task-tracker/blob/main/components/layouts/sidebar.tsx): `components/layouts/sidebar.tsx`
- [Faction Selection](https://github.com/j3rryl/task-tracker/blob/main/README.md): `README.md`

### Task Management

- [Task Controls](https://github.com/j3rryl/task-tracker/blob/main/app/tasks/TasksComponent.tsx): `app/tasks/TasksComponent.tsx`
- [Task List](https://github.com/j3rryl/task-tracker/blob/main/app/tasks/TasksList.tsx): `app/tasks/TasksList.tsx`
- [Task Actions](https://github.com/j3rryl/task-tracker/blob/main/app/actions.ts): `app/actions.ts`
- [Task Statistics](https://github.com/j3rryl/task-tracker/blob/main/app/dashboard/TaskStatistics.tsx): `app/dashboard/TaskStatistics.tsx`

### AI Assistant

- [Chat Interface](https://github.com/j3rryl/task-tracker/blob/main/components/TaskChat.tsx): `components/TaskChat.tsx`
- [AI Actions](https://github.com/j3rryl/task-tracker/blob/main/app/ai/actions.tsx): `app/ai/actions.tsx`

### Task Data

- [Database Client](https://github.com/j3rryl/task-tracker/blob/main/db.ts): `db.ts`
- [Task Schema](https://github.com/j3rryl/task-tracker/blob/main/db/schema.ts): `db/schema.ts`

### UI Components

- [Card Components](https://github.com/j3rryl/task-tracker/blob/main/components/ui/card.tsx): `components/ui/card.tsx`
- [Button Component](https://github.com/j3rryl/task-tracker/blob/main/components/ui/button.tsx): `components/ui/button.tsx`
- [Input Component](https://github.com/j3rryl/task-tracker/blob/main/components/ui/input.tsx): `components/ui/input.tsx`
- [Dialog Component](https://github.com/j3rryl/task-tracker/blob/main/components/ui/dialog.tsx): `components/ui/dialog.tsx`
- [Avatar Component](https://github.com/j3rryl/task-tracker/blob/main/components/ui/avatar.tsx): `components/ui/avatar.tsx`
- [Scroll Area](https://github.com/j3rryl/task-tracker/blob/main/components/ui/scroll-area.tsx): `components/ui/scroll-area.tsx`
- [Skeleton Component](https://github.com/j3rryl/task-tracker/blob/main/components/ui/skeleton.tsx): `components/ui/skeleton.tsx`

### Other components

- **User**
- **OpenAI Model**

## Connections

- User → Tasks Page: opens (evidence: `app/tasks/page.tsx`)
- Tasks Page → Task Controls: renders (evidence: `app/tasks/page.tsx`)
- Task Controls → Task Actions: creates or deletes (evidence: `app/tasks/TasksComponent.tsx`)
- Task Controls → Task List: renders (evidence: `app/tasks/TasksComponent.tsx`)
- Tasks Page → Database Client: loads tasks (evidence: `app/tasks/page.tsx`)
- Task Actions → Database Client: writes tasks (evidence: `app/actions.ts`)
- Task Actions → Task Schema: uses table (evidence: `app/actions.ts`)
- Task List → Task Actions: updates or deletes (evidence: `app/tasks/TasksList.tsx`)
- User → Dashboard Page: opens (evidence: `app/dashboard/page.tsx`)
- Dashboard Page → Task Statistics: renders (evidence: `app/dashboard/page.tsx`)
- Dashboard Page → Dashboard Loading: renders fallback (evidence: `app/dashboard/page.tsx`)
- Task Statistics → Database Client: queries counts (evidence: `app/dashboard/TaskStatistics.tsx`)
- Task Statistics → Task Schema: queries table (evidence: `app/dashboard/TaskStatistics.tsx`)
- User → Chat Page: opens (evidence: `app/chat/page.tsx`)
- Chat Page → Chat Interface: renders (evidence: `app/chat/page.tsx`)
- Chat Interface → AI Actions: sends message (evidence: `components/TaskChat.tsx`)
- AI Actions → OpenAI Model: streams response (evidence: `app/ai/actions.tsx`)
- AI Actions → Database Client: queries tasks (evidence: `app/ai/actions.tsx`)
- AI Actions → Task Schema: queries table (evidence: `app/ai/actions.tsx`)
- AI Actions → Task Actions: creates task (evidence: `app/ai/actions.tsx`)
- AI Actions → Task List: renders results (evidence: `app/ai/actions.tsx`)
- App Layout → Navigation Sidebar: renders navigation (evidence: `app/layout.tsx`)
- Task Controls → Button Component: uses (evidence: `app/tasks/TasksComponent.tsx`)
- Task Controls → Input Component: uses (evidence: `app/tasks/TasksComponent.tsx`)
- Task Controls → Dialog Component: uses (evidence: `app/tasks/TasksComponent.tsx`)
- Task List → Card Components: renders cards (evidence: `app/tasks/TasksList.tsx`)
- Task List → Button Component: uses (evidence: `app/tasks/TasksList.tsx`)
- Task Statistics → Card Components: renders cards (evidence: `app/dashboard/TaskStatistics.tsx`)
- Dashboard Loading → Card Components: renders cards (evidence: `app/dashboard/TaskSkeleton.tsx`)
- Dashboard Loading → Skeleton Component: renders placeholders (evidence: `app/dashboard/TaskSkeleton.tsx`)
- Chat Interface → Avatar Component: renders avatars (evidence: `components/TaskChat.tsx`)
- Chat Interface → Button Component: uses (evidence: `components/TaskChat.tsx`)
- Chat Interface → Card Components: renders (evidence: `components/TaskChat.tsx`)
- Chat Interface → Input Component: uses (evidence: `components/TaskChat.tsx`)
- Chat Interface → Scroll Area: renders messages (evidence: `components/TaskChat.tsx`)
