# klu2300031662/codepulse architecture

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

- Interactive diagram: https://gitdiagram.com/klu2300031662/codepulse
- Repository: https://github.com/klu2300031662/codepulse

## Overview

CodePulse is a developer-analytics SaaS: users register and link coding-platform accounts, then view aggregated progress, track problems, and run code. The frontend is a Next.js dashboard backed by Spring controllers, services, and repositories. README documents several capabilities as mock or abstracted; source excerpts confirm selected auth, stats, platform-sync, and execution behavior, but not every frontend-to-backend connection, so those links are not inferred.

Main entry points: [`backend/src/main/java/com/codepulse/backend/controllers/AuthController.java`](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/AuthController.java) (Authentication API), [`backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java`](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java) (Platform link API), [`backend/src/main/java/com/codepulse/backend/controllers/StatsController.java`](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/StatsController.java) (Stats API), [`frontend/src/app/(auth)/register/page.tsx`](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/(auth)/register/page.tsx) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_auth_ui["Login and registration<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_analytics_ui["Analytics views<br/>[page.tsx]"]
  node_tracker_ui["Problem tracker<br/>[page.tsx]"]
  node_platform_ui["Platform linking<br/>[page.tsx]"]
  node_company_ui["Company preparation<br/>[page.tsx]"]
  node_leaderboard_ui["Leaderboard<br/>[page.tsx]"]
  node_profile_ui["Public profile<br/>[page.tsx]"]
  node_terminal_ui["Interactive terminal<br/>[page.tsx]"]
end

subgraph group_identity["Identity and access"]
  node_auth_controller["Authentication API"]
  node_jwt["JWT security<br/>[JwtUtils.java]"]
  node_user_details["User identity mapping"]
end

subgraph group_analytics["Progress analytics"]
  node_platform_controller["Platform link API"]
  node_stats_controller["Stats API"]
  node_platform_stats["Platform statistics"]
end

subgraph group_practice["Practice tools"]
  node_execution_api["Code execution API<br/>[route.ts]"]
  node_execution_service["Code execution"]
end

subgraph group_persistence["Backend data"]
  node_problem_repository[("Problem records")]
  node_platform_repository[("Platform links")]
  node_user_repository[("User records")]
end

node_developer(("Developer"))

node_developer -->|"opens"| node_landing
node_developer -->|"registers"| node_auth_ui
node_auth_ui -.->|"authenticates"| node_auth_controller
node_auth_controller -->|"issues tokens"| node_jwt
node_auth_controller -->|"reads and saves"| node_user_repository
node_developer -->|"views progress"| node_dashboard
node_dashboard -->|"opens"| node_analytics_ui
node_developer -->|"links accounts"| node_platform_ui
node_platform_controller -->|"syncs statistics"| node_platform_stats
node_platform_controller -->|"reads and writes"| node_platform_repository
node_stats_controller -->|"reads activity"| node_problem_repository
node_stats_controller -->|"reads links"| node_platform_repository
node_developer -->|"logs problems"| node_tracker_ui
node_developer -->|"submits code"| node_terminal_ui
node_terminal_ui -->|"requests execution"| node_execution_api
node_execution_api -.->|"runs code"| node_execution_service
node_developer -->|"prepares interviews"| node_company_ui
node_developer -->|"views rankings"| node_leaderboard_ui
node_developer -->|"shares profile"| node_profile_ui

click node_landing "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/page.tsx"
click node_auth_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/(auth)/register/page.tsx"
click node_dashboard "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/page.tsx"
click node_analytics_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/analytics/page.tsx"
click node_tracker_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/projects/page.tsx"
click node_platform_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/platforms/page.tsx"
click node_company_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/company/page.tsx"
click node_leaderboard_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/leaderboard/page.tsx"
click node_profile_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/profile/page.tsx"
click node_terminal_ui "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/terminal/page.tsx"
click node_auth_controller "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/AuthController.java"
click node_jwt "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/security/jwt/JwtUtils.java"
click node_user_details "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/security/services/UserDetailsImpl.java"
click node_platform_controller "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java"
click node_stats_controller "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/StatsController.java"
click node_platform_stats "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/service/PlatformStatsService.java"
click node_problem_repository "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/repository/ProblemRepository.java"
click node_platform_repository "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/repository/PlatformLinkRepository.java"
click node_user_repository "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/repository/UserRepository.java"
click node_execution_api "https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/api/execute/route.ts"
click node_execution_service "https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/security/services/CodeExecutionService.java"

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_landing,node_auth_ui,node_dashboard,node_analytics_ui,node_tracker_ui,node_platform_ui,node_company_ui,node_leaderboard_ui,node_profile_ui,node_terminal_ui toneBlue
class node_auth_controller,node_jwt,node_user_details toneAmber
class node_platform_controller,node_stats_controller,node_platform_stats toneMint
class node_execution_api,node_execution_service toneRose
class node_problem_repository,node_platform_repository,node_user_repository,node_developer toneIndigo
```

## Components

### Web experience

- [Landing page](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Login and registration](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/(auth)/register/page.tsx): `frontend/src/app/(auth)/register/page.tsx`
- [Dashboard](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/page.tsx): `frontend/src/app/dashboard/page.tsx`
- [Analytics views](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/analytics/page.tsx): `frontend/src/app/dashboard/analytics/page.tsx`
- [Problem tracker](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/projects/page.tsx): `frontend/src/app/dashboard/projects/page.tsx`
- [Platform linking](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/platforms/page.tsx): `frontend/src/app/dashboard/platforms/page.tsx`
- [Company preparation](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/company/page.tsx): `frontend/src/app/dashboard/company/page.tsx`
- [Leaderboard](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/leaderboard/page.tsx): `frontend/src/app/dashboard/leaderboard/page.tsx`
- [Public profile](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/profile/page.tsx): `frontend/src/app/profile/page.tsx`
- [Interactive terminal](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/dashboard/terminal/page.tsx): `frontend/src/app/dashboard/terminal/page.tsx`

### Identity and access

- [Authentication API](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/AuthController.java): `backend/src/main/java/com/codepulse/backend/controllers/AuthController.java`
- [JWT security](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/security/jwt/JwtUtils.java): `backend/src/main/java/com/codepulse/backend/security/jwt/JwtUtils.java`
- [User identity mapping](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/security/services/UserDetailsImpl.java): `backend/src/main/java/com/codepulse/backend/security/services/UserDetailsImpl.java`

### Progress analytics

- [Platform link API](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java): `backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java`
- [Stats API](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/controllers/StatsController.java): `backend/src/main/java/com/codepulse/backend/controllers/StatsController.java`
- [Platform statistics](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/service/PlatformStatsService.java): `backend/src/main/java/com/codepulse/backend/service/PlatformStatsService.java`

### Practice tools

- [Code execution API](https://github.com/klu2300031662/codepulse/blob/main/frontend/src/app/api/execute/route.ts): `frontend/src/app/api/execute/route.ts`
- [Code execution](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/security/services/CodeExecutionService.java): `backend/src/main/java/com/codepulse/backend/security/services/CodeExecutionService.java`

### Backend data

- [Problem records](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/repository/ProblemRepository.java): `backend/src/main/java/com/codepulse/backend/repository/ProblemRepository.java`
- [Platform links](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/repository/PlatformLinkRepository.java): `backend/src/main/java/com/codepulse/backend/repository/PlatformLinkRepository.java`
- [User records](https://github.com/klu2300031662/codepulse/blob/main/backend/src/main/java/com/codepulse/backend/repository/UserRepository.java): `backend/src/main/java/com/codepulse/backend/repository/UserRepository.java`

### Other components

- **Developer**

## Connections

- Developer → Landing page: opens
- Developer → Login and registration: registers
- Login and registration → Authentication API: authenticates
- Authentication API → JWT security: issues tokens (evidence: `backend/src/main/java/com/codepulse/backend/controllers/AuthController.java`)
- Authentication API → User records: reads and saves (evidence: `backend/src/main/java/com/codepulse/backend/controllers/AuthController.java`)
- Developer → Dashboard: views progress
- Dashboard → Analytics views: opens
- Developer → Platform linking: links accounts
- Platform link API → Platform statistics: syncs statistics (evidence: `backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java`)
- Platform link API → Platform links: reads and writes (evidence: `backend/src/main/java/com/codepulse/backend/controllers/PlatformLinkController.java`)
- Stats API → Problem records: reads activity (evidence: `backend/src/main/java/com/codepulse/backend/controllers/StatsController.java`)
- Stats API → Platform links: reads links (evidence: `backend/src/main/java/com/codepulse/backend/controllers/StatsController.java`)
- Developer → Problem tracker: logs problems
- Developer → Interactive terminal: submits code
- Interactive terminal → Code execution API: requests execution (evidence: `frontend/src/app/dashboard/terminal/page.tsx`)
- Code execution API → Code execution: runs code
- Developer → Company preparation: prepares interviews
- Developer → Leaderboard: views rankings
- Developer → Public profile: shares profile
