# hamzaelmanzari/docket architecture

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

- Interactive diagram: https://gitdiagram.com/hamzaelmanzari/docket
- Repository: https://github.com/hamzaelmanzari/docket

## Overview

Docket is a React task workspace whose main flow runs from a user action through App state and task views, then persists workspace data locally or through Firestore when signed in. Its domain capabilities include task lifecycle and reminders, focus and archive views, analytics, team collaboration and chat, and administration. The graph preserves the major README features and core modules named in the source index. Some view-to-storage and authentication details are documented but not fully sampled, so those links cite the README rather than implying inspected implementation.

Main entry points: [`src/App.tsx`](https://github.com/hamzaelmanzari/docket/blob/main/src/App.tsx) (App state and routing), [`src/utils/taskLogic.ts`](https://github.com/hamzaelmanzari/docket/blob/main/src/utils/taskLogic.ts) (Task rules and metrics), [`src/services/firestoreService.ts`](https://github.com/hamzaelmanzari/docket/blob/main/src/services/firestoreService.ts) (Firestore operations), [`src/types/task.ts`](https://github.com/hamzaelmanzari/docket/blob/main/src/types/task.ts) (Task and chat types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace orchestration"]
  node_app["App state and routing<br/>[App.tsx]"]
  node_sidebar["Workspace navigation<br/>[Sidebar.tsx]"]
  node_account["Account menu<br/>[AccountMenu.tsx]"]
  node_landing["Landing view<br/>[LandingPage.tsx]"]
end

subgraph group_tasks["Task management"]
  node_task_composer["Task entry<br/>[TaskComposer.tsx]"]
  node_task_row["Task actions<br/>[TaskRow.tsx]"]
  node_task_edit["Task editing<br/>[EditTaskModal.tsx]"]
  node_task_toolbar["Task filtering<br/>[TaskToolbar.tsx]"]
  node_focus["Focus mode<br/>[FocusModeView.tsx]"]
  node_archive["Archived tasks<br/>[ArchivePanel.tsx]"]
  node_analytics["Task analytics<br/>[AnalyticsPanel.tsx]"]
  node_task_logic["Task rules and metrics<br/>[taskLogic.ts]"]
  node_task_types["Task and chat types<br/>[task.ts]"]
end

subgraph group_collaboration["Team collaboration"]
  node_team["Team workspace<br/>[TeamPanel.tsx]"]
  node_chat["Team chat<br/>[ChatPanel.tsx]"]
  node_admin["Admin controls<br/>[AdminPanel.tsx]"]
  node_admin_types["User and audit types<br/>[admin.ts]"]
end

subgraph group_platform["Persistence and platform"]
  node_storage[("Local workspace storage<br/>[storage.ts]")]
  node_firestore_service["Firestore operations"]
  node_sanitizer["Payload sanitization"]
  node_firebase["Firebase auth and setup<br/>[firebase.ts]"]
  node_cloud[("Firebase services")]
  node_speech["Speech input hook<br/>[useSpeechToText.ts]"]
end

node_user(("Workspace user"))

node_user -->|"uses workspace"| node_app
node_app -->|"renders navigation"| node_sidebar
node_app -->|"renders view"| node_landing
node_app -->|"renders entry"| node_task_composer
node_app -->|"renders tasks"| node_task_row
node_app -->|"renders editor"| node_task_edit
node_app -->|"renders toolbar"| node_task_toolbar
node_app -->|"renders view"| node_focus
node_app -->|"renders view"| node_archive
node_app -->|"renders view"| node_analytics
node_app -->|"renders panel"| node_team
node_app -->|"renders panel"| node_chat
node_app -->|"renders panel"| node_admin
node_app -->|"loads local data"| node_storage
node_app -->|"creates cloud records"| node_firestore_service
node_task_composer -->|"uses speech input"| node_speech
node_task_row -->|"formats task details"| node_task_logic
node_task_composer -->|"validates task entry"| node_task_logic
node_task_edit -->|"uses task rules"| node_task_logic
node_archive -->|"uses task rules"| node_task_logic
node_analytics -->|"calculates metrics"| node_task_logic
node_task_logic -->|"uses task types"| node_task_types
node_storage -->|"uses categories"| node_task_logic
node_storage -->|"stores workspace records"| node_task_types
node_team -->|"uses collaboration types"| node_task_types
node_chat -->|"uses chat types"| node_task_types
node_admin -->|"uses admin types"| node_admin_types
node_admin -.->|"manages users"| node_firestore_service
node_firestore_service -->|"uses Firebase setup"| node_firebase
node_firestore_service -.->|"sanitizes payloads"| node_sanitizer
node_firestore_service -->|"reads and writes"| node_cloud
node_firebase -->|"configures auth and database"| node_cloud
node_app -.->|"uses cloud auth"| node_firebase

click node_app "https://github.com/hamzaelmanzari/docket/blob/main/src/App.tsx"
click node_sidebar "https://github.com/hamzaelmanzari/docket/blob/main/src/components/Sidebar.tsx"
click node_account "https://github.com/hamzaelmanzari/docket/blob/main/src/components/AccountMenu.tsx"
click node_landing "https://github.com/hamzaelmanzari/docket/blob/main/src/components/LandingPage.tsx"
click node_task_composer "https://github.com/hamzaelmanzari/docket/blob/main/src/components/TaskComposer.tsx"
click node_task_row "https://github.com/hamzaelmanzari/docket/blob/main/src/components/TaskRow.tsx"
click node_task_edit "https://github.com/hamzaelmanzari/docket/blob/main/src/components/EditTaskModal.tsx"
click node_task_toolbar "https://github.com/hamzaelmanzari/docket/blob/main/src/components/TaskToolbar.tsx"
click node_focus "https://github.com/hamzaelmanzari/docket/blob/main/src/components/FocusModeView.tsx"
click node_archive "https://github.com/hamzaelmanzari/docket/blob/main/src/components/ArchivePanel.tsx"
click node_analytics "https://github.com/hamzaelmanzari/docket/blob/main/src/components/AnalyticsPanel.tsx"
click node_task_logic "https://github.com/hamzaelmanzari/docket/blob/main/src/utils/taskLogic.ts"
click node_task_types "https://github.com/hamzaelmanzari/docket/blob/main/src/types/task.ts"
click node_team "https://github.com/hamzaelmanzari/docket/blob/main/src/components/TeamPanel.tsx"
click node_chat "https://github.com/hamzaelmanzari/docket/blob/main/src/components/ChatPanel.tsx"
click node_admin "https://github.com/hamzaelmanzari/docket/blob/main/src/components/AdminPanel.tsx"
click node_admin_types "https://github.com/hamzaelmanzari/docket/blob/main/src/types/admin.ts"
click node_storage "https://github.com/hamzaelmanzari/docket/blob/main/src/utils/storage.ts"
click node_firestore_service "https://github.com/hamzaelmanzari/docket/blob/main/src/services/firestoreService.ts"
click node_sanitizer "https://github.com/hamzaelmanzari/docket/blob/main/src/utils/blueprintSanitizer.ts"
click node_firebase "https://github.com/hamzaelmanzari/docket/blob/main/src/firebase.ts"
click node_speech "https://github.com/hamzaelmanzari/docket/blob/main/src/hooks/useSpeechToText.ts"

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_sidebar,node_account,node_landing,node_user toneBlue
class node_task_composer,node_task_row,node_task_edit,node_task_toolbar,node_focus,node_archive,node_analytics,node_task_logic,node_task_types toneAmber
class node_team,node_chat,node_admin,node_admin_types toneMint
class node_storage,node_firestore_service,node_sanitizer,node_firebase,node_cloud,node_speech toneRose
```

## Components

### Workspace orchestration

- [App state and routing](https://github.com/hamzaelmanzari/docket/blob/main/src/App.tsx): `src/App.tsx`
- [Workspace navigation](https://github.com/hamzaelmanzari/docket/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Account menu](https://github.com/hamzaelmanzari/docket/blob/main/src/components/AccountMenu.tsx): `src/components/AccountMenu.tsx`
- [Landing view](https://github.com/hamzaelmanzari/docket/blob/main/src/components/LandingPage.tsx): `src/components/LandingPage.tsx`

### Task management

- [Task entry](https://github.com/hamzaelmanzari/docket/blob/main/src/components/TaskComposer.tsx): `src/components/TaskComposer.tsx`
- [Task actions](https://github.com/hamzaelmanzari/docket/blob/main/src/components/TaskRow.tsx): `src/components/TaskRow.tsx`
- [Task editing](https://github.com/hamzaelmanzari/docket/blob/main/src/components/EditTaskModal.tsx): `src/components/EditTaskModal.tsx`
- [Task filtering](https://github.com/hamzaelmanzari/docket/blob/main/src/components/TaskToolbar.tsx): `src/components/TaskToolbar.tsx`
- [Focus mode](https://github.com/hamzaelmanzari/docket/blob/main/src/components/FocusModeView.tsx): `src/components/FocusModeView.tsx`
- [Archived tasks](https://github.com/hamzaelmanzari/docket/blob/main/src/components/ArchivePanel.tsx): `src/components/ArchivePanel.tsx`
- [Task analytics](https://github.com/hamzaelmanzari/docket/blob/main/src/components/AnalyticsPanel.tsx): `src/components/AnalyticsPanel.tsx`
- [Task rules and metrics](https://github.com/hamzaelmanzari/docket/blob/main/src/utils/taskLogic.ts): `src/utils/taskLogic.ts`
- [Task and chat types](https://github.com/hamzaelmanzari/docket/blob/main/src/types/task.ts): `src/types/task.ts`

### Team collaboration

- [Team workspace](https://github.com/hamzaelmanzari/docket/blob/main/src/components/TeamPanel.tsx): `src/components/TeamPanel.tsx`
- [Team chat](https://github.com/hamzaelmanzari/docket/blob/main/src/components/ChatPanel.tsx): `src/components/ChatPanel.tsx`
- [Admin controls](https://github.com/hamzaelmanzari/docket/blob/main/src/components/AdminPanel.tsx): `src/components/AdminPanel.tsx`
- [User and audit types](https://github.com/hamzaelmanzari/docket/blob/main/src/types/admin.ts): `src/types/admin.ts`

### Persistence and platform

- [Local workspace storage](https://github.com/hamzaelmanzari/docket/blob/main/src/utils/storage.ts): `src/utils/storage.ts`
- [Firestore operations](https://github.com/hamzaelmanzari/docket/blob/main/src/services/firestoreService.ts): `src/services/firestoreService.ts`
- [Payload sanitization](https://github.com/hamzaelmanzari/docket/blob/main/src/utils/blueprintSanitizer.ts): `src/utils/blueprintSanitizer.ts`
- [Firebase auth and setup](https://github.com/hamzaelmanzari/docket/blob/main/src/firebase.ts): `src/firebase.ts`
- **Firebase services**
- [Speech input hook](https://github.com/hamzaelmanzari/docket/blob/main/src/hooks/useSpeechToText.ts): `src/hooks/useSpeechToText.ts`

### Other components

- **Workspace user**

## Connections

- Workspace user → App state and routing: uses workspace (evidence: `README.md`)
- App state and routing → Workspace navigation: renders navigation (evidence: `src/App.tsx`)
- App state and routing → Landing view: renders view (evidence: `src/App.tsx`)
- App state and routing → Task entry: renders entry (evidence: `src/App.tsx`)
- App state and routing → Task actions: renders tasks (evidence: `src/App.tsx`)
- App state and routing → Task editing: renders editor (evidence: `src/App.tsx`)
- App state and routing → Task filtering: renders toolbar (evidence: `src/App.tsx`)
- App state and routing → Focus mode: renders view (evidence: `src/App.tsx`)
- App state and routing → Archived tasks: renders view (evidence: `src/App.tsx`)
- App state and routing → Task analytics: renders view (evidence: `src/App.tsx`)
- App state and routing → Team workspace: renders panel (evidence: `src/App.tsx`)
- App state and routing → Team chat: renders panel (evidence: `src/App.tsx`)
- App state and routing → Admin controls: renders panel (evidence: `src/App.tsx`)
- App state and routing → Local workspace storage: loads local data (evidence: `src/App.tsx`)
- App state and routing → Firestore operations: creates cloud records (evidence: `src/App.tsx`)
- Task entry → Speech input hook: uses speech input (evidence: `src/components/TaskComposer.tsx`)
- Task actions → Task rules and metrics: formats task details (evidence: `src/components/TaskRow.tsx`)
- Task entry → Task rules and metrics: validates task entry (evidence: `src/components/TaskComposer.tsx`)
- Task editing → Task rules and metrics: uses task rules (evidence: `src/components/EditTaskModal.tsx`)
- Archived tasks → Task rules and metrics: uses task rules (evidence: `src/components/ArchivePanel.tsx`)
- Task analytics → Task rules and metrics: calculates metrics (evidence: `src/components/AnalyticsPanel.tsx`)
- Task rules and metrics → Task and chat types: uses task types (evidence: `src/utils/taskLogic.ts`)
- Local workspace storage → Task rules and metrics: uses categories (evidence: `src/utils/storage.ts`)
- Local workspace storage → Task and chat types: stores workspace records (evidence: `src/utils/storage.ts`)
- Team workspace → Task and chat types: uses collaboration types (evidence: `src/components/TeamPanel.tsx`)
- Team chat → Task and chat types: uses chat types (evidence: `src/components/ChatPanel.tsx`)
- Admin controls → User and audit types: uses admin types (evidence: `src/components/AdminPanel.tsx`)
- Admin controls → Firestore operations: manages users
- Firestore operations → Firebase auth and setup: uses Firebase setup (evidence: `src/services/firestoreService.ts`)
- Firestore operations → Payload sanitization: sanitizes payloads (evidence: `src/services/firestoreService.ts`)
- Firestore operations → Firebase services: reads and writes (evidence: `README.md`)
- Firebase auth and setup → Firebase services: configures auth and database (evidence: `README.md`)
- App state and routing → Firebase auth and setup: uses cloud auth (evidence: `src/App.tsx`)
