# mario-pv/git-overview architecture

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

- Interactive diagram: https://gitdiagram.com/mario-pv/git-overview
- Repository: https://github.com/mario-pv/git-overview

## Overview

git-overview is a Next.js app for generating shareable GitHub profile dashboards and exploring repositories, developers, rankings, and trends. The main profile flow resolves a username, fetches and enriches GitHub data, then renders a selectable portfolio template; separate routes serve rankings, trending results, view counts, and OpenGraph previews. The README also documents image/PDF export, QR sharing, and a 3D Dev Globe. Some of those implementations were not excerpted, so their links are marked unverified rather than inferred as confirmed calls.

Main entry points: [`src/app/[username]/page.tsx`](https://github.com/mario-pv/git-overview/blob/main/src/app/%5Busername%5D/page.tsx) (Profile route), [`src/lib/server/cache/storage.ts`](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/cache/storage.ts) (Redis or memory cache), [`src/lib/server/github.ts`](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/github.ts) (GitHub profile fetch), [`src/app/explore/rankings/page.tsx`](https://github.com/mario-pv/git-overview/blob/main/src/app/explore/rankings/page.tsx) (Rankings page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_profile["Profile dashboards"]
  node_profile_route["Profile route<br/>[page.tsx]"]
  node_profile_view["Profile view<br/>[ProfileView.tsx]"]
  node_github_template["GitHub template<br/>[TemplateGitHub.tsx]"]
  node_project_template["Project template"]
  node_contributions["Contribution activity"]
  node_external_contributions["External contributions"]
  node_project_card["Project cards<br/>[ProjectCard.tsx]"]
  node_language_bar["Repository languages"]
end

subgraph group_explore["Discovery and rankings"]
  node_explore_route["Explore route<br/>[page.tsx]"]
  node_notable_explorer["Notable repositories"]
  node_rankings_page["Rankings page<br/>[page.tsx]"]
  node_repo_table["Repository rankings<br/>[ReposTable.tsx]"]
  node_user_table["Developer rankings<br/>[UsersTable.tsx]"]
  node_trending_page["Trending page<br/>[page.tsx]"]
  node_trending_table["Trending results<br/>[TrendingTable.tsx]"]
  node_globe_page["Dev Globe page<br/>[page.tsx]"]
  node_globe_view["Interactive Dev Globe<br/>[DevGlobe.tsx]"]
end

subgraph group_services["Data services"]
  node_profile_data["Profile data model<br/>[github.ts]"]
  node_github_service["GitHub profile fetch<br/>[github.ts]"]
  node_repo_analysis["Repository analysis<br/>[repo-analyzer.ts]"]
  node_rate_limits["GitHub rate limits"]
  node_cache_api["Cache service<br/>[index.ts]"]
  node_cache_storage[("Redis or memory cache<br/>[storage.ts]")]
  node_rankings_service["Rankings service<br/>[rankings.ts]"]
  node_rankings_types["Rankings model<br/>[rankings.ts]"]
  node_trending_service["Trending service<br/>[trending.ts]"]
  node_trending_types["Trending model<br/>[trending.ts]"]
  node_globe_service["Globe data service<br/>[globe.ts]"]
  node_geocoding["Location geocoding<br/>[geocode.ts]"]
  node_centroids["Country centroids"]
end

subgraph group_sharing["Sharing and presentation"]
  node_export_util["Portfolio export"]
end

node_visitor(("Profile visitor"))
node_redis[("Redis")]
node_github{{"GitHub API"}}

node_visitor -->|"opens profile"| node_profile_route
node_profile_route -->|"fetches profile"| node_github_service
node_profile_route -->|"uses cache"| node_cache_api
node_profile_route -->|"renders"| node_profile_view
node_github_service -->|"enriches repositories"| node_repo_analysis
node_github_service -->|"updates limits"| node_rate_limits
node_github_service -->|"reads cache"| node_cache_storage
node_github_service -.->|"queries"| node_github
node_repo_analysis -->|"uses cache"| node_cache_storage
node_repo_analysis -->|"checks limits"| node_rate_limits
node_cache_api -->|"delegates storage"| node_cache_storage
node_cache_storage -->|"connects to"| node_redis
node_profile_view -.->|"selects template"| node_github_template
node_profile_view -.->|"selects template"| node_project_template
node_github_template -.->|"renders activity"| node_contributions
node_github_template -.->|"renders projects"| node_project_card
node_project_template -->|"renders contributions"| node_external_contributions
node_project_template -.->|"renders projects"| node_project_card
node_project_template -->|"renders languages"| node_language_bar
node_project_card -->|"renders languages"| node_language_bar
node_profile_route -->|"uses profile type"| node_profile_data
node_explore_route -->|"renders"| node_notable_explorer
node_rankings_page -->|"loads rankings"| node_rankings_service
node_rankings_page -->|"renders repositories"| node_repo_table
node_rankings_page -->|"renders developers"| node_user_table
node_rankings_service -->|"uses cache"| node_cache_storage
node_rankings_page -->|"uses types"| node_rankings_types
node_trending_page -->|"fetches results"| node_trending_service
node_trending_page -->|"renders results"| node_trending_table
node_trending_service -->|"reuses rankings"| node_rankings_service
node_trending_service -->|"uses cache"| node_cache_storage
node_trending_page -->|"normalizes filters"| node_trending_types
node_trending_page -.->|"serves view"| node_visitor
node_globe_page -.->|"displays globe"| node_globe_view
node_globe_view -.->|"loads globe data"| node_globe_service
node_globe_service -.->|"geocodes locations"| node_geocoding
node_geocoding -->|"uses centroids"| node_centroids
node_profile_view -.->|"exports profile"| node_export_util
node_profile_route -.->|"serves preview"| node_visitor

click node_profile_route "https://github.com/mario-pv/git-overview/blob/main/src/app/%5Busername%5D/page.tsx"
click node_profile_view "https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ProfileView.tsx"
click node_github_template "https://github.com/mario-pv/git-overview/blob/main/src/components/templates/TemplateGitHub.tsx"
click node_project_template "https://github.com/mario-pv/git-overview/blob/main/src/components/templates/TemplateProjectFocused.tsx"
click node_contributions "https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ContributionGraph.tsx"
click node_external_contributions "https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ExternalContributions.tsx"
click node_project_card "https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ProjectCard.tsx"
click node_language_bar "https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/RepoLanguageBar.tsx"
click node_profile_data "https://github.com/mario-pv/git-overview/blob/main/src/lib/types/github.ts"
click node_github_service "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/github.ts"
click node_repo_analysis "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/repo-analyzer.ts"
click node_rate_limits "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/github-rate-limit.ts"
click node_cache_api "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/cache/index.ts"
click node_cache_storage "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/cache/storage.ts"
click node_explore_route "https://github.com/mario-pv/git-overview/blob/main/src/app/explore/page.tsx"
click node_notable_explorer "https://github.com/mario-pv/git-overview/blob/main/src/components/explore/NotableReposExplorer.tsx"
click node_rankings_page "https://github.com/mario-pv/git-overview/blob/main/src/app/explore/rankings/page.tsx"
click node_rankings_service "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/rankings.ts"
click node_rankings_types "https://github.com/mario-pv/git-overview/blob/main/src/lib/types/rankings.ts"
click node_repo_table "https://github.com/mario-pv/git-overview/blob/main/src/components/explore/ReposTable.tsx"
click node_user_table "https://github.com/mario-pv/git-overview/blob/main/src/components/explore/UsersTable.tsx"
click node_trending_page "https://github.com/mario-pv/git-overview/blob/main/src/app/trending/page.tsx"
click node_trending_service "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/trending.ts"
click node_trending_types "https://github.com/mario-pv/git-overview/blob/main/src/lib/types/trending.ts"
click node_trending_table "https://github.com/mario-pv/git-overview/blob/main/src/components/explore/TrendingTable.tsx"
click node_globe_page "https://github.com/mario-pv/git-overview/blob/main/src/app/explore/globe/page.tsx"
click node_globe_view "https://github.com/mario-pv/git-overview/blob/main/src/components/explore/DevGlobe.tsx"
click node_globe_service "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/globe.ts"
click node_geocoding "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/geo/geocode.ts"
click node_centroids "https://github.com/mario-pv/git-overview/blob/main/src/lib/server/geo/country-centroids.ts"
click node_export_util "https://github.com/mario-pv/git-overview/blob/main/src/lib/utils/export-portfolio.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_profile_route,node_profile_view,node_github_template,node_project_template,node_contributions,node_external_contributions,node_project_card,node_language_bar toneBlue
class node_explore_route,node_notable_explorer,node_rankings_page,node_repo_table,node_user_table,node_trending_page,node_trending_table,node_globe_page,node_globe_view,node_redis toneAmber
class node_profile_data,node_github_service,node_repo_analysis,node_rate_limits,node_cache_api,node_cache_storage,node_rankings_service,node_rankings_types,node_trending_service,node_trending_types,node_globe_service,node_geocoding,node_centroids,node_github toneMint
class node_export_util toneRose
class node_visitor toneIndigo
```

## Components

### Profile dashboards

- [Profile route](https://github.com/mario-pv/git-overview/blob/main/src/app/%5Busername%5D/page.tsx): `src/app/[username]/page.tsx`
- [Profile view](https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ProfileView.tsx): `src/components/portfolio/ProfileView.tsx`
- [GitHub template](https://github.com/mario-pv/git-overview/blob/main/src/components/templates/TemplateGitHub.tsx): `src/components/templates/TemplateGitHub.tsx`
- [Project template](https://github.com/mario-pv/git-overview/blob/main/src/components/templates/TemplateProjectFocused.tsx): `src/components/templates/TemplateProjectFocused.tsx`
- [Contribution activity](https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ContributionGraph.tsx): `src/components/portfolio/ContributionGraph.tsx`
- [External contributions](https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ExternalContributions.tsx): `src/components/portfolio/ExternalContributions.tsx`
- [Project cards](https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/ProjectCard.tsx): `src/components/portfolio/ProjectCard.tsx`
- [Repository languages](https://github.com/mario-pv/git-overview/blob/main/src/components/portfolio/RepoLanguageBar.tsx): `src/components/portfolio/RepoLanguageBar.tsx`

### Discovery and rankings

- [Explore route](https://github.com/mario-pv/git-overview/blob/main/src/app/explore/page.tsx): `src/app/explore/page.tsx`
- [Notable repositories](https://github.com/mario-pv/git-overview/blob/main/src/components/explore/NotableReposExplorer.tsx): `src/components/explore/NotableReposExplorer.tsx`
- [Rankings page](https://github.com/mario-pv/git-overview/blob/main/src/app/explore/rankings/page.tsx): `src/app/explore/rankings/page.tsx`
- [Repository rankings](https://github.com/mario-pv/git-overview/blob/main/src/components/explore/ReposTable.tsx): `src/components/explore/ReposTable.tsx`
- [Developer rankings](https://github.com/mario-pv/git-overview/blob/main/src/components/explore/UsersTable.tsx): `src/components/explore/UsersTable.tsx`
- [Trending page](https://github.com/mario-pv/git-overview/blob/main/src/app/trending/page.tsx): `src/app/trending/page.tsx`
- [Trending results](https://github.com/mario-pv/git-overview/blob/main/src/components/explore/TrendingTable.tsx): `src/components/explore/TrendingTable.tsx`
- [Dev Globe page](https://github.com/mario-pv/git-overview/blob/main/src/app/explore/globe/page.tsx): `src/app/explore/globe/page.tsx`
- [Interactive Dev Globe](https://github.com/mario-pv/git-overview/blob/main/src/components/explore/DevGlobe.tsx): `src/components/explore/DevGlobe.tsx`

### Data services

- [Profile data model](https://github.com/mario-pv/git-overview/blob/main/src/lib/types/github.ts): `src/lib/types/github.ts`
- [GitHub profile fetch](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/github.ts): `src/lib/server/github.ts`
- [Repository analysis](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/repo-analyzer.ts): `src/lib/server/repo-analyzer.ts`
- [GitHub rate limits](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/github-rate-limit.ts): `src/lib/server/github-rate-limit.ts`
- [Cache service](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/cache/index.ts): `src/lib/server/cache/index.ts`
- [Redis or memory cache](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/cache/storage.ts): `src/lib/server/cache/storage.ts`
- [Rankings service](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/rankings.ts): `src/lib/server/rankings.ts`
- [Rankings model](https://github.com/mario-pv/git-overview/blob/main/src/lib/types/rankings.ts): `src/lib/types/rankings.ts`
- [Trending service](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/trending.ts): `src/lib/server/trending.ts`
- [Trending model](https://github.com/mario-pv/git-overview/blob/main/src/lib/types/trending.ts): `src/lib/types/trending.ts`
- [Globe data service](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/globe.ts): `src/lib/server/globe.ts`
- [Location geocoding](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/geo/geocode.ts): `src/lib/server/geo/geocode.ts`
- [Country centroids](https://github.com/mario-pv/git-overview/blob/main/src/lib/server/geo/country-centroids.ts): `src/lib/server/geo/country-centroids.ts`

### Sharing and presentation

- [Portfolio export](https://github.com/mario-pv/git-overview/blob/main/src/lib/utils/export-portfolio.ts): `src/lib/utils/export-portfolio.ts`

### Other components

- **Profile visitor**
- **Redis**
- **GitHub API**

## Connections

- Profile visitor → Profile route: opens profile (evidence: `src/app/[username]/page.tsx`)
- Profile route → GitHub profile fetch: fetches profile (evidence: `src/app/[username]/page.tsx`)
- Profile route → Cache service: uses cache (evidence: `src/app/[username]/page.tsx`)
- Profile route → Profile view: renders (evidence: `src/app/[username]/page.tsx`)
- GitHub profile fetch → Repository analysis: enriches repositories (evidence: `src/lib/server/github.ts`)
- GitHub profile fetch → GitHub rate limits: updates limits (evidence: `src/lib/server/github.ts`)
- GitHub profile fetch → Redis or memory cache: reads cache (evidence: `src/lib/server/github.ts`)
- GitHub profile fetch → GitHub API: queries
- Repository analysis → Redis or memory cache: uses cache (evidence: `src/lib/server/repo-analyzer.ts`)
- Repository analysis → GitHub rate limits: checks limits (evidence: `src/lib/server/repo-analyzer.ts`)
- Cache service → Redis or memory cache: delegates storage (evidence: `src/lib/server/cache/index.ts`)
- Redis or memory cache → Redis: connects to (evidence: `src/lib/server/cache/storage.ts`)
- Profile view → GitHub template: selects template
- Profile view → Project template: selects template
- GitHub template → Contribution activity: renders activity
- GitHub template → Project cards: renders projects
- Project template → External contributions: renders contributions (evidence: `src/components/templates/TemplateProjectFocused.tsx`)
- Project template → Project cards: renders projects (evidence: `src/components/templates/TemplateProjectFocused.tsx`)
- Project template → Repository languages: renders languages (evidence: `src/components/templates/TemplateProjectFocused.tsx`)
- Project cards → Repository languages: renders languages (evidence: `src/components/portfolio/ProjectCard.tsx`)
- Profile route → Profile data model: uses profile type (evidence: `src/app/[username]/page.tsx`)
- Explore route → Notable repositories: renders (evidence: `src/app/explore/page.tsx`)
- Rankings page → Rankings service: loads rankings (evidence: `src/app/explore/rankings/page.tsx`)
- Rankings page → Repository rankings: renders repositories (evidence: `src/app/explore/rankings/page.tsx`)
- Rankings page → Developer rankings: renders developers (evidence: `src/app/explore/rankings/page.tsx`)
- Rankings service → Redis or memory cache: uses cache (evidence: `src/lib/server/rankings.ts`)
- Rankings page → Rankings model: uses types (evidence: `src/app/explore/rankings/page.tsx`)
- Trending page → Trending service: fetches results (evidence: `src/app/trending/page.tsx`)
- Trending page → Trending results: renders results (evidence: `src/app/trending/page.tsx`)
- Trending service → Rankings service: reuses rankings (evidence: `src/lib/server/trending.ts`)
- Trending service → Redis or memory cache: uses cache (evidence: `src/lib/server/trending.ts`)
- Trending page → Trending model: normalizes filters (evidence: `src/app/trending/page.tsx`)
- Trending page → Profile visitor: serves view
- Dev Globe page → Interactive Dev Globe: displays globe
- Interactive Dev Globe → Globe data service: loads globe data
- Globe data service → Location geocoding: geocodes locations
- Location geocoding → Country centroids: uses centroids (evidence: `src/lib/server/geo/geocode.ts`)
- Profile view → Portfolio export: exports profile
- Profile route → Profile visitor: serves preview
