# hemanthkumargt/startby architecture

> Architecture diagram of the GitHub repository hemanthkumargt/startby, 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/hemanthkumargt/startby
- Repository: https://github.com/hemanthkumargt/startby

## Overview

StartBy is a Flask task-management web app. The main workflow is a signed-in user creating and managing tasks, then viewing dashboard status and due dates; optional estimates add start-by risk guidance and reminders. Routes delegate business rules to services, which use SQL repositories over SQLite. The README documents additional capture, voice, calendar, analytics, backup, and monitoring capabilities. Some of those branches are represented from documentation because their source was not sampled; edges are limited to documented or indexed relationships.

Main entry points: [`app/services/task_service.py`](https://github.com/hemanthkumargt/startby/blob/main/app/services/task_service.py) (Task rules), [`app/db.py`](https://github.com/hemanthkumargt/startby/blob/main/app/db.py) (SQLite), [`app/services/reminder_service.py`](https://github.com/hemanthkumargt/startby/blob/main/app/services/reminder_service.py) (Reminder sweep), [`app/services/capture_service.py`](https://github.com/hemanthkumargt/startby/blob/main/app/services/capture_service.py) (Smart capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_browser["Web UI"]
  node_auth_routes["Auth routes<br/>[auth.py]"]
  node_task_routes["Task routes<br/>[tasks.py]"]
  node_capture_routes["Capture routes<br/>[capture.py]"]
  node_voice_routes["Voice routes<br/>[voice.py]"]
  node_voice_note_routes["Voice note routes<br/>[voice_notes.py]"]
  node_calendar_routes["Calendar routes<br/>[calendar.py]"]
  node_insights_routes["Insights routes<br/>[insights.py]"]
  node_reminder_routes["Reminder cron<br/>[cron.py]"]
end

subgraph group_core["Task domain"]
  node_task_service["Task rules<br/>[task_service.py]"]
  node_estimate_service["Estimates and risk"]
  node_activity_service["Activity history"]
  node_reminder_service["Reminder sweep"]
end

subgraph group_support["User workflows"]
  node_capture_service["Smart capture<br/>[capture_service.py]"]
  node_assistant_service["Voice assistant"]
  node_briefing_service["Daily briefing"]
  node_voice_note_service["Voice notes"]
  node_calendar_service["Calendar sync"]
  node_insights_service["Overload insights"]
  node_auth_service["Authentication rules<br/>[auth_service.py]"]
  node_backup["Nightly backup<br/>[backup_service.py]"]
end

subgraph group_platform["Persistence and integrations"]
  node_task_repo["Task repository<br/>[task_repo.py]"]
  node_reminder_repo["Reminder repository<br/>[reminder_repo.py]"]
  node_activity_repo["Activity repository<br/>[activity_repo.py]"]
  node_user_repo["User repository<br/>[user_repo.py]"]
  node_calendar_repo["Calendar repository<br/>[calendar_repo.py]"]
  node_sqlite[("SQLite<br/>[db.py]")]
end

node_user(("User"))
node_email["Email service"]
node_gemini["Gemini API"]
node_google_calendar["Google Calendar API"]
node_gcp_tasks["Cloud Tasks<br/>[cloudtasks.py]"]
node_analytics["Pub/Sub and BigQuery<br/>[pubsub.py]"]
node_storage["Cloud Storage<br/>[storage.py]"]

node_user -->|"uses"| node_browser
node_browser -->|"sends task requests"| node_task_routes
node_browser -->|"sends auth requests"| node_auth_routes
node_task_routes -->|"delegates to"| node_task_service
node_auth_routes -->|"delegates to"| node_auth_service
node_task_service -->|"reads and writes"| node_task_repo
node_task_service -->|"clears reminders"| node_reminder_repo
node_task_service -->|"records changes"| node_activity_service
node_task_service -->|"calculates risk"| node_estimate_service
node_activity_service -->|"records activity"| node_activity_repo
node_auth_service -->|"reads and writes"| node_user_repo
node_reminder_routes -->|"runs sweep"| node_reminder_service
node_reminder_service -->|"finds candidates"| node_reminder_repo
node_reminder_service -->|"reads tasks"| node_task_repo
node_reminder_service -->|"computes start times"| node_estimate_service
node_reminder_service -->|"sends notices"| node_email
node_capture_routes -.->|"handles capture"| node_capture_service
node_capture_service -->|"extracts text"| node_gemini
node_capture_service -->|"creates draft tasks"| node_task_service
node_voice_routes -.->|"handles questions"| node_assistant_service
node_voice_routes -.->|"builds briefing"| node_briefing_service
node_voice_routes -->|"transcribes audio"| node_gemini
node_voice_note_routes -.->|"manages notes"| node_voice_note_service
node_voice_note_service -->|"hands off note"| node_capture_service
node_calendar_routes -->|"delegates to"| node_calendar_service
node_calendar_service -->|"reads and writes links"| node_calendar_repo
node_calendar_service -->|"syncs events"| node_google_calendar
node_insights_routes -.->|"requests insights"| node_insights_service
node_task_repo -->|"queries"| node_sqlite
node_reminder_repo -->|"queries"| node_sqlite
node_user_repo -->|"queries"| node_sqlite
node_calendar_repo -->|"queries"| node_sqlite
node_activity_repo -->|"queries"| node_sqlite
node_task_service -.->|"schedules start reminders"| node_gcp_tasks
node_task_service -.->|"publishes task events"| node_analytics
node_backup -->|"snapshots"| node_sqlite
node_backup -->|"stores backup"| node_storage

click node_browser "https://github.com/hemanthkumargt/startby/tree/main/app/static/js"
click node_auth_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/auth.py"
click node_task_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/tasks.py"
click node_capture_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/capture.py"
click node_voice_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/voice.py"
click node_voice_note_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/voice_notes.py"
click node_calendar_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/calendar.py"
click node_insights_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/insights.py"
click node_task_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/task_service.py"
click node_estimate_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/estimate_service.py"
click node_activity_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/activity_service.py"
click node_reminder_routes "https://github.com/hemanthkumargt/startby/blob/main/app/routes/cron.py"
click node_reminder_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/reminder_service.py"
click node_capture_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/capture_service.py"
click node_assistant_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/assistant_service.py"
click node_briefing_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/briefing_service.py"
click node_voice_note_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/voice_note_service.py"
click node_calendar_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/calendar_service.py"
click node_insights_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/insights_service.py"
click node_auth_service "https://github.com/hemanthkumargt/startby/blob/main/app/services/auth_service.py"
click node_task_repo "https://github.com/hemanthkumargt/startby/blob/main/app/repositories/task_repo.py"
click node_reminder_repo "https://github.com/hemanthkumargt/startby/blob/main/app/repositories/reminder_repo.py"
click node_activity_repo "https://github.com/hemanthkumargt/startby/blob/main/app/repositories/activity_repo.py"
click node_user_repo "https://github.com/hemanthkumargt/startby/blob/main/app/repositories/user_repo.py"
click node_calendar_repo "https://github.com/hemanthkumargt/startby/blob/main/app/repositories/calendar_repo.py"
click node_sqlite "https://github.com/hemanthkumargt/startby/blob/main/app/db.py"
click node_gcp_tasks "https://github.com/hemanthkumargt/startby/blob/main/app/gcp/cloudtasks.py"
click node_analytics "https://github.com/hemanthkumargt/startby/blob/main/app/gcp/pubsub.py"
click node_storage "https://github.com/hemanthkumargt/startby/blob/main/app/gcp/storage.py"
click node_backup "https://github.com/hemanthkumargt/startby/blob/main/app/services/backup_service.py"

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_browser,node_auth_routes,node_task_routes,node_capture_routes,node_voice_routes,node_voice_note_routes,node_calendar_routes,node_insights_routes,node_reminder_routes,node_user toneBlue
class node_task_service,node_estimate_service,node_activity_service,node_reminder_service,node_storage toneAmber
class node_capture_service,node_assistant_service,node_briefing_service,node_voice_note_service,node_calendar_service,node_insights_service,node_auth_service,node_backup,node_gemini,node_google_calendar toneMint
class node_task_repo,node_reminder_repo,node_activity_repo,node_user_repo,node_calendar_repo,node_sqlite,node_gcp_tasks toneRose
class node_email toneIndigo
class node_analytics toneTeal
```

## Components

### Web experience

- [Web UI](https://github.com/hemanthkumargt/startby/tree/main/app/static/js): `app/static/js`
- [Auth routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/auth.py): `app/routes/auth.py`
- [Task routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/tasks.py): `app/routes/tasks.py`
- [Capture routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/capture.py): `app/routes/capture.py`
- [Voice routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/voice.py): `app/routes/voice.py`
- [Voice note routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/voice_notes.py): `app/routes/voice_notes.py`
- [Calendar routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/calendar.py): `app/routes/calendar.py`
- [Insights routes](https://github.com/hemanthkumargt/startby/blob/main/app/routes/insights.py): `app/routes/insights.py`
- [Reminder cron](https://github.com/hemanthkumargt/startby/blob/main/app/routes/cron.py): `app/routes/cron.py`

### Task domain

- [Task rules](https://github.com/hemanthkumargt/startby/blob/main/app/services/task_service.py): `app/services/task_service.py`
- [Estimates and risk](https://github.com/hemanthkumargt/startby/blob/main/app/services/estimate_service.py): `app/services/estimate_service.py`
- [Activity history](https://github.com/hemanthkumargt/startby/blob/main/app/services/activity_service.py): `app/services/activity_service.py`
- [Reminder sweep](https://github.com/hemanthkumargt/startby/blob/main/app/services/reminder_service.py): `app/services/reminder_service.py`

### User workflows

- [Smart capture](https://github.com/hemanthkumargt/startby/blob/main/app/services/capture_service.py): `app/services/capture_service.py`
- [Voice assistant](https://github.com/hemanthkumargt/startby/blob/main/app/services/assistant_service.py): `app/services/assistant_service.py`
- [Daily briefing](https://github.com/hemanthkumargt/startby/blob/main/app/services/briefing_service.py): `app/services/briefing_service.py`
- [Voice notes](https://github.com/hemanthkumargt/startby/blob/main/app/services/voice_note_service.py): `app/services/voice_note_service.py`
- [Calendar sync](https://github.com/hemanthkumargt/startby/blob/main/app/services/calendar_service.py): `app/services/calendar_service.py`
- [Overload insights](https://github.com/hemanthkumargt/startby/blob/main/app/services/insights_service.py): `app/services/insights_service.py`
- [Authentication rules](https://github.com/hemanthkumargt/startby/blob/main/app/services/auth_service.py): `app/services/auth_service.py`
- [Nightly backup](https://github.com/hemanthkumargt/startby/blob/main/app/services/backup_service.py): `app/services/backup_service.py`

### Persistence and integrations

- [Task repository](https://github.com/hemanthkumargt/startby/blob/main/app/repositories/task_repo.py): `app/repositories/task_repo.py`
- [Reminder repository](https://github.com/hemanthkumargt/startby/blob/main/app/repositories/reminder_repo.py): `app/repositories/reminder_repo.py`
- [Activity repository](https://github.com/hemanthkumargt/startby/blob/main/app/repositories/activity_repo.py): `app/repositories/activity_repo.py`
- [User repository](https://github.com/hemanthkumargt/startby/blob/main/app/repositories/user_repo.py): `app/repositories/user_repo.py`
- [Calendar repository](https://github.com/hemanthkumargt/startby/blob/main/app/repositories/calendar_repo.py): `app/repositories/calendar_repo.py`
- [SQLite](https://github.com/hemanthkumargt/startby/blob/main/app/db.py): `app/db.py`

### Other components

- **User**
- **Email service**
- **Gemini API**
- **Google Calendar API**
- [Cloud Tasks](https://github.com/hemanthkumargt/startby/blob/main/app/gcp/cloudtasks.py): `app/gcp/cloudtasks.py`
- [Pub/Sub and BigQuery](https://github.com/hemanthkumargt/startby/blob/main/app/gcp/pubsub.py): `app/gcp/pubsub.py`
- [Cloud Storage](https://github.com/hemanthkumargt/startby/blob/main/app/gcp/storage.py): `app/gcp/storage.py`

## Connections

- User → Web UI: uses (evidence: `README.md`)
- Web UI → Task routes: sends task requests (evidence: `README.md`)
- Web UI → Auth routes: sends auth requests (evidence: `README.md`)
- Task routes → Task rules: delegates to (evidence: `app/routes/tasks.py`)
- Auth routes → Authentication rules: delegates to (evidence: `app/routes/auth.py`)
- Task rules → Task repository: reads and writes (evidence: `app/services/task_service.py`)
- Task rules → Reminder repository: clears reminders (evidence: `app/services/task_service.py`)
- Task rules → Activity history: records changes (evidence: `app/services/task_service.py`)
- Task rules → Estimates and risk: calculates risk (evidence: `app/services/task_service.py`)
- Activity history → Activity repository: records activity (evidence: `app/services/activity_service.py`)
- Authentication rules → User repository: reads and writes (evidence: `app/services/auth_service.py`)
- Reminder cron → Reminder sweep: runs sweep (evidence: `app/routes/cron.py`)
- Reminder sweep → Reminder repository: finds candidates (evidence: `app/services/reminder_service.py`)
- Reminder sweep → Task repository: reads tasks (evidence: `app/services/reminder_service.py`)
- Reminder sweep → Estimates and risk: computes start times (evidence: `app/services/reminder_service.py`)
- Reminder sweep → Email service: sends notices (evidence: `README.md`)
- Capture routes → Smart capture: handles capture
- Smart capture → Gemini API: extracts text (evidence: `README.md`)
- Smart capture → Task rules: creates draft tasks (evidence: `app/services/capture_service.py`)
- Voice routes → Voice assistant: handles questions
- Voice routes → Daily briefing: builds briefing
- Voice routes → Gemini API: transcribes audio (evidence: `README.md`)
- Voice note routes → Voice notes: manages notes
- Voice notes → Smart capture: hands off note (evidence: `README.md`)
- Calendar routes → Calendar sync: delegates to (evidence: `app/routes/calendar.py`)
- Calendar sync → Calendar repository: reads and writes links (evidence: `app/services/calendar_service.py`)
- Calendar sync → Google Calendar API: syncs events (evidence: `README.md`)
- Insights routes → Overload insights: requests insights
- Task repository → SQLite: queries (evidence: `README.md`)
- Reminder repository → SQLite: queries (evidence: `README.md`)
- User repository → SQLite: queries (evidence: `README.md`)
- Calendar repository → SQLite: queries (evidence: `README.md`)
- Activity repository → SQLite: queries (evidence: `README.md`)
- Task rules → Cloud Tasks: schedules start reminders
- Task rules → Pub/Sub and BigQuery: publishes task events
- Nightly backup → SQLite: snapshots (evidence: `README.md`)
- Nightly backup → Cloud Storage: stores backup (evidence: `README.md`)
