# shankar-soni-2006/repopulse architecture

> Architecture diagram of the GitHub repository shankar-soni-2006/repopulse, 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/shankar-soni-2006/repopulse
- Repository: https://github.com/shankar-soni-2006/repopulse

## Overview

RepoPulse turns GitHub repository activity into stored engineering data, metrics, team views, pull-request insights, and AI analysis. Members sign in through GitHub, select repositories they can access, and view synchronized results through the frontend’s API-backed pages. The main data path is repository discovery and synchronization, followed by analytics or AI analysis. The graph includes the documented webhook and admin capabilities, but source excerpts for several controllers and route handlers were unavailable, so those connections are limited to relationships explicitly shown by the README or source index.

Main entry points: [`backend/src/repositories/repositoryRepository.ts`](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/repositoryRepository.ts) (Repository records), [`backend/src/config/supabase.ts`](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/config/supabase.ts) (Supabase database), [`backend/src/services/auth/authService.ts`](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/auth/authService.ts) (Authentication), [`backend/src/services/github/discoveryService.ts`](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/github/discoveryService.ts) (Repository discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Member application"]
  node_app["React application<br/>[App.tsx]"]
  node_repo_pages["Repository views"]
  node_web_api["Frontend API client<br/>[api.ts]"]
end

subgraph group_api["API and identity"]
  node_server["Express server<br/>[app.ts]"]
  node_auth_controller["Auth handlers<br/>[authController.ts]"]
  node_auth_service["Authentication<br/>[authService.ts]"]
  node_session_service["Session management<br/>[sessionService.ts]"]
  node_repositories_api["Repository API"]
end

subgraph group_github_data["GitHub data ingestion"]
  node_webhook_service["Webhook processing<br/>[webhookService.ts]"]
  node_discovery["Repository discovery"]
  node_github_client["GitHub client<br/>[githubService.ts]"]
  node_sync_ingest["Activity ingestion<br/>[ingest.ts]"]
end

subgraph group_insights["Metrics and insights"]
  node_analytics["Engineering analytics"]
  node_ai["AI analysis<br/>[aiService.ts]"]
end

subgraph group_persistence["Persistent state"]
  node_supabase[("Supabase database<br/>[supabase.ts]")]
  node_repository_store["Repository records"]
  node_session_store["Session records"]
  node_pull_request_store["Pull request records"]
  node_review_store["Review records"]
  node_webhook_store["Webhook events"]
end

node_member(("Member"))

node_member -->|"uses"| node_app
node_app -->|"routes to"| node_repo_pages
node_repo_pages -.->|"requests data"| node_web_api
node_web_api -->|"calls API"| node_server
node_server -->|"mounts auth routes"| node_auth_controller
node_auth_controller -->|"starts sign-in"| node_auth_service
node_auth_controller -->|"destroys session"| node_session_service
node_auth_service -->|"creates session"| node_session_service
node_auth_service -->|"discovers repositories"| node_discovery
node_auth_service -->|"reads installations"| node_repository_store
node_server -->|"mounts repository routes"| node_repositories_api
node_repositories_api -->|"runs discovery"| node_discovery
node_discovery -->|"queries GitHub"| node_github_client
node_discovery -->|"stores repositories"| node_repository_store
node_github_client -.->|"supplies activity"| node_sync_ingest
node_sync_ingest -->|"upserts pull requests"| node_pull_request_store
node_sync_ingest -->|"upserts reviews"| node_review_store
node_analytics -->|"reads repositories"| node_repository_store
node_ai -->|"uses metrics"| node_analytics
node_ai -->|"reads pull requests"| node_pull_request_store
node_webhook_service -->|"looks up repository"| node_repository_store
node_webhook_service -->|"records delivery"| node_webhook_store
node_repository_store -->|"reads and writes"| node_supabase
node_session_store -->|"reads and writes"| node_supabase
node_pull_request_store -->|"reads and writes"| node_supabase
node_review_store -->|"reads and writes"| node_supabase
node_webhook_store -->|"reads and writes"| node_supabase

click node_app "https://github.com/shankar-soni-2006/repopulse/blob/main/frontend/src/App.tsx"
click node_repo_pages "https://github.com/shankar-soni-2006/repopulse/tree/main/frontend/src/pages"
click node_web_api "https://github.com/shankar-soni-2006/repopulse/blob/main/frontend/src/services/api.ts"
click node_server "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/app.ts"
click node_auth_controller "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/controllers/authController.ts"
click node_auth_service "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/auth/authService.ts"
click node_session_service "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/auth/sessionService.ts"
click node_repositories_api "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/controllers/repositoryController.ts"
click node_webhook_service "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/webhooks/webhookService.ts"
click node_discovery "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/github/discoveryService.ts"
click node_github_client "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/github/githubService.ts"
click node_sync_ingest "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/sync/ingest.ts"
click node_analytics "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/analytics/analyticsService.ts"
click node_ai "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/ai/aiService.ts"
click node_supabase "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/config/supabase.ts"
click node_repository_store "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/repositoryRepository.ts"
click node_session_store "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/sessionRepository.ts"
click node_pull_request_store "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/pullRequestRepository.ts"
click node_review_store "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/reviewRepository.ts"
click node_webhook_store "https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/webhookEventRepository.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_repo_pages,node_web_api toneBlue
class node_server,node_auth_controller,node_auth_service,node_session_service,node_repositories_api toneAmber
class node_webhook_service,node_discovery,node_github_client,node_sync_ingest toneMint
class node_analytics,node_ai toneRose
class node_supabase,node_repository_store,node_session_store,node_pull_request_store,node_review_store,node_webhook_store,node_member toneIndigo
```

## Components

### Member application

- [React application](https://github.com/shankar-soni-2006/repopulse/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Repository views](https://github.com/shankar-soni-2006/repopulse/tree/main/frontend/src/pages): `frontend/src/pages`
- [Frontend API client](https://github.com/shankar-soni-2006/repopulse/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### API and identity

- [Express server](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Auth handlers](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/controllers/authController.ts): `backend/src/controllers/authController.ts`
- [Authentication](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/auth/authService.ts): `backend/src/services/auth/authService.ts`
- [Session management](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/auth/sessionService.ts): `backend/src/services/auth/sessionService.ts`
- [Repository API](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/controllers/repositoryController.ts): `backend/src/controllers/repositoryController.ts`

### GitHub data ingestion

- [Webhook processing](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/webhooks/webhookService.ts): `backend/src/webhooks/webhookService.ts`
- [Repository discovery](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/github/discoveryService.ts): `backend/src/services/github/discoveryService.ts`
- [GitHub client](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/github/githubService.ts): `backend/src/services/github/githubService.ts`
- [Activity ingestion](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/sync/ingest.ts): `backend/src/services/sync/ingest.ts`

### Metrics and insights

- [Engineering analytics](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/analytics/analyticsService.ts): `backend/src/services/analytics/analyticsService.ts`
- [AI analysis](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/services/ai/aiService.ts): `backend/src/services/ai/aiService.ts`

### Persistent state

- [Supabase database](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/config/supabase.ts): `backend/src/config/supabase.ts`
- [Repository records](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/repositoryRepository.ts): `backend/src/repositories/repositoryRepository.ts`
- [Session records](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/sessionRepository.ts): `backend/src/repositories/sessionRepository.ts`
- [Pull request records](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/pullRequestRepository.ts): `backend/src/repositories/pullRequestRepository.ts`
- [Review records](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/reviewRepository.ts): `backend/src/repositories/reviewRepository.ts`
- [Webhook events](https://github.com/shankar-soni-2006/repopulse/blob/main/backend/src/repositories/webhookEventRepository.ts): `backend/src/repositories/webhookEventRepository.ts`

### Other components

- **Member**

## Connections

- Member → React application: uses (evidence: `README.md`)
- React application → Repository views: routes to (evidence: `frontend/src/App.tsx`)
- Repository views → Frontend API client: requests data
- Frontend API client → Express server: calls API (evidence: `README.md`)
- Express server → Auth handlers: mounts auth routes (evidence: `backend/src/app.ts`)
- Auth handlers → Authentication: starts sign-in (evidence: `backend/src/controllers/authController.ts`)
- Auth handlers → Session management: destroys session (evidence: `backend/src/controllers/authController.ts`)
- Authentication → Session management: creates session (evidence: `backend/src/services/auth/authService.ts`)
- Authentication → Repository discovery: discovers repositories (evidence: `backend/src/services/auth/authService.ts`)
- Authentication → Repository records: reads installations (evidence: `backend/src/services/auth/authService.ts`)
- Express server → Repository API: mounts repository routes (evidence: `backend/src/app.ts`)
- Repository API → Repository discovery: runs discovery (evidence: `backend/src/controllers/repositoryController.ts`)
- Repository discovery → GitHub client: queries GitHub (evidence: `backend/src/services/github/discoveryService.ts`)
- Repository discovery → Repository records: stores repositories (evidence: `backend/src/services/github/discoveryService.ts`)
- GitHub client → Activity ingestion: supplies activity (evidence: `backend/src/services/sync/ingest.ts`)
- Activity ingestion → Pull request records: upserts pull requests (evidence: `backend/src/services/sync/ingest.ts`)
- Activity ingestion → Review records: upserts reviews (evidence: `backend/src/services/sync/ingest.ts`)
- Engineering analytics → Repository records: reads repositories (evidence: `backend/src/services/analytics/analyticsService.ts`)
- AI analysis → Engineering analytics: uses metrics (evidence: `backend/src/services/ai/aiService.ts`)
- AI analysis → Pull request records: reads pull requests (evidence: `backend/src/services/ai/aiService.ts`)
- Webhook processing → Repository records: looks up repository (evidence: `backend/src/webhooks/webhookService.ts`)
- Webhook processing → Webhook events: records delivery (evidence: `backend/src/webhooks/webhookService.ts`)
- Repository records → Supabase database: reads and writes (evidence: `backend/src/repositories/repositoryRepository.ts`)
- Session records → Supabase database: reads and writes (evidence: `backend/src/repositories/sessionRepository.ts`)
- Pull request records → Supabase database: reads and writes (evidence: `backend/src/repositories/pullRequestRepository.ts`)
- Review records → Supabase database: reads and writes (evidence: `backend/src/repositories/reviewRepository.ts`)
- Webhook events → Supabase database: reads and writes (evidence: `backend/src/repositories/webhookEventRepository.ts`)
