# nobio/timetracker-ui2 architecture

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

- Interactive diagram: https://gitdiagram.com/nobio/timetracker-ui2
- Repository: https://github.com/nobio/timetracker-ui2

## Overview

This is a Next.js time-tracking frontend: a user signs in, then uses a dashboard for time entries and work summaries, geotracking, statistics, and settings/member administration. Route pages coordinate API-backed views; reusable map and chart components render domain data, while a typed API client handles requests and authentication refresh. The README provides no product-specific capability list, so the map follows the routes and features visible in the source index and excerpts; unsampled behavior is not expanded beyond those references.

Main entry points: [`src/lib/api/client.ts`](https://github.com/nobio/timetracker-ui2/blob/main/src/lib/api/client.ts) (API client), [`src/app/dashboard/statistics/page.tsx`](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/statistics/page.tsx) (Statistics route), [`src/app/dashboard/settings/page.tsx`](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/settings/page.tsx) (Settings route), [`src/components/members/GeotrackTab.tsx`](https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/GeotrackTab.tsx) (Geotrack controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["App routes"]
  node_login["Sign-in<br/>[page.tsx]"]
  node_dashlayout["Dashboard shell<br/>[layout.tsx]"]
  node_settings["Settings route<br/>[page.tsx]"]
  node_users["User administration<br/>[UsersTab.tsx]"]
end

subgraph group_tracking["Time and location"]
  node_home["Time dashboard<br/>[page.tsx]"]
  node_georoute["Geotracking route<br/>[page.tsx]"]
  node_geotab["Geotrack controls<br/>[GeotrackTab.tsx]"]
  node_geomap["Geotrack map<br/>[GeotrackMap.tsx]"]
  node_timemap["Time-entry map<br/>[Map.tsx]"]
end

subgraph group_insights["Statistics"]
  node_statsroute["Statistics route<br/>[page.tsx]"]
  node_aggregate["Aggregate chart<br/>[AggregateChart.tsx]"]
  node_breaktime["Break-time chart<br/>[BreaktimeChart.tsx]"]
  node_comego["Come/go chart<br/>[ComeGoChart.tsx]"]
  node_extrahours["Extra-hours chart"]
end

subgraph group_foundation["API and shared UI"]
  node_client["API client<br/>[client.ts]"]
  node_schema["API schema<br/>[schema.ts]"]
  node_theme["Theme switcher<br/>[ThemeSwitcher.tsx]"]
  node_providers["App providers<br/>[providers.tsx]"]
end

node_user(("User"))
node_backend(("Time-tracking API"))

node_user -->|"signs in"| node_login
node_login -->|"submits credentials"| node_client
node_client -->|"sends API requests"| node_backend
node_dashlayout -->|"loads dashboard data"| node_client
node_dashlayout -->|"renders switcher"| node_theme
node_home -->|"reads and updates entries"| node_client
node_home -->|"renders locations"| node_timemap
node_georoute -->|"renders controls"| node_geotab
node_geotab -->|"fetches geotracking"| node_client
node_geotab -->|"renders points"| node_geomap
node_settings -->|"loads settings"| node_client
node_settings -->|"renders administration"| node_users
node_users -->|"manages users"| node_client
node_settings -->|"renders switcher"| node_theme
node_statsroute -->|"selects chart"| node_aggregate
node_statsroute -->|"selects chart"| node_breaktime
node_statsroute -->|"selects chart"| node_comego
node_statsroute -->|"selects chart"| node_extrahours
node_aggregate -->|"queries statistics"| node_client
node_breaktime -->|"queries statistics"| node_client
node_comego -->|"queries statistics"| node_client
node_extrahours -->|"queries statistics"| node_client
node_client -->|"uses types"| node_schema
node_providers -.->|"provides theme context"| node_theme

click node_login "https://github.com/nobio/timetracker-ui2/blob/main/src/app/page.tsx"
click node_dashlayout "https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/layout.tsx"
click node_home "https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/page.tsx"
click node_georoute "https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/geotracking/page.tsx"
click node_settings "https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/settings/page.tsx"
click node_users "https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/UsersTab.tsx"
click node_geotab "https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/GeotrackTab.tsx"
click node_geomap "https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/GeotrackMap.tsx"
click node_timemap "https://github.com/nobio/timetracker-ui2/blob/main/src/components/Map.tsx"
click node_statsroute "https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/statistics/page.tsx"
click node_aggregate "https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/AggregateChart.tsx"
click node_breaktime "https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/BreaktimeChart.tsx"
click node_comego "https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/ComeGoChart.tsx"
click node_extrahours "https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/ExtraHoursChart.tsx"
click node_client "https://github.com/nobio/timetracker-ui2/blob/main/src/lib/api/client.ts"
click node_schema "https://github.com/nobio/timetracker-ui2/blob/main/src/lib/api/schema.ts"
click node_theme "https://github.com/nobio/timetracker-ui2/blob/main/src/components/ThemeSwitcher.tsx"
click node_providers "https://github.com/nobio/timetracker-ui2/blob/main/src/components/providers.tsx"

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_login,node_dashlayout,node_settings,node_users,node_user toneBlue
class node_home,node_georoute,node_geotab,node_geomap,node_timemap toneAmber
class node_statsroute,node_aggregate,node_breaktime,node_comego,node_extrahours,node_backend toneMint
class node_client,node_schema,node_theme,node_providers toneRose
```

## Components

### App routes

- [Sign-in](https://github.com/nobio/timetracker-ui2/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Dashboard shell](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/layout.tsx): `src/app/dashboard/layout.tsx`
- [Settings route](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/settings/page.tsx): `src/app/dashboard/settings/page.tsx`
- [User administration](https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/UsersTab.tsx): `src/components/members/UsersTab.tsx`

### Time and location

- [Time dashboard](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Geotracking route](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/geotracking/page.tsx): `src/app/dashboard/geotracking/page.tsx`
- [Geotrack controls](https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/GeotrackTab.tsx): `src/components/members/GeotrackTab.tsx`
- [Geotrack map](https://github.com/nobio/timetracker-ui2/blob/main/src/components/members/GeotrackMap.tsx): `src/components/members/GeotrackMap.tsx`
- [Time-entry map](https://github.com/nobio/timetracker-ui2/blob/main/src/components/Map.tsx): `src/components/Map.tsx`

### Statistics

- [Statistics route](https://github.com/nobio/timetracker-ui2/blob/main/src/app/dashboard/statistics/page.tsx): `src/app/dashboard/statistics/page.tsx`
- [Aggregate chart](https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/AggregateChart.tsx): `src/components/statistics/AggregateChart.tsx`
- [Break-time chart](https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/BreaktimeChart.tsx): `src/components/statistics/BreaktimeChart.tsx`
- [Come/go chart](https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/ComeGoChart.tsx): `src/components/statistics/ComeGoChart.tsx`
- [Extra-hours chart](https://github.com/nobio/timetracker-ui2/blob/main/src/components/statistics/ExtraHoursChart.tsx): `src/components/statistics/ExtraHoursChart.tsx`

### API and shared UI

- [API client](https://github.com/nobio/timetracker-ui2/blob/main/src/lib/api/client.ts): `src/lib/api/client.ts`
- [API schema](https://github.com/nobio/timetracker-ui2/blob/main/src/lib/api/schema.ts): `src/lib/api/schema.ts`
- [Theme switcher](https://github.com/nobio/timetracker-ui2/blob/main/src/components/ThemeSwitcher.tsx): `src/components/ThemeSwitcher.tsx`
- [App providers](https://github.com/nobio/timetracker-ui2/blob/main/src/components/providers.tsx): `src/components/providers.tsx`

### Other components

- **User**
- **Time-tracking API**

## Connections

- User → Sign-in: signs in (evidence: `src/app/page.tsx`)
- Sign-in → API client: submits credentials (evidence: `src/app/page.tsx`)
- API client → Time-tracking API: sends API requests (evidence: `src/lib/api/client.ts`)
- Dashboard shell → API client: loads dashboard data (evidence: `src/app/dashboard/layout.tsx`)
- Dashboard shell → Theme switcher: renders switcher (evidence: `src/app/dashboard/layout.tsx`)
- Time dashboard → API client: reads and updates entries (evidence: `src/app/dashboard/page.tsx`)
- Time dashboard → Time-entry map: renders locations (evidence: `src/app/dashboard/page.tsx`)
- Geotracking route → Geotrack controls: renders controls (evidence: `src/app/dashboard/geotracking/page.tsx`)
- Geotrack controls → API client: fetches geotracking (evidence: `src/components/members/GeotrackTab.tsx`)
- Geotrack controls → Geotrack map: renders points (evidence: `src/components/members/GeotrackTab.tsx`)
- Settings route → API client: loads settings (evidence: `src/app/dashboard/settings/page.tsx`)
- Settings route → User administration: renders administration (evidence: `src/app/dashboard/settings/page.tsx`)
- User administration → API client: manages users (evidence: `src/components/members/UsersTab.tsx`)
- Settings route → Theme switcher: renders switcher (evidence: `src/app/dashboard/settings/page.tsx`)
- Statistics route → Aggregate chart: selects chart (evidence: `src/app/dashboard/statistics/page.tsx`)
- Statistics route → Break-time chart: selects chart (evidence: `src/app/dashboard/statistics/page.tsx`)
- Statistics route → Come/go chart: selects chart (evidence: `src/app/dashboard/statistics/page.tsx`)
- Statistics route → Extra-hours chart: selects chart (evidence: `src/app/dashboard/statistics/page.tsx`)
- Aggregate chart → API client: queries statistics (evidence: `src/components/statistics/AggregateChart.tsx`)
- Break-time chart → API client: queries statistics (evidence: `src/components/statistics/BreaktimeChart.tsx`)
- Come/go chart → API client: queries statistics (evidence: `src/components/statistics/ComeGoChart.tsx`)
- Extra-hours chart → API client: queries statistics (evidence: `src/components/statistics/ExtraHoursChart.tsx`)
- API client → API schema: uses types (evidence: `src/lib/api/client.ts`)
- App providers → Theme switcher: provides theme context
