# masadipradeeprao/time-tracker-app architecture

> Architecture diagram of the GitHub repository masadipradeeprao/time-tracker-app, 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/masadipradeeprao/time-tracker-app
- Repository: https://github.com/masadipradeeprao/time-tracker-app

## Overview

Hourlog is a workforce time-tracking application for employees and administrators. Employees authenticate, record shifts, and review calendar and hours summaries; administrators oversee staff, manage profiles and shifts, and inspect reports and audit history. The sampled services show the Supabase-backed identity, time-entry, and audit layers. Several dashboard and administration pages are represented from the tree and README, but their internal wiring was not sampled, so those links are left unverified.

Main entry points: [`src/services/time-service.ts`](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/time-service.ts) (Time service), [`src/services/audit-service.ts`](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/audit-service.ts) (Audit service), [`src/app/admin/actions.ts`](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/actions.ts) (Admin actions), [`src/app/admin/reports/page.tsx`](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/reports/page.tsx) (Reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_signup["Sign up<br/>[page.tsx]"]
  node_auth_context["Auth context<br/>[auth-provider.tsx]"]
  node_auth_service["Auth service<br/>[auth-service.ts]"]
  node_auth_actions["Auth actions<br/>[actions.ts]"]
  node_identity_store["Supabase auth<br/>[supabase.ts]"]
end

subgraph group_employee["Employee timekeeping"]
  node_employee_dashboard["Time dashboard<br/>[page.tsx]"]
  node_calendar["Shift calendar<br/>[page.tsx]"]
  node_summary["Hours summary<br/>[page.tsx]"]
  node_reminders["Reminder settings<br/>[page.tsx]"]
end

subgraph group_admin["Administration and oversight"]
  node_admin_dashboard["Admin dashboard<br/>[page.tsx]"]
  node_user_management["User management"]
  node_shift_editor["Shift editor"]
  node_admin_actions["Admin actions<br/>[actions.ts]"]
  node_reports["Reports<br/>[page.tsx]"]
  node_audit_pages["Audit history"]
end

subgraph group_services["Domain services"]
  node_time_service["Time service<br/>[time-service.ts]"]
  node_date_utils["Timezone utilities<br/>[date-utils.ts]"]
  node_time_store[("Time entries")]
  node_audit_service["Audit service<br/>[audit-service.ts]"]
  node_audit_store[("Audit logs")]
  node_reminder_function["Reminder sender<br/>[index.ts]"]
end

node_employee_actor(("Employee"))
node_admin_actor(("Administrator"))
node_supabase[("Supabase database")]

node_employee_actor -.->|"creates account"| node_signup
node_signup -->|"submits signup"| node_auth_context
node_auth_context -->|"delegates auth"| node_auth_service
node_auth_context -->|"loads profile"| node_auth_actions
node_auth_service -->|"auth and profile calls"| node_identity_store
node_employee_actor -.->|"tracks work"| node_employee_dashboard
node_employee_dashboard -.->|"uses timekeeping"| node_time_service
node_calendar -.->|"loads shift history"| node_time_service
node_summary -.->|"summarizes hours"| node_time_service
node_time_service -->|"calculates date ranges"| node_date_utils
node_time_service -->|"queries and updates"| node_supabase
node_supabase -.->|"persists entries"| node_time_store
node_admin_actor -.->|"oversees staff"| node_admin_dashboard
node_admin_dashboard -->|"loads admin data"| node_admin_actions
node_user_management -.->|"manages users"| node_admin_actions
node_reports -->|"requests report data"| node_admin_actions
node_reports -->|"uses time records"| node_time_service
node_reports -->|"uses audit history"| node_audit_service
node_shift_editor -->|"updates shift"| node_admin_actions
node_shift_editor -->|"records change"| node_audit_service
node_audit_pages -.->|"displays history"| node_audit_service
node_audit_service -->|"reads and writes logs"| node_supabase
node_supabase -.->|"persists audit trail"| node_audit_store
node_reminders -.->|"configures reminders"| node_reminder_function

click node_signup "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/signup/page.tsx"
click node_auth_context "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/components/auth-provider.tsx"
click node_auth_service "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/auth-service.ts"
click node_auth_actions "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/auth/actions.ts"
click node_identity_store "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/lib/supabase.ts"
click node_employee_dashboard "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/dashboard/page.tsx"
click node_calendar "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/calendar/page.tsx"
click node_summary "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/summary/page.tsx"
click node_reminders "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/reminders/page.tsx"
click node_time_service "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/time-service.ts"
click node_date_utils "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/lib/date-utils.ts"
click node_admin_dashboard "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/page.tsx"
click node_user_management "https://github.com/masadipradeeprao/time-tracker-app/tree/main/src/app/admin/users"
click node_shift_editor "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/components/admin/edit-session-dialog.tsx"
click node_admin_actions "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/actions.ts"
click node_reports "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/reports/page.tsx"
click node_audit_pages "https://github.com/masadipradeeprao/time-tracker-app/tree/main/src/app/(dashboard)/audit-logs"
click node_audit_service "https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/audit-service.ts"
click node_reminder_function "https://github.com/masadipradeeprao/time-tracker-app/blob/main/supabase/functions/send-reminders/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_signup,node_auth_context,node_auth_service,node_auth_actions,node_identity_store toneBlue
class node_employee_dashboard,node_calendar,node_summary,node_reminders,node_supabase toneAmber
class node_admin_dashboard,node_user_management,node_shift_editor,node_admin_actions,node_reports,node_audit_pages toneMint
class node_time_service,node_date_utils,node_time_store,node_audit_service,node_audit_store,node_reminder_function toneRose
class node_employee_actor,node_admin_actor toneIndigo
```

## Components

### Identity and access

- [Sign up](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/signup/page.tsx): `src/app/signup/page.tsx`
- [Auth context](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/components/auth-provider.tsx): `src/components/auth-provider.tsx`
- [Auth service](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/auth-service.ts): `src/services/auth-service.ts`
- [Auth actions](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/auth/actions.ts): `src/app/auth/actions.ts`
- [Supabase auth](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Employee timekeeping

- [Time dashboard](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/dashboard/page.tsx): `src/app/(dashboard)/dashboard/page.tsx`
- [Shift calendar](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/calendar/page.tsx): `src/app/(dashboard)/calendar/page.tsx`
- [Hours summary](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/summary/page.tsx): `src/app/(dashboard)/summary/page.tsx`
- [Reminder settings](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/(dashboard)/reminders/page.tsx): `src/app/(dashboard)/reminders/page.tsx`

### Administration and oversight

- [Admin dashboard](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [User management](https://github.com/masadipradeeprao/time-tracker-app/tree/main/src/app/admin/users): `src/app/admin/users`
- [Shift editor](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/components/admin/edit-session-dialog.tsx): `src/components/admin/edit-session-dialog.tsx`
- [Admin actions](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/actions.ts): `src/app/admin/actions.ts`
- [Reports](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/app/admin/reports/page.tsx): `src/app/admin/reports/page.tsx`
- [Audit history](https://github.com/masadipradeeprao/time-tracker-app/tree/main/src/app/(dashboard)/audit-logs): `src/app/(dashboard)/audit-logs`

### Domain services

- [Time service](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/time-service.ts): `src/services/time-service.ts`
- [Timezone utilities](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/lib/date-utils.ts): `src/lib/date-utils.ts`
- **Time entries**
- [Audit service](https://github.com/masadipradeeprao/time-tracker-app/blob/main/src/services/audit-service.ts): `src/services/audit-service.ts`
- **Audit logs**
- [Reminder sender](https://github.com/masadipradeeprao/time-tracker-app/blob/main/supabase/functions/send-reminders/index.ts): `supabase/functions/send-reminders/index.ts`

### Other components

- **Employee**
- **Administrator**
- **Supabase database**

## Connections

- Employee → Sign up: creates account
- Sign up → Auth context: submits signup (evidence: `src/app/signup/page.tsx`)
- Auth context → Auth service: delegates auth (evidence: `src/components/auth-provider.tsx`)
- Auth context → Auth actions: loads profile (evidence: `src/components/auth-provider.tsx`)
- Auth service → Supabase auth: auth and profile calls (evidence: `src/services/auth-service.ts`)
- Employee → Time dashboard: tracks work
- Time dashboard → Time service: uses timekeeping
- Shift calendar → Time service: loads shift history
- Hours summary → Time service: summarizes hours
- Time service → Timezone utilities: calculates date ranges (evidence: `src/services/time-service.ts`)
- Time service → Supabase database: queries and updates (evidence: `src/services/time-service.ts`)
- Supabase database → Time entries: persists entries
- Administrator → Admin dashboard: oversees staff
- Admin dashboard → Admin actions: loads admin data (evidence: `src/app/admin/page.tsx`)
- User management → Admin actions: manages users
- Reports → Admin actions: requests report data (evidence: `src/app/admin/reports/page.tsx`)
- Reports → Time service: uses time records (evidence: `src/app/admin/reports/page.tsx`)
- Reports → Audit service: uses audit history (evidence: `src/app/admin/reports/page.tsx`)
- Shift editor → Admin actions: updates shift (evidence: `src/components/admin/edit-session-dialog.tsx`)
- Shift editor → Audit service: records change (evidence: `src/components/admin/edit-session-dialog.tsx`)
- Audit history → Audit service: displays history
- Audit service → Supabase database: reads and writes logs (evidence: `src/services/audit-service.ts`)
- Supabase database → Audit logs: persists audit trail
- Reminder settings → Reminder sender: configures reminders
