# dkullayappa-8483/github-wrapped-ai architecture

> Architecture diagram of the GitHub repository dkullayappa-8483/github-wrapped-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dkullayappa-8483/github-wrapped-ai
- Repository: https://github.com/dkullayappa-8483/github-wrapped-ai

## Overview

GitHub Wrapped turns a username into an AI-generated developer recap and an animated, shareable experience. The main user path is the frontend form, its Next.js generation route, GitHub profile/repository retrieval, Gemini analysis, and the slides and PNG export. The repository also contains a separate LinkedIn Wrapped MCP agent with scraping, analysis, HTML generation, and file saving tools. Backend excerpts show another GitHub generation implementation; no frontend-to-backend connection is established. The frontend excerpt is partial, so details beyond its visible rendering and export behavior are omitted.

Main entry points: [`backend/mcp_server.js`](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js) (MCP tool server), [`backend/agent.js`](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/agent.js) (LinkedIn agent), [`frontend/app/page.tsx`](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx) (Wrapped experience), [`frontend/app/api/generate/route.ts`](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/api/generate/route.ts) (Generate API route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_github_ui["GitHub Wrapped UI"]
  node_experience["Wrapped experience<br/>[page.tsx]"]
  node_slides["Insight slides<br/>[page.tsx]"]
  node_radar["Skill radar<br/>[page.tsx]"]
  node_png["PNG export<br/>[page.tsx]"]
end

subgraph group_github_generation["GitHub Generation"]
  node_generate_route["Generate API route<br/>[route.ts]"]
  node_github_data["GitHub profile analysis input<br/>[route.ts]"]
  node_express_api["Express generate API<br/>[index.js]"]
end

subgraph group_linkedin_agent["LinkedIn Wrapped Agent"]
  node_linkedin_agent["LinkedIn agent<br/>[agent.js]"]
end

subgraph group_linkedin_tools["LinkedIn MCP Tools"]
  node_mcp_server["MCP tool server<br/>[mcp_server.js]"]
  node_linkedin_data["LinkedIn profile data<br/>[mcp_server.js]"]
  node_career_analysis["Career insights<br/>[mcp_server.js]"]
  node_html_card["Wrapped HTML card<br/>[mcp_server.js]"]
  node_static_files[("Saved wrapped files<br/>[mcp_server.js]")]
end

node_visitor(("Developer"))
node_github["GitHub REST API"]
node_gemini["Gemini API"]
node_linkedin["LinkedIn profile API"]
node_proxycurl["Proxycurl service"]

node_visitor -->|"enters username"| node_experience
node_experience -->|"requests analysis"| node_generate_route
node_generate_route -->|"fetches profile"| node_github_data
node_github_data -->|"queries profile and repos"| node_github
node_generate_route -->|"requests insights"| node_gemini
node_generate_route -->|"returns analysis"| node_experience
node_experience -->|"renders recap"| node_slides
node_slides -->|"renders chart"| node_radar
node_experience -->|"exports card"| node_png
node_visitor -.->|"submits username"| node_express_api
node_express_api -->|"queries profile and repos"| node_github
node_express_api -->|"requests insights"| node_gemini
node_linkedin_agent -->|"connects tools"| node_mcp_server
node_linkedin_agent -->|"calls scrape tool"| node_mcp_server
node_mcp_server -->|"fetches profile"| node_proxycurl
node_mcp_server -->|"returns profile data"| node_linkedin_data
node_linkedin_agent -->|"calls analysis tool"| node_mcp_server
node_mcp_server -->|"generates insights"| node_gemini
node_mcp_server -->|"returns insights"| node_career_analysis
node_linkedin_agent -->|"calls HTML tool"| node_mcp_server
node_mcp_server -->|"builds card"| node_html_card
node_linkedin_agent -->|"calls save tool"| node_mcp_server
node_mcp_server -->|"writes HTML"| node_static_files

click node_experience "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx"
click node_slides "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx"
click node_radar "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx"
click node_png "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx"
click node_generate_route "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/api/generate/route.ts"
click node_github_data "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/api/generate/route.ts"
click node_express_api "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/index.js"
click node_linkedin_agent "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/agent.js"
click node_mcp_server "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js"
click node_linkedin_data "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js"
click node_career_analysis "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js"
click node_html_card "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js"
click node_static_files "https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js"

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_experience,node_slides,node_radar,node_png toneBlue
class node_generate_route,node_github_data,node_express_api toneAmber
class node_linkedin_agent,node_github,node_gemini,node_linkedin toneMint
class node_mcp_server,node_linkedin_data,node_career_analysis,node_html_card,node_static_files toneRose
class node_visitor,node_proxycurl toneIndigo
```

## Components

### GitHub Wrapped UI

- [Wrapped experience](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Insight slides](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Skill radar](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [PNG export](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`

### GitHub Generation

- [Generate API route](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/api/generate/route.ts): `frontend/app/api/generate/route.ts`
- [GitHub profile analysis input](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/frontend/app/api/generate/route.ts): `frontend/app/api/generate/route.ts`
- [Express generate API](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/index.js): `backend/index.js`

### LinkedIn Wrapped Agent

- [LinkedIn agent](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/agent.js): `backend/agent.js`

### LinkedIn MCP Tools

- [MCP tool server](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js): `backend/mcp_server.js`
- [LinkedIn profile data](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js): `backend/mcp_server.js`
- [Career insights](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js): `backend/mcp_server.js`
- [Wrapped HTML card](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js): `backend/mcp_server.js`
- [Saved wrapped files](https://github.com/dkullayappa-8483/github-wrapped-ai/blob/main/backend/mcp_server.js): `backend/mcp_server.js`

### Other components

- **Developer**
- **GitHub REST API**
- **Gemini API**
- **LinkedIn profile API**
- **Proxycurl service**

## Connections

- Developer → Wrapped experience: enters username (evidence: `frontend/app/page.tsx`)
- Wrapped experience → Generate API route: requests analysis
- Generate API route → GitHub profile analysis input: fetches profile (evidence: `frontend/app/api/generate/route.ts`)
- GitHub profile analysis input → GitHub REST API: queries profile and repos (evidence: `frontend/app/api/generate/route.ts`)
- Generate API route → Gemini API: requests insights (evidence: `frontend/app/api/generate/route.ts`)
- Generate API route → Wrapped experience: returns analysis (evidence: `frontend/app/api/generate/route.ts`)
- Wrapped experience → Insight slides: renders recap (evidence: `frontend/app/page.tsx`)
- Insight slides → Skill radar: renders chart (evidence: `frontend/app/page.tsx`)
- Wrapped experience → PNG export: exports card (evidence: `frontend/app/page.tsx`)
- Developer → Express generate API: submits username
- Express generate API → GitHub REST API: queries profile and repos (evidence: `backend/index.js`)
- Express generate API → Gemini API: requests insights (evidence: `backend/index.js`)
- LinkedIn agent → MCP tool server: connects tools (evidence: `backend/agent.js`)
- LinkedIn agent → MCP tool server: calls scrape tool (evidence: `backend/agent.js`)
- MCP tool server → Proxycurl service: fetches profile (evidence: `backend/mcp_server.js`)
- MCP tool server → LinkedIn profile data: returns profile data (evidence: `backend/mcp_server.js`)
- LinkedIn agent → MCP tool server: calls analysis tool (evidence: `backend/agent.js`)
- MCP tool server → Gemini API: generates insights (evidence: `backend/mcp_server.js`)
- MCP tool server → Career insights: returns insights (evidence: `backend/mcp_server.js`)
- LinkedIn agent → MCP tool server: calls HTML tool (evidence: `backend/agent.js`)
- MCP tool server → Wrapped HTML card: builds card (evidence: `backend/mcp_server.js`)
- LinkedIn agent → MCP tool server: calls save tool (evidence: `backend/agent.js`)
- MCP tool server → Saved wrapped files: writes HTML (evidence: `backend/mcp_server.js`)
