# razame/commit-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/razame/commit-pulse
- Repository: https://github.com/razame/commit-pulse

## Overview

CommitPulse is a developer-activity tracker: users connect GitHub, commit and repository data is synced, and weekly insights appear in dashboards and public profiles. The worker source shows daily GitHub collection and API transfer; sampled Laravel controllers show persistence and statistics reads, while the README documents weekly email digests and additional insight features. Several job and frontend data-fetching connections are not shown in sampled source, so those links are omitted.

Main entry points: [`frontend/src/main.js`](https://github.com/razame/commit-pulse/blob/main/frontend/src/main.js) (Vue application), [`frontend/src/pages/Dashboard.vue`](https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Dashboard.vue) (Dashboard), [`backend/app/Http/Controllers/API/StatsController.php`](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/API/StatsController.php) (Weekly statistics API), [`backend/app/Http/Controllers/API/CommitsController.php`](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/API/CommitsController.php) (Commit ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_frontend["Vue application<br/>[main.js]"]
  node_dashboard["Dashboard<br/>[Dashboard.vue]"]
  node_settings["Settings<br/>[Settings.vue]"]
  node_public_page["Public profile<br/>[PublicProfile.vue]"]
  node_charts["Insight charts<br/>[WeeklyChart.vue]"]
  node_stats_cards["Stat cards<br/>[StatCard.vue]"]
  node_language_chart["Language chart<br/>[LanguagesChart.vue]"]
  node_login["Login page<br/>[Login.vue]"]
end

subgraph group_identity["Identity and API"]
  node_github_oauth["GitHub OAuth"]
  node_api_routes["API routes<br/>[api.php]"]
  node_worker_auth["Worker key check"]
end

subgraph group_sync["Activity sync"]
  node_worker["Sync worker<br/>[main.go]"]
  node_sync_ingest["Commit ingestion"]
  node_repositories[("Repositories<br/>[Repository.php]")]
  node_commits[("Commits<br/>[Commit.php]")]
end

subgraph group_insights["Insights and delivery"]
  node_stats_api["Weekly statistics API"]
  node_weekly_job["Weekly aggregation"]
  node_weekly_stats[("Weekly statistics<br/>[WeeklyStat.php]")]
  node_public_api["Public profile API"]
  node_digest_job["Email digest"]
  node_email_view["Digest template"]
end

node_developer(("Developer"))
node_github(("GitHub"))

node_developer -->|"uses"| node_frontend
node_frontend -->|"routes"| node_login
node_frontend -->|"routes"| node_dashboard
node_frontend -->|"routes"| node_settings
node_frontend -->|"routes"| node_public_page
node_login -->|"starts OAuth"| node_github_oauth
node_github_oauth -->|"authenticates with"| node_github
node_worker -->|"requests users"| node_api_routes
node_worker -->|"fetches activity"| node_github
node_worker -->|"posts sync data"| node_sync_ingest
node_sync_ingest -->|"upserts"| node_repositories
node_sync_ingest -->|"upserts"| node_commits
node_worker_auth -->|"guards request"| node_sync_ingest
node_dashboard -->|"requests stats"| node_stats_api
node_stats_api -->|"reads"| node_commits
node_stats_api -->|"reads"| node_repositories
node_stats_api -->|"returns summary"| node_weekly_stats
node_public_page -->|"requests profile"| node_public_api
node_public_api -->|"reads"| node_weekly_stats
node_dashboard -->|"displays insights"| node_charts
node_dashboard -->|"displays totals"| node_stats_cards
node_dashboard -->|"displays languages"| node_language_chart
node_weekly_job -.->|"generates"| node_weekly_stats
node_digest_job -.->|"renders"| node_email_view

click node_frontend "https://github.com/razame/commit-pulse/blob/main/frontend/src/main.js"
click node_dashboard "https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Dashboard.vue"
click node_settings "https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Settings.vue"
click node_public_page "https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/PublicProfile.vue"
click node_charts "https://github.com/razame/commit-pulse/blob/main/frontend/src/components/WeeklyChart.vue"
click node_stats_cards "https://github.com/razame/commit-pulse/blob/main/frontend/src/components/StatCard.vue"
click node_language_chart "https://github.com/razame/commit-pulse/blob/main/frontend/src/components/LanguagesChart.vue"
click node_login "https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Login.vue"
click node_github_oauth "https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/Auth/GithubController.php"
click node_api_routes "https://github.com/razame/commit-pulse/blob/main/backend/routes/api.php"
click node_worker_auth "https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Middleware/VerifyWorkerApiKey.php"
click node_worker "https://github.com/razame/commit-pulse/blob/main/worker/main.go"
click node_sync_ingest "https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/API/CommitsController.php"
click node_repositories "https://github.com/razame/commit-pulse/blob/main/backend/app/Models/Repository.php"
click node_commits "https://github.com/razame/commit-pulse/blob/main/backend/app/Models/Commit.php"
click node_stats_api "https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/API/StatsController.php"
click node_weekly_job "https://github.com/razame/commit-pulse/blob/main/backend/app/Jobs/GenerateWeeklyStatsJob.php"
click node_weekly_stats "https://github.com/razame/commit-pulse/blob/main/backend/app/Models/WeeklyStat.php"
click node_public_api "https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/PublicProfileController.php"
click node_digest_job "https://github.com/razame/commit-pulse/blob/main/backend/app/Jobs/SendWeeklyDigestEmail.php"
click node_email_view "https://github.com/razame/commit-pulse/blob/main/backend/resources/views/emails/weekly-digest.blade.php"

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_frontend,node_dashboard,node_settings,node_public_page,node_charts,node_stats_cards,node_language_chart,node_login toneBlue
class node_github_oauth,node_api_routes,node_worker_auth toneAmber
class node_worker,node_sync_ingest,node_repositories,node_commits toneMint
class node_stats_api,node_weekly_job,node_weekly_stats,node_public_api,node_digest_job,node_email_view toneRose
class node_developer,node_github toneIndigo
```

## Components

### Web experience

- [Vue application](https://github.com/razame/commit-pulse/blob/main/frontend/src/main.js): `frontend/src/main.js`
- [Dashboard](https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Dashboard.vue): `frontend/src/pages/Dashboard.vue`
- [Settings](https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Settings.vue): `frontend/src/pages/Settings.vue`
- [Public profile](https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/PublicProfile.vue): `frontend/src/pages/PublicProfile.vue`
- [Insight charts](https://github.com/razame/commit-pulse/blob/main/frontend/src/components/WeeklyChart.vue): `frontend/src/components/WeeklyChart.vue`
- [Stat cards](https://github.com/razame/commit-pulse/blob/main/frontend/src/components/StatCard.vue): `frontend/src/components/StatCard.vue`
- [Language chart](https://github.com/razame/commit-pulse/blob/main/frontend/src/components/LanguagesChart.vue): `frontend/src/components/LanguagesChart.vue`
- [Login page](https://github.com/razame/commit-pulse/blob/main/frontend/src/pages/Login.vue): `frontend/src/pages/Login.vue`

### Identity and API

- [GitHub OAuth](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/Auth/GithubController.php): `backend/app/Http/Controllers/Auth/GithubController.php`
- [API routes](https://github.com/razame/commit-pulse/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Worker key check](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Middleware/VerifyWorkerApiKey.php): `backend/app/Http/Middleware/VerifyWorkerApiKey.php`

### Activity sync

- [Sync worker](https://github.com/razame/commit-pulse/blob/main/worker/main.go): `worker/main.go`
- [Commit ingestion](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/API/CommitsController.php): `backend/app/Http/Controllers/API/CommitsController.php`
- [Repositories](https://github.com/razame/commit-pulse/blob/main/backend/app/Models/Repository.php): `backend/app/Models/Repository.php`
- [Commits](https://github.com/razame/commit-pulse/blob/main/backend/app/Models/Commit.php): `backend/app/Models/Commit.php`

### Insights and delivery

- [Weekly statistics API](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/API/StatsController.php): `backend/app/Http/Controllers/API/StatsController.php`
- [Weekly aggregation](https://github.com/razame/commit-pulse/blob/main/backend/app/Jobs/GenerateWeeklyStatsJob.php): `backend/app/Jobs/GenerateWeeklyStatsJob.php`
- [Weekly statistics](https://github.com/razame/commit-pulse/blob/main/backend/app/Models/WeeklyStat.php): `backend/app/Models/WeeklyStat.php`
- [Public profile API](https://github.com/razame/commit-pulse/blob/main/backend/app/Http/Controllers/PublicProfileController.php): `backend/app/Http/Controllers/PublicProfileController.php`
- [Email digest](https://github.com/razame/commit-pulse/blob/main/backend/app/Jobs/SendWeeklyDigestEmail.php): `backend/app/Jobs/SendWeeklyDigestEmail.php`
- [Digest template](https://github.com/razame/commit-pulse/blob/main/backend/resources/views/emails/weekly-digest.blade.php): `backend/resources/views/emails/weekly-digest.blade.php`

### Other components

- **Developer**
- **GitHub**

## Connections

- Developer → Vue application: uses
- Vue application → Login page: routes
- Vue application → Dashboard: routes
- Vue application → Settings: routes
- Vue application → Public profile: routes
- Login page → GitHub OAuth: starts OAuth
- GitHub OAuth → GitHub: authenticates with
- Sync worker → API routes: requests users
- Sync worker → GitHub: fetches activity
- Sync worker → Commit ingestion: posts sync data
- Commit ingestion → Repositories: upserts
- Commit ingestion → Commits: upserts
- Worker key check → Commit ingestion: guards request
- Dashboard → Weekly statistics API: requests stats
- Weekly statistics API → Commits: reads
- Weekly statistics API → Repositories: reads
- Weekly statistics API → Weekly statistics: returns summary
- Public profile → Public profile API: requests profile
- Public profile API → Weekly statistics: reads
- Dashboard → Insight charts: displays insights
- Dashboard → Stat cards: displays totals
- Dashboard → Language chart: displays languages
- Weekly aggregation → Weekly statistics: generates
- Email digest → Digest template: renders
