# ag4hz/gitcodegud architecture

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

- Interactive diagram: https://gitdiagram.com/ag4hz/gitcodegud
- Repository: https://github.com/ag4hz/gitcodegud

## Overview

GitCodeGud is a gamified bug-bounty platform: developers connect code-hosting accounts, discover repository issues posted as bounties, submit pull requests, and earn skill-based XP. Organization owners can manage team bounties, while profiles, reviews, followers, and leaderboards support community progression. The graph captures the documented product flow and sampled backend responsibilities; some route wiring, submission handling, and frontend page interactions were not excerpted, so those links are omitted or marked unverified.

Main entry points: [`app/Http/Controllers/BountyController.php`](https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/BountyController.php) (Bounty Management), [`app/Http/Controllers/Socialite/ProviderCallbackController.php`](https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/Socialite/ProviderCallbackController.php) (Provider Login), [`app/Services/BountySearchService.php`](https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/BountySearchService.php) (Bounty Discovery), [`app/Helpers/XPHelper.php`](https://github.com/ag4hz/gitcodegud/blob/develop/app/Helpers/XPHelper.php) (Skill XP)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Accounts and Integrations"]
  node_social_login["Provider Login"]
  node_git_repo["Repository Sync<br/>[GitRepoService.php]"]
  node_git_adapters["Provider APIs"]
end

subgraph group_bounty["Bounty Lifecycle"]
  node_bounty_flow["Bounty Management"]
  node_bounty_search["Bounty Discovery"]
  node_submission[("Pull Request Submissions<br/>[Submission.php]")]
  node_organizations["Organizations"]
end

subgraph group_progress["Progress and Community"]
  node_xp["Skill XP<br/>[XPHelper.php]"]
  node_reviews["Reviews<br/>[ReviewService.php]"]
  node_leaderboards["Leaderboards"]
end

subgraph group_core["Domain and Persistence"]
  node_provider_links[("Linked Accounts<br/>[UserProvider.php]")]
  node_bounty_records[("Bounties<br/>[Bounty.php]")]
  node_issue_records[("Issues and Repos<br/>[Issue.php]")]
  node_users[("User Profiles<br/>[User.php]")]
  node_review_records[("Review Records<br/>[Review.php]")]
end

node_developer(("Developer"))
node_codehost(("Git Providers"))
node_external_git(("Git Hosting Services"))

node_developer -->|"posts or claims"| node_bounty_flow
node_bounty_flow -->|"uses search"| node_bounty_search
node_bounty_search -->|"queries"| node_bounty_records
node_bounty_search -->|"filters issues"| node_issue_records
node_bounty_flow -->|"uses issues"| node_issue_records
node_bounty_flow -->|"uses repository service"| node_git_repo
node_bounty_flow -->|"handles submissions"| node_submission
node_developer -->|"connects account"| node_social_login
node_social_login -->|"creates or updates"| node_provider_links
node_social_login -->|"finds or creates"| node_users
node_social_login -->|"grants starter XP"| node_xp
node_git_repo -->|"dispatches to"| node_git_adapters
node_git_adapters -->|"calls provider APIs"| node_external_git
node_submission -->|"belongs to"| node_bounty_records
node_bounty_records -->|"belongs to"| node_issue_records
node_xp -->|"awards accepted work"| node_submission
node_xp -->|"updates totals"| node_users
node_developer -.->|"reviews collaborators"| node_reviews
node_reviews -->|"creates and reads"| node_review_records
node_developer -.->|"joins or manages"| node_organizations
node_developer -.->|"views rankings"| node_leaderboards

click node_social_login "https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/Socialite/ProviderCallbackController.php"
click node_provider_links "https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/UserProvider.php"
click node_git_repo "https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/GitRepoService.php"
click node_git_adapters "https://github.com/ag4hz/gitcodegud/tree/develop/app/Services"
click node_bounty_flow "https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/BountyController.php"
click node_bounty_search "https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/BountySearchService.php"
click node_bounty_records "https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Bounty.php"
click node_issue_records "https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Issue.php"
click node_submission "https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Submission.php"
click node_xp "https://github.com/ag4hz/gitcodegud/blob/develop/app/Helpers/XPHelper.php"
click node_users "https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/User.php"
click node_reviews "https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/ReviewService.php"
click node_review_records "https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Review.php"
click node_organizations "https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/OrganizationController.php"
click node_leaderboards "https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/LeaderboardService.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_social_login,node_git_repo,node_git_adapters toneBlue
class node_bounty_flow,node_bounty_search,node_submission,node_organizations toneAmber
class node_xp,node_reviews,node_leaderboards toneMint
class node_provider_links,node_bounty_records,node_issue_records,node_users,node_review_records toneRose
class node_developer,node_codehost,node_external_git toneIndigo
```

## Components

### Accounts and Integrations

- [Provider Login](https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/Socialite/ProviderCallbackController.php): `app/Http/Controllers/Socialite/ProviderCallbackController.php`
- [Repository Sync](https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/GitRepoService.php): `app/Services/GitRepoService.php`
- [Provider APIs](https://github.com/ag4hz/gitcodegud/tree/develop/app/Services): `app/Services`

### Bounty Lifecycle

- [Bounty Management](https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/BountyController.php): `app/Http/Controllers/BountyController.php`
- [Bounty Discovery](https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/BountySearchService.php): `app/Services/BountySearchService.php`
- [Pull Request Submissions](https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Submission.php): `app/Models/Submission.php`
- [Organizations](https://github.com/ag4hz/gitcodegud/blob/develop/app/Http/Controllers/OrganizationController.php): `app/Http/Controllers/OrganizationController.php`

### Progress and Community

- [Skill XP](https://github.com/ag4hz/gitcodegud/blob/develop/app/Helpers/XPHelper.php): `app/Helpers/XPHelper.php`
- [Reviews](https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/ReviewService.php): `app/Services/ReviewService.php`
- [Leaderboards](https://github.com/ag4hz/gitcodegud/blob/develop/app/Services/LeaderboardService.php): `app/Services/LeaderboardService.php`

### Domain and Persistence

- [Linked Accounts](https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/UserProvider.php): `app/Models/UserProvider.php`
- [Bounties](https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Bounty.php): `app/Models/Bounty.php`
- [Issues and Repos](https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Issue.php): `app/Models/Issue.php`
- [User Profiles](https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/User.php): `app/Models/User.php`
- [Review Records](https://github.com/ag4hz/gitcodegud/blob/develop/app/Models/Review.php): `app/Models/Review.php`

### Other components

- **Developer**
- **Git Providers**
- **Git Hosting Services**

## Connections

- Developer → Bounty Management: posts or claims (evidence: `README.md`)
- Bounty Management → Bounty Discovery: uses search (evidence: `app/Http/Controllers/BountyController.php`)
- Bounty Discovery → Bounties: queries (evidence: `app/Services/BountySearchService.php`)
- Bounty Discovery → Issues and Repos: filters issues (evidence: `app/Services/BountySearchService.php`)
- Bounty Management → Issues and Repos: uses issues (evidence: `app/Http/Controllers/BountyController.php`)
- Bounty Management → Repository Sync: uses repository service (evidence: `app/Http/Controllers/BountyController.php`)
- Bounty Management → Pull Request Submissions: handles submissions (evidence: `app/Http/Controllers/BountyController.php`)
- Developer → Provider Login: connects account (evidence: `README.md`)
- Provider Login → Linked Accounts: creates or updates (evidence: `app/Http/Controllers/Socialite/ProviderCallbackController.php`)
- Provider Login → User Profiles: finds or creates (evidence: `app/Http/Controllers/Socialite/ProviderCallbackController.php`)
- Provider Login → Skill XP: grants starter XP (evidence: `app/Http/Controllers/Socialite/ProviderCallbackController.php`)
- Repository Sync → Provider APIs: dispatches to (evidence: `app/Services/GitRepoService.php`)
- Provider APIs → Git Hosting Services: calls provider APIs (evidence: `app/Services/GitRepoService.php`)
- Pull Request Submissions → Bounties: belongs to (evidence: `app/Models/Submission.php`)
- Bounties → Issues and Repos: belongs to (evidence: `app/Models/Bounty.php`)
- Skill XP → Pull Request Submissions: awards accepted work (evidence: `app/Helpers/XPHelper.php`)
- Skill XP → User Profiles: updates totals (evidence: `app/Helpers/XPHelper.php`)
- Developer → Reviews: reviews collaborators (evidence: `README.md`)
- Reviews → Review Records: creates and reads (evidence: `app/Services/ReviewService.php`)
- Developer → Organizations: joins or manages (evidence: `README.md`)
- Developer → Leaderboards: views rankings (evidence: `README.md`)
