# tunsopheak/sameakki architecture

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

- Interactive diagram: https://gitdiagram.com/tunsopheak/sameakki
- Repository: https://github.com/tunsopheak/sameakki

## Overview

Sameakki is a bilingual team and task tracker. Leaders create groups, add members, assign and review work; members post daily ToDos, update task progress, and interact through comments and notifications. The client presents these workflows and sends requests through the API; server routes enforce access and persist results. The map also includes the documented import, streak, admin, timeline, and optional Telegram capabilities. Relationship evidence is limited to the supplied README and source excerpts/index; unsampled internals are not assumed.

Main entry points: [`client/src/App.tsx`](https://github.com/tunsopheak/sameakki/blob/main/client/src/App.tsx) (App shell), [`server/routes/tasks.ts`](https://github.com/tunsopheak/sameakki/blob/main/server/routes/tasks.ts) (Task workflow), [`server/routes/dailyLogs.ts`](https://github.com/tunsopheak/sameakki/blob/main/server/routes/dailyLogs.ts) (Daily log API), [`client/src/lib/api.ts`](https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_context["App state<br/>[AppContext.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_workflows["Team workflows"]
  node_taskboard["Task board<br/>[TaskBoard.tsx]"]
  node_daily["Daily ToDo"]
  node_dailyfeed["Daily feed<br/>[DailyFeed.tsx]"]
  node_overview["Overview"]
  node_timeline["Task timeline<br/>[TimelineView.tsx]"]
  node_import["Task import"]
end

subgraph group_server["API and services"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_groupsroute["Group management<br/>[groups.ts]"]
  node_tasksroute["Task workflow<br/>[tasks.ts]"]
  node_dailyroute["Daily log API<br/>[dailyLogs.ts]"]
  node_commentsroute["Comments API<br/>[comments.ts]"]
  node_streakroute["Streaks and pokes<br/>[streaks.ts]"]
  node_notifications["Notifications<br/>[notifications.ts]"]
  node_telegram["Telegram delivery<br/>[telegram.ts]"]
  node_adminroute["Admin API<br/>[admin.ts]"]
  node_access["Access control<br/>[access.ts]"]
  node_activity["Activity history<br/>[activity.ts]"]
  node_mappers["Data mapping<br/>[mappers.ts]"]
  node_plan["Plan limits<br/>[plan.ts]"]
  node_time["Time rules<br/>[time.ts]"]
  node_validation["Request validation<br/>[validation.ts]"]
end

subgraph group_state["Shared rules and data"]
  node_db[("Application database<br/>[index.ts]")]
  node_parser["Daily log parser<br/>[dailyLogParser.ts]"]
  node_taskimport["Import rules<br/>[taskImport.ts]"]
  node_streakrules["Streak rules<br/>[streak.ts]"]
  node_filters["Task filters<br/>[taskFilters.ts]"]
  node_dates["Date utilities<br/>[dates.ts]"]
end

subgraph group_admin["Administration"]
  node_adminui["Super Admin<br/>[AdminOverview.tsx]"]
end

node_user(("Team user"))

node_user -->|"uses"| node_app
node_app -->|"provides state"| node_context
node_context -->|"requests data"| node_api
node_api -.->|"sends requests"| node_auth
node_api -.->|"sends requests"| node_groupsroute
node_api -.->|"sends task requests"| node_tasksroute
node_api -.->|"sends log requests"| node_dailyroute
node_app -->|"renders"| node_taskboard
node_app -->|"renders"| node_daily
node_app -->|"renders"| node_dailyfeed
node_app -->|"renders"| node_overview
node_taskboard -.->|"filters tasks"| node_filters
node_user -->|"updates progress"| node_taskboard
node_user -->|"writes ToDo"| node_daily
node_daily -->|"previews entry"| node_parser
node_dailyroute -->|"parses logs"| node_parser
node_taskboard -.->|"opens timeline"| node_timeline
node_user -->|"imports tasks"| node_import
node_import -->|"validates rows"| node_taskimport
node_context -->|"submits import"| node_taskimport
node_user -->|"manages groups"| node_groupsroute
node_user -->|"comments"| node_commentsroute
node_user -->|"pokes members"| node_streakroute
node_streakroute -->|"notifies"| node_notifications
node_dailyroute -->|"notifies"| node_notifications
node_tasksroute -->|"notifies"| node_notifications
node_notifications -->|"sends messages"| node_telegram
node_user -->|"administers accounts"| node_adminui
node_adminui -.->|"manages accounts"| node_adminroute
node_tasksroute -->|"checks permissions"| node_access
node_tasksroute -->|"records events"| node_activity
node_dailyroute -->|"records events"| node_activity
node_tasksroute -->|"reads and writes"| node_db
node_dailyroute -->|"reads and writes"| node_db
node_groupsroute -->|"reads and writes"| node_db
node_auth -->|"checks account"| node_db
node_auth -->|"maps user"| node_mappers
node_auth -->|"checks plan"| node_plan
node_tasksroute -->|"validates input"| node_validation
node_dailyroute -->|"uses time rules"| node_time
node_streakroute -.->|"calculates streaks"| node_streakrules
node_overview -.->|"shows streak ranking"| node_streakrules
node_taskboard -->|"uses dates"| node_dates

click node_app "https://github.com/tunsopheak/sameakki/blob/main/client/src/App.tsx"
click node_context "https://github.com/tunsopheak/sameakki/blob/main/client/src/context/AppContext.tsx"
click node_api "https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/api.ts"
click node_taskboard "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/TaskBoard.tsx"
click node_daily "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/DailyStandupBox.tsx"
click node_dailyfeed "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/DailyFeed.tsx"
click node_overview "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/OverviewDashboard.tsx"
click node_timeline "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/timeline/TimelineView.tsx"
click node_import "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/ImportTasksModal.tsx"
click node_auth "https://github.com/tunsopheak/sameakki/blob/main/server/routes/auth.ts"
click node_groupsroute "https://github.com/tunsopheak/sameakki/blob/main/server/routes/groups.ts"
click node_tasksroute "https://github.com/tunsopheak/sameakki/blob/main/server/routes/tasks.ts"
click node_dailyroute "https://github.com/tunsopheak/sameakki/blob/main/server/routes/dailyLogs.ts"
click node_commentsroute "https://github.com/tunsopheak/sameakki/blob/main/server/routes/comments.ts"
click node_streakroute "https://github.com/tunsopheak/sameakki/blob/main/server/routes/streaks.ts"
click node_notifications "https://github.com/tunsopheak/sameakki/blob/main/server/services/notifications.ts"
click node_telegram "https://github.com/tunsopheak/sameakki/blob/main/server/services/telegram.ts"
click node_adminui "https://github.com/tunsopheak/sameakki/blob/main/client/src/components/AdminOverview.tsx"
click node_adminroute "https://github.com/tunsopheak/sameakki/blob/main/server/routes/admin.ts"
click node_access "https://github.com/tunsopheak/sameakki/blob/main/server/services/access.ts"
click node_activity "https://github.com/tunsopheak/sameakki/blob/main/server/services/activity.ts"
click node_db "https://github.com/tunsopheak/sameakki/blob/main/server/db/index.ts"
click node_parser "https://github.com/tunsopheak/sameakki/blob/main/shared/dailyLogParser.ts"
click node_taskimport "https://github.com/tunsopheak/sameakki/blob/main/shared/taskImport.ts"
click node_streakrules "https://github.com/tunsopheak/sameakki/blob/main/shared/streak.ts"
click node_filters "https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/taskFilters.ts"
click node_dates "https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/dates.ts"
click node_mappers "https://github.com/tunsopheak/sameakki/blob/main/server/services/mappers.ts"
click node_plan "https://github.com/tunsopheak/sameakki/blob/main/server/services/plan.ts"
click node_time "https://github.com/tunsopheak/sameakki/blob/main/server/services/time.ts"
click node_validation "https://github.com/tunsopheak/sameakki/blob/main/server/services/validation.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_context,node_api,node_user toneBlue
class node_taskboard,node_daily,node_dailyfeed,node_overview,node_timeline,node_import toneAmber
class node_auth,node_groupsroute,node_tasksroute,node_dailyroute,node_commentsroute,node_streakroute,node_notifications,node_telegram,node_adminroute,node_access,node_activity,node_mappers,node_plan,node_time,node_validation toneMint
class node_db,node_parser,node_taskimport,node_streakrules,node_filters,node_dates toneRose
class node_adminui toneIndigo
```

## Components

### Client experience

- [App shell](https://github.com/tunsopheak/sameakki/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [App state](https://github.com/tunsopheak/sameakki/blob/main/client/src/context/AppContext.tsx): `client/src/context/AppContext.tsx`
- [API client](https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/api.ts): `client/src/lib/api.ts`

### Team workflows

- [Task board](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/TaskBoard.tsx): `client/src/components/TaskBoard.tsx`
- [Daily ToDo](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/DailyStandupBox.tsx): `client/src/components/DailyStandupBox.tsx`
- [Daily feed](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/DailyFeed.tsx): `client/src/components/DailyFeed.tsx`
- [Overview](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/OverviewDashboard.tsx): `client/src/components/OverviewDashboard.tsx`
- [Task timeline](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/timeline/TimelineView.tsx): `client/src/components/timeline/TimelineView.tsx`
- [Task import](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/ImportTasksModal.tsx): `client/src/components/ImportTasksModal.tsx`

### API and services

- [Authentication](https://github.com/tunsopheak/sameakki/blob/main/server/routes/auth.ts): `server/routes/auth.ts`
- [Group management](https://github.com/tunsopheak/sameakki/blob/main/server/routes/groups.ts): `server/routes/groups.ts`
- [Task workflow](https://github.com/tunsopheak/sameakki/blob/main/server/routes/tasks.ts): `server/routes/tasks.ts`
- [Daily log API](https://github.com/tunsopheak/sameakki/blob/main/server/routes/dailyLogs.ts): `server/routes/dailyLogs.ts`
- [Comments API](https://github.com/tunsopheak/sameakki/blob/main/server/routes/comments.ts): `server/routes/comments.ts`
- [Streaks and pokes](https://github.com/tunsopheak/sameakki/blob/main/server/routes/streaks.ts): `server/routes/streaks.ts`
- [Notifications](https://github.com/tunsopheak/sameakki/blob/main/server/services/notifications.ts): `server/services/notifications.ts`
- [Telegram delivery](https://github.com/tunsopheak/sameakki/blob/main/server/services/telegram.ts): `server/services/telegram.ts`
- [Admin API](https://github.com/tunsopheak/sameakki/blob/main/server/routes/admin.ts): `server/routes/admin.ts`
- [Access control](https://github.com/tunsopheak/sameakki/blob/main/server/services/access.ts): `server/services/access.ts`
- [Activity history](https://github.com/tunsopheak/sameakki/blob/main/server/services/activity.ts): `server/services/activity.ts`
- [Data mapping](https://github.com/tunsopheak/sameakki/blob/main/server/services/mappers.ts): `server/services/mappers.ts`
- [Plan limits](https://github.com/tunsopheak/sameakki/blob/main/server/services/plan.ts): `server/services/plan.ts`
- [Time rules](https://github.com/tunsopheak/sameakki/blob/main/server/services/time.ts): `server/services/time.ts`
- [Request validation](https://github.com/tunsopheak/sameakki/blob/main/server/services/validation.ts): `server/services/validation.ts`

### Shared rules and data

- [Application database](https://github.com/tunsopheak/sameakki/blob/main/server/db/index.ts): `server/db/index.ts`
- [Daily log parser](https://github.com/tunsopheak/sameakki/blob/main/shared/dailyLogParser.ts): `shared/dailyLogParser.ts`
- [Import rules](https://github.com/tunsopheak/sameakki/blob/main/shared/taskImport.ts): `shared/taskImport.ts`
- [Streak rules](https://github.com/tunsopheak/sameakki/blob/main/shared/streak.ts): `shared/streak.ts`
- [Task filters](https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/taskFilters.ts): `client/src/lib/taskFilters.ts`
- [Date utilities](https://github.com/tunsopheak/sameakki/blob/main/client/src/lib/dates.ts): `client/src/lib/dates.ts`

### Administration

- [Super Admin](https://github.com/tunsopheak/sameakki/blob/main/client/src/components/AdminOverview.tsx): `client/src/components/AdminOverview.tsx`

### Other components

- **Team user**

## Connections

- Team user → App shell: uses (evidence: `README.md`)
- App shell → App state: provides state (evidence: `client/src/App.tsx`)
- App state → API client: requests data (evidence: `client/src/context/AppContext.tsx`)
- API client → Authentication: sends requests
- API client → Group management: sends requests
- API client → Task workflow: sends task requests
- API client → Daily log API: sends log requests
- App shell → Task board: renders
- App shell → Daily ToDo: renders (evidence: `client/src/App.tsx`)
- App shell → Daily feed: renders (evidence: `client/src/App.tsx`)
- App shell → Overview: renders (evidence: `client/src/App.tsx`)
- Task board → Task filters: filters tasks (evidence: `README.md`)
- Team user → Task board: updates progress (evidence: `README.md`)
- Team user → Daily ToDo: writes ToDo (evidence: `README.md`)
- Daily ToDo → Daily log parser: previews entry (evidence: `README.md`)
- Daily log API → Daily log parser: parses logs (evidence: `server/routes/dailyLogs.ts`)
- Task board → Task timeline: opens timeline (evidence: `client/src/components/TasksTab.tsx`)
- Team user → Task import: imports tasks (evidence: `README.md`)
- Task import → Import rules: validates rows (evidence: `README.md`)
- App state → Import rules: submits import (evidence: `client/src/context/AppContext.tsx`)
- Team user → Group management: manages groups (evidence: `README.md`)
- Team user → Comments API: comments (evidence: `README.md`)
- Team user → Streaks and pokes: pokes members (evidence: `README.md`)
- Streaks and pokes → Notifications: notifies (evidence: `README.md`)
- Daily log API → Notifications: notifies (evidence: `server/routes/dailyLogs.ts`)
- Task workflow → Notifications: notifies (evidence: `server/routes/tasks.ts`)
- Notifications → Telegram delivery: sends messages (evidence: `server/services/notifications.ts`)
- Team user → Super Admin: administers accounts (evidence: `README.md`)
- Super Admin → Admin API: manages accounts (evidence: `client/src/components/AdminOverview.tsx`)
- Task workflow → Access control: checks permissions (evidence: `server/routes/tasks.ts`)
- Task workflow → Activity history: records events (evidence: `server/routes/tasks.ts`)
- Daily log API → Activity history: records events (evidence: `server/routes/dailyLogs.ts`)
- Task workflow → Application database: reads and writes (evidence: `server/routes/tasks.ts`)
- Daily log API → Application database: reads and writes (evidence: `server/routes/dailyLogs.ts`)
- Group management → Application database: reads and writes (evidence: `server/routes/groups.ts`)
- Authentication → Application database: checks account (evidence: `server/routes/auth.ts`)
- Authentication → Data mapping: maps user (evidence: `server/routes/auth.ts`)
- Authentication → Plan limits: checks plan (evidence: `server/routes/auth.ts`)
- Task workflow → Request validation: validates input (evidence: `server/routes/tasks.ts`)
- Daily log API → Time rules: uses time rules (evidence: `server/routes/dailyLogs.ts`)
- Streaks and pokes → Streak rules: calculates streaks (evidence: `README.md`)
- Overview → Streak rules: shows streak ranking (evidence: `README.md`)
- Task board → Date utilities: uses dates
