# bargav346/dailydocket architecture

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

- Interactive diagram: https://gitdiagram.com/bargav346/dailydocket
- Repository: https://github.com/bargav346/dailydocket

## Overview

Daily Docket is a personal productivity app: users authenticate, choose task management or an hourly diary, and save their work to Supabase. The task workflow includes AI-generated suggestions, task streaks, and email-delivery status; the diary supports date-based entry and saving. The graph follows evidenced routes, calls, and data access. The README describes the development stack rather than product capabilities, and the three edge-function implementations were indexed or read but their callers and external dependencies are not established by the excerpts, so those links are left unverified.

Main entry points: [`src/App.tsx`](https://github.com/bargav346/dailydocket/blob/main/src/App.tsx) (Routes and providers), [`src/pages/TaskManager.tsx`](https://github.com/bargav346/dailydocket/blob/main/src/pages/TaskManager.tsx) (Task manager), [`src/contexts/AuthContext.tsx`](https://github.com/bargav346/dailydocket/blob/main/src/contexts/AuthContext.tsx) (Authentication), [`src/integrations/supabase/client.ts`](https://github.com/bargav346/dailydocket/blob/main/src/integrations/supabase/client.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_router["Routes and providers<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_guard["Protected routes<br/>[ProtectedRoute.tsx]"]
  node_login["Sign in and register<br/>[Login.tsx]"]
  node_home["Daily dashboard<br/>[Index.tsx]"]
end

subgraph group_tasks["Task management"]
  node_taskmgr["Task manager<br/>[TaskManager.tsx]"]
  node_suggestions["AI suggestions<br/>[AiSuggestions.tsx]"]
  node_streak["Task streaks<br/>[TaskStreak.tsx]"]
  node_delivery["Email delivery status"]
end

subgraph group_diary["Diary tracking"]
  node_diary["Hourly diary<br/>[Diary.tsx]"]
end

subgraph group_backend["Backend services"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_taskfn["Task suggestions function<br/>[index.ts]"]
  node_summaryfn["Diary summary function<br/>[index.ts]"]
  node_notifyfn["Notification function<br/>[index.ts]"]
  node_db[("Supabase database")]
end

node_user(("User"))

node_user -->|"opens app"| node_router
node_router -->|"provides auth"| node_auth
node_router -->|"routes through"| node_guard
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_taskmgr
node_router -->|"routes to"| node_diary
node_guard -->|"checks session"| node_auth
node_login -->|"uses auth"| node_auth
node_auth -->|"auth requests"| node_supabase
node_home -->|"reads identity"| node_auth
node_home -->|"navigates to"| node_taskmgr
node_home -->|"navigates to"| node_diary
node_taskmgr -->|"reads and writes tasks"| node_supabase
node_taskmgr -->|"renders"| node_suggestions
node_taskmgr -->|"renders"| node_streak
node_taskmgr -->|"renders"| node_delivery
node_suggestions -->|"invokes"| node_taskfn
node_suggestions -->|"passes added task"| node_taskmgr
node_delivery -->|"queries status"| node_supabase
node_diary -->|"reads and saves entries"| node_supabase
node_supabase -.->|"accesses data"| node_db
node_taskfn -.-> node_summaryfn
node_taskfn -.-> node_notifyfn

click node_router "https://github.com/bargav346/dailydocket/blob/main/src/App.tsx"
click node_auth "https://github.com/bargav346/dailydocket/blob/main/src/contexts/AuthContext.tsx"
click node_guard "https://github.com/bargav346/dailydocket/blob/main/src/components/ProtectedRoute.tsx"
click node_login "https://github.com/bargav346/dailydocket/blob/main/src/pages/Login.tsx"
click node_home "https://github.com/bargav346/dailydocket/blob/main/src/pages/Index.tsx"
click node_taskmgr "https://github.com/bargav346/dailydocket/blob/main/src/pages/TaskManager.tsx"
click node_suggestions "https://github.com/bargav346/dailydocket/blob/main/src/components/AiSuggestions.tsx"
click node_streak "https://github.com/bargav346/dailydocket/blob/main/src/components/TaskStreak.tsx"
click node_delivery "https://github.com/bargav346/dailydocket/blob/main/src/components/EmailDeliveryStatus.tsx"
click node_diary "https://github.com/bargav346/dailydocket/blob/main/src/pages/Diary.tsx"
click node_supabase "https://github.com/bargav346/dailydocket/blob/main/src/integrations/supabase/client.ts"
click node_taskfn "https://github.com/bargav346/dailydocket/blob/main/supabase/functions/suggest-tasks/index.ts"
click node_summaryfn "https://github.com/bargav346/dailydocket/blob/main/supabase/functions/diary-summary/index.ts"
click node_notifyfn "https://github.com/bargav346/dailydocket/blob/main/supabase/functions/send-notification/index.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_router,node_auth,node_guard,node_login,node_home,node_user toneBlue
class node_taskmgr,node_suggestions,node_streak,node_delivery toneAmber
class node_diary toneMint
class node_supabase,node_taskfn,node_summaryfn,node_notifyfn,node_db toneRose
```

## Components

### App and access

- [Routes and providers](https://github.com/bargav346/dailydocket/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/bargav346/dailydocket/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Protected routes](https://github.com/bargav346/dailydocket/blob/main/src/components/ProtectedRoute.tsx): `src/components/ProtectedRoute.tsx`
- [Sign in and register](https://github.com/bargav346/dailydocket/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Daily dashboard](https://github.com/bargav346/dailydocket/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`

### Task management

- [Task manager](https://github.com/bargav346/dailydocket/blob/main/src/pages/TaskManager.tsx): `src/pages/TaskManager.tsx`
- [AI suggestions](https://github.com/bargav346/dailydocket/blob/main/src/components/AiSuggestions.tsx): `src/components/AiSuggestions.tsx`
- [Task streaks](https://github.com/bargav346/dailydocket/blob/main/src/components/TaskStreak.tsx): `src/components/TaskStreak.tsx`
- [Email delivery status](https://github.com/bargav346/dailydocket/blob/main/src/components/EmailDeliveryStatus.tsx): `src/components/EmailDeliveryStatus.tsx`

### Diary tracking

- [Hourly diary](https://github.com/bargav346/dailydocket/blob/main/src/pages/Diary.tsx): `src/pages/Diary.tsx`

### Backend services

- [Supabase client](https://github.com/bargav346/dailydocket/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Task suggestions function](https://github.com/bargav346/dailydocket/blob/main/supabase/functions/suggest-tasks/index.ts): `supabase/functions/suggest-tasks/index.ts`
- [Diary summary function](https://github.com/bargav346/dailydocket/blob/main/supabase/functions/diary-summary/index.ts): `supabase/functions/diary-summary/index.ts`
- [Notification function](https://github.com/bargav346/dailydocket/blob/main/supabase/functions/send-notification/index.ts): `supabase/functions/send-notification/index.ts`
- **Supabase database**

### Other components

- **User**

## Connections

- User → Routes and providers: opens app (evidence: `src/App.tsx`)
- Routes and providers → Authentication: provides auth (evidence: `src/App.tsx`)
- Routes and providers → Protected routes: routes through (evidence: `src/App.tsx`)
- Routes and providers → Sign in and register: routes to (evidence: `src/App.tsx`)
- Routes and providers → Daily dashboard: routes to (evidence: `src/App.tsx`)
- Routes and providers → Task manager: routes to (evidence: `src/App.tsx`)
- Routes and providers → Hourly diary: routes to (evidence: `src/App.tsx`)
- Protected routes → Authentication: checks session (evidence: `src/components/ProtectedRoute.tsx`)
- Sign in and register → Authentication: uses auth (evidence: `src/pages/Login.tsx`)
- Authentication → Supabase client: auth requests (evidence: `src/contexts/AuthContext.tsx`)
- Daily dashboard → Authentication: reads identity (evidence: `src/pages/Index.tsx`)
- Daily dashboard → Task manager: navigates to (evidence: `src/pages/Index.tsx`)
- Daily dashboard → Hourly diary: navigates to (evidence: `src/pages/Index.tsx`)
- Task manager → Supabase client: reads and writes tasks (evidence: `src/pages/TaskManager.tsx`)
- Task manager → AI suggestions: renders (evidence: `src/pages/TaskManager.tsx`)
- Task manager → Task streaks: renders (evidence: `src/pages/TaskManager.tsx`)
- Task manager → Email delivery status: renders (evidence: `src/pages/TaskManager.tsx`)
- AI suggestions → Task suggestions function: invokes (evidence: `src/components/AiSuggestions.tsx`)
- AI suggestions → Task manager: passes added task (evidence: `src/components/AiSuggestions.tsx`)
- Email delivery status → Supabase client: queries status (evidence: `src/components/EmailDeliveryStatus.tsx`)
- Hourly diary → Supabase client: reads and saves entries (evidence: `src/pages/Diary.tsx`)
- Supabase client → Supabase database: accesses data
- Task suggestions function → Diary summary function
- Task suggestions function → Notification function
