# pipelinesync/time-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/pipelinesync/time-tracker
- Repository: https://github.com/pipelinesync/time-tracker

## Overview

Work Tracker is a mobile-first time, workforce, and operations app with browser-local demo mode and Supabase-backed accounts. Workers clock in, pause, and clock out; admins and permission-granted workers manage entries, tasks, teams, and related business workflows. The React app routes signed-in users to role- and permission-gated pages, while a shared store coordinates domain state and data access. Additional product branches include finance, reporting, client boards, and a remote Claude MCP connector. The excerpts establish the app/store and selected page relationships; unsampled page and function internals are represented at their existing paths, with uncertain links omitted.

Main entry points: [`src/App.tsx`](https://github.com/pipelinesync/time-tracker/blob/main/src/App.tsx) (App routing), [`src/lib/store.tsx`](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/store.tsx) (Shared app store), [`src/lib/backend.ts`](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/backend.ts) (Backend selector), [`netlify/functions/mcp.ts`](https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/mcp.ts) (MCP endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["App experience"]
  node_app["App routing<br/>[App.tsx]"]
  node_auth["Sign-in<br/>[AuthPage.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_tracker["Time tracking<br/>[TrackerPage.tsx]"]
  node_entries["Time entries<br/>[EntriesPage.tsx]"]
  node_workers["Workers<br/>[WorkersPage.tsx]"]
  node_reports["Reports<br/>[ReportsPage.tsx]"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
end

subgraph group_state["State and persistence"]
  node_store["Shared app store<br/>[store.tsx]"]
  node_types["Domain types and permissions<br/>[types.ts]"]
  node_localdb[("Local data store<br/>[localDb.ts]")]
  node_supabasedb["Supabase data access<br/>[supabaseDb.ts]"]
  node_backend["Backend selector<br/>[backend.ts]"]
end

subgraph group_operations["Work management"]
  node_tasks["Task boards<br/>[TaskBoard.tsx]"]
  node_finance["Finance and payroll<br/>[FinancePage.tsx]"]
  node_personalfinance["Personal finance"]
  node_clients["Client management"]
  node_priority["Client priority board"]
  node_invoicing["Client invoicing"]
  node_kpi["Team KPI<br/>[TeamKpiPage.tsx]"]
  node_meetings["Meetings<br/>[MeetingsPage.tsx]"]
  node_support["IT support<br/>[ItSupportPage.tsx]"]
  node_notepad["Notepad<br/>[NotepadPage.tsx]"]
end

subgraph group_integrations["Remote services"]
  node_supabasefn["Supabase function helpers<br/>[supabase.ts]"]
  node_mcp["MCP endpoint<br/>[mcp.ts]"]
  node_mcptools["MCP tools"]
  node_oauth["MCP authorization<br/>[oauth-authorize.ts]"]
end

node_user(("Admin / worker"))
node_claude(("Claude"))
node_supabase[("Supabase service")]
node_slack(("Slack"))

node_user -->|"uses"| node_app
node_app -->|"routes unauthenticated"| node_auth
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_tracker
node_app -->|"routes"| node_entries
node_app -->|"routes"| node_tasks
node_app -->|"routes"| node_priority
node_app -->|"routes"| node_invoicing
node_app -->|"routes"| node_kpi
node_app -->|"routes"| node_meetings
node_app -->|"routes"| node_notepad
node_app -->|"routes"| node_settings
node_app -->|"reads auth state"| node_store
node_workers -->|"manages workers"| node_store
node_tasks -->|"uses shared state"| node_store
node_priority -->|"uses shared state"| node_store
node_invoicing -->|"uses shared state"| node_store
node_store -->|"delegates data access"| node_backend
node_store -->|"uses"| node_localdb
node_store -->|"uses"| node_supabasedb
node_store -->|"uses domain models"| node_types
node_backend -.->|"connects when configured"| node_supabase
node_backend -.->|"supports demo mode"| node_localdb
node_user -->|"clocks time"| node_tracker
node_user -->|"manages tasks"| node_tasks
node_user -->|"manages finances"| node_finance
node_user -->|"views reports"| node_reports
node_user -->|"manages clients"| node_clients
node_user -.->|"manages personal records"| node_personalfinance
node_user -.->|"uses support desk"| node_support
node_user -->|"reviews team"| node_dashboard
node_claude -->|"connects remotely"| node_mcp
node_mcp -.->|"dispatches tools"| node_mcptools
node_mcp -.->|"uses authorization"| node_oauth
node_mcptools -.->|"accesses account data"| node_supabasefn
node_supabasefn -->|"uses"| node_supabase
node_settings -.->|"configures notifications"| node_slack

click node_app "https://github.com/pipelinesync/time-tracker/blob/main/src/App.tsx"
click node_auth "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/AuthPage.tsx"
click node_dashboard "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/DashboardPage.tsx"
click node_tracker "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/TrackerPage.tsx"
click node_entries "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/EntriesPage.tsx"
click node_workers "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/WorkersPage.tsx"
click node_tasks "https://github.com/pipelinesync/time-tracker/blob/main/src/components/TaskBoard.tsx"
click node_reports "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ReportsPage.tsx"
click node_finance "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/FinancePage.tsx"
click node_personalfinance "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/PersonalFinancePage.tsx"
click node_clients "https://github.com/pipelinesync/time-tracker/blob/main/src/components/ManageClientsDialog.tsx"
click node_priority "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ClientPriorityBoardPage.tsx"
click node_invoicing "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ClientInvoicingPage.tsx"
click node_kpi "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/TeamKpiPage.tsx"
click node_meetings "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/MeetingsPage.tsx"
click node_support "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ItSupportPage.tsx"
click node_notepad "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/NotepadPage.tsx"
click node_settings "https://github.com/pipelinesync/time-tracker/blob/main/src/pages/SettingsPage.tsx"
click node_store "https://github.com/pipelinesync/time-tracker/blob/main/src/lib/store.tsx"
click node_types "https://github.com/pipelinesync/time-tracker/blob/main/src/lib/types.ts"
click node_localdb "https://github.com/pipelinesync/time-tracker/blob/main/src/lib/localDb.ts"
click node_supabasedb "https://github.com/pipelinesync/time-tracker/blob/main/src/lib/supabaseDb.ts"
click node_backend "https://github.com/pipelinesync/time-tracker/blob/main/src/lib/backend.ts"
click node_supabasefn "https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/lib/supabase.ts"
click node_mcp "https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/mcp.ts"
click node_mcptools "https://github.com/pipelinesync/time-tracker/tree/main/netlify/functions/lib/mcp/tools"
click node_oauth "https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/oauth-authorize.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_auth,node_dashboard,node_tracker,node_entries,node_workers,node_reports,node_settings toneBlue
class node_store,node_types,node_localdb,node_supabasedb,node_backend,node_supabase toneAmber
class node_tasks,node_finance,node_personalfinance,node_clients,node_priority,node_invoicing,node_kpi,node_meetings,node_support,node_notepad toneMint
class node_supabasefn,node_mcp,node_mcptools,node_oauth,node_user toneRose
class node_claude,node_slack toneIndigo
```

## Components

### App experience

- [App routing](https://github.com/pipelinesync/time-tracker/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Dashboard](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Time tracking](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/TrackerPage.tsx): `src/pages/TrackerPage.tsx`
- [Time entries](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/EntriesPage.tsx): `src/pages/EntriesPage.tsx`
- [Workers](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/WorkersPage.tsx): `src/pages/WorkersPage.tsx`
- [Reports](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ReportsPage.tsx): `src/pages/ReportsPage.tsx`
- [Settings](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/SettingsPage.tsx): `src/pages/SettingsPage.tsx`

### State and persistence

- [Shared app store](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/store.tsx): `src/lib/store.tsx`
- [Domain types and permissions](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/types.ts): `src/lib/types.ts`
- [Local data store](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/localDb.ts): `src/lib/localDb.ts`
- [Supabase data access](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/supabaseDb.ts): `src/lib/supabaseDb.ts`
- [Backend selector](https://github.com/pipelinesync/time-tracker/blob/main/src/lib/backend.ts): `src/lib/backend.ts`

### Work management

- [Task boards](https://github.com/pipelinesync/time-tracker/blob/main/src/components/TaskBoard.tsx): `src/components/TaskBoard.tsx`
- [Finance and payroll](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/FinancePage.tsx): `src/pages/FinancePage.tsx`
- [Personal finance](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/PersonalFinancePage.tsx): `src/pages/PersonalFinancePage.tsx`
- [Client management](https://github.com/pipelinesync/time-tracker/blob/main/src/components/ManageClientsDialog.tsx): `src/components/ManageClientsDialog.tsx`
- [Client priority board](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ClientPriorityBoardPage.tsx): `src/pages/ClientPriorityBoardPage.tsx`
- [Client invoicing](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ClientInvoicingPage.tsx): `src/pages/ClientInvoicingPage.tsx`
- [Team KPI](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/TeamKpiPage.tsx): `src/pages/TeamKpiPage.tsx`
- [Meetings](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/MeetingsPage.tsx): `src/pages/MeetingsPage.tsx`
- [IT support](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/ItSupportPage.tsx): `src/pages/ItSupportPage.tsx`
- [Notepad](https://github.com/pipelinesync/time-tracker/blob/main/src/pages/NotepadPage.tsx): `src/pages/NotepadPage.tsx`

### Remote services

- [Supabase function helpers](https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/lib/supabase.ts): `netlify/functions/lib/supabase.ts`
- [MCP endpoint](https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/mcp.ts): `netlify/functions/mcp.ts`
- [MCP tools](https://github.com/pipelinesync/time-tracker/tree/main/netlify/functions/lib/mcp/tools): `netlify/functions/lib/mcp/tools`
- [MCP authorization](https://github.com/pipelinesync/time-tracker/blob/main/netlify/functions/oauth-authorize.ts): `netlify/functions/oauth-authorize.ts`

### Other components

- **Admin / worker**
- **Claude**
- **Supabase service**
- **Slack**

## Connections

- Admin / worker → App routing: uses (evidence: `README.md`)
- App routing → Sign-in: routes unauthenticated (evidence: `src/App.tsx`)
- App routing → Dashboard: routes (evidence: `src/App.tsx`)
- App routing → Time tracking: routes (evidence: `src/App.tsx`)
- App routing → Time entries: routes (evidence: `src/App.tsx`)
- App routing → Task boards: routes (evidence: `src/App.tsx`)
- App routing → Client priority board: routes (evidence: `src/App.tsx`)
- App routing → Client invoicing: routes (evidence: `src/App.tsx`)
- App routing → Team KPI: routes (evidence: `src/App.tsx`)
- App routing → Meetings: routes (evidence: `src/App.tsx`)
- App routing → Notepad: routes (evidence: `src/App.tsx`)
- App routing → Settings: routes (evidence: `src/App.tsx`)
- App routing → Shared app store: reads auth state (evidence: `src/App.tsx`)
- Workers → Shared app store: manages workers (evidence: `src/pages/WorkersPage.tsx`)
- Task boards → Shared app store: uses shared state (evidence: `src/pages/TasksPage.tsx`)
- Client priority board → Shared app store: uses shared state (evidence: `src/pages/ClientPriorityBoardPage.tsx`)
- Client invoicing → Shared app store: uses shared state (evidence: `src/pages/ClientInvoicingPage.tsx`)
- Shared app store → Backend selector: delegates data access (evidence: `src/lib/store.tsx`)
- Shared app store → Local data store: uses (evidence: `src/lib/store.tsx`)
- Shared app store → Supabase data access: uses (evidence: `src/lib/store.tsx`)
- Shared app store → Domain types and permissions: uses domain models (evidence: `src/lib/store.tsx`)
- Backend selector → Supabase service: connects when configured
- Backend selector → Local data store: supports demo mode
- Admin / worker → Time tracking: clocks time (evidence: `README.md`)
- Admin / worker → Task boards: manages tasks (evidence: `README.md`)
- Admin / worker → Finance and payroll: manages finances (evidence: `README.md`)
- Admin / worker → Reports: views reports (evidence: `README.md`)
- Admin / worker → Client management: manages clients (evidence: `README.md`)
- Admin / worker → Personal finance: manages personal records
- Admin / worker → IT support: uses support desk
- Admin / worker → Dashboard: reviews team (evidence: `README.md`)
- Claude → MCP endpoint: connects remotely (evidence: `README.md`)
- MCP endpoint → MCP tools: dispatches tools
- MCP endpoint → MCP authorization: uses authorization
- MCP tools → Supabase function helpers: accesses account data
- Supabase function helpers → Supabase service: uses (evidence: `netlify/functions/lib/supabase.ts`)
- Settings → Slack: configures notifications
