# superteamdao/earn architecture

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

- Interactive diagram: https://gitdiagram.com/superteamdao/earn
- Repository: https://github.com/superteamdao/earn

## Overview

Superteam Earn connects crypto project sponsors with talent through opportunity listings, applications/submissions, sponsor review, grants, and payment-related wallet features. The graph highlights discovery and participation, sponsor-side publishing/review, grant administration, and supporting engagement and account capabilities. The README establishes MySQL, Privy, Cloudinary, Resend, Jupiter, and Solana RPC as integrations; only the wallet-to-RPC and sampled API-to-feature relationships are shown where evidence supports them. Most source excerpts are incomplete, so unsampled endpoint wiring is intentionally left out.

Main entry points: [`src/app/api/wallet/create-signed-transaction/route.ts`](https://github.com/superteamdao/earn/blob/main/src/app/api/wallet/create-signed-transaction/route.ts) (Wallet Transactions), [`src/features/search/hooks/useSearchState.ts`](https://github.com/superteamdao/earn/blob/main/src/features/search/hooks/useSearchState.ts) (Listing Search State), [`src/features/feed/queries/home-feed.ts`](https://github.com/superteamdao/earn/blob/main/src/features/feed/queries/home-feed.ts) (Home Feed), [`src/features/listing-builder/components/ListingBuilder.tsx`](https://github.com/superteamdao/earn/blob/main/src/features/listing-builder/components/ListingBuilder.tsx) (Listing Builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discover Opportunities"]
  node_listing_search["Listing Search State<br/>[useSearchState.ts]"]
  node_listing_api["Listings API<br/>[route.ts]"]
  node_home_feed["Home Feed<br/>[home-feed.ts]"]
  node_feed_api["Homepage Feed API<br/>[route.ts]"]
  node_hackathons["Hackathon Discovery"]
end

subgraph group_participation["Talent Participation"]
end

subgraph group_sponsor["Sponsor Operations"]
  node_listing_builder["Listing Builder<br/>[ListingBuilder.tsx]"]
  node_sponsor_listing_api["Sponsor Listing Actions<br/>[route.ts]"]
  node_listing_ai["Listing AI Generation<br/>[route.ts]"]
  node_submission_review["Submission Review"]
  node_submission_review_api["Commit Submission Reviews<br/>[route.ts]"]
  node_grant_ai_review["Grant AI Review"]
  node_grant_review_api["Commit Grant Reviews<br/>[route.ts]"]
end

subgraph group_grants["Grant Programs"]
  node_grant_browse["Grant Programs<br/>[GrantsSection.tsx]"]
  node_grant_api["Grant Applications API<br/>[route.ts]"]
  node_grant_tranche["Grant Tranches<br/>[route.ts]"]
end

subgraph group_platform["Accounts And Support"]
  node_auth["Authentication<br/>[SignIn.tsx]"]
  node_auth_session["User Session<br/>[getUserSession.ts]"]
  node_wallet_api["Wallet Transactions<br/>[route.ts]"]
  node_credits["Credits And Disputes<br/>[route.ts]"]
  node_kyc["Identity Verification"]
end

node_talent(("Talent"))
node_sponsor_actor(("Sponsor"))
node_solana_rpc{{"Solana RPC"}}
node_spam_service{{"Dispute Notification Service"}}

node_talent -->|"filters listings"| node_listing_search
node_listing_search -->|"requests listings"| node_listing_api
node_talent -->|"views activity"| node_home_feed
node_home_feed -->|"loads feed"| node_feed_api
node_talent -->|"explores events"| node_hackathons
node_sponsor_actor -->|"creates opportunity"| node_listing_builder
node_listing_builder -.->|"requests content"| node_listing_ai
node_sponsor_actor -->|"publishes listing"| node_sponsor_listing_api
node_submission_review -->|"commits reviews"| node_submission_review_api
node_grant_ai_review -->|"commits reviews"| node_grant_review_api
node_talent -->|"explores grants"| node_grant_browse
node_talent -->|"applies for grant"| node_grant_api
node_talent -->|"requests tranche"| node_grant_tranche
node_talent -->|"signs in"| node_auth
node_auth -->|"establishes session"| node_auth_session
node_wallet_api -->|"validates session"| node_auth_session
node_wallet_api -->|"submits transaction"| node_solana_rpc
node_talent -->|"disputes credit"| node_credits
node_credits -->|"notifies dispute"| node_spam_service
node_sponsor_actor -->|"verifies identity"| node_kyc

click node_listing_search "https://github.com/superteamdao/earn/blob/main/src/features/search/hooks/useSearchState.ts"
click node_listing_api "https://github.com/superteamdao/earn/blob/main/src/app/api/listings/route.ts"
click node_home_feed "https://github.com/superteamdao/earn/blob/main/src/features/feed/queries/home-feed.ts"
click node_feed_api "https://github.com/superteamdao/earn/blob/main/src/app/api/homepage/feed/route.ts"
click node_hackathons "https://github.com/superteamdao/earn/blob/main/src/features/hackathon/components/HackathonSection.tsx"
click node_listing_builder "https://github.com/superteamdao/earn/blob/main/src/features/listing-builder/components/ListingBuilder.tsx"
click node_sponsor_listing_api "https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/listing/%5Bid%5D/publish/route.ts"
click node_listing_ai "https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/ai-generate/title/route.ts"
click node_submission_review "https://github.com/superteamdao/earn/blob/main/src/features/sponsor-dashboard/mutations/useCommitReviewsSubmissions.ts"
click node_submission_review_api "https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/submissions/ai/commit-reviewed/route.ts"
click node_grant_ai_review "https://github.com/superteamdao/earn/blob/main/src/features/sponsor-dashboard/mutations/useCommitReviewsGrantApplications.ts"
click node_grant_review_api "https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/grant-application/ai/commit-reviewed/route.ts"
click node_grant_browse "https://github.com/superteamdao/earn/blob/main/src/features/grants/components/GrantsSection.tsx"
click node_grant_api "https://github.com/superteamdao/earn/blob/main/src/app/api/grant-application/create/route.ts"
click node_grant_tranche "https://github.com/superteamdao/earn/blob/main/src/app/api/grant-application/request-tranche/route.ts"
click node_auth "https://github.com/superteamdao/earn/blob/main/src/features/auth/components/SignIn.tsx"
click node_auth_session "https://github.com/superteamdao/earn/blob/main/src/features/auth/utils/getUserSession.ts"
click node_wallet_api "https://github.com/superteamdao/earn/blob/main/src/app/api/wallet/create-signed-transaction/route.ts"
click node_credits "https://github.com/superteamdao/earn/blob/main/src/app/api/spam-dispute/route.ts"
click node_kyc "https://github.com/superteamdao/earn/blob/main/src/features/kyc/utils/checkVerificationStatus.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_listing_search,node_listing_api,node_home_feed,node_feed_api,node_hackathons toneBlue
class node_listing_builder,node_sponsor_listing_api,node_listing_ai,node_submission_review,node_submission_review_api,node_grant_ai_review,node_grant_review_api toneMint
class node_grant_browse,node_grant_api,node_grant_tranche toneRose
class node_auth,node_auth_session,node_wallet_api,node_credits,node_kyc,node_talent,node_sponsor_actor,node_solana_rpc,node_spam_service toneIndigo
```

## Components

### Discover Opportunities

- [Listing Search State](https://github.com/superteamdao/earn/blob/main/src/features/search/hooks/useSearchState.ts): `src/features/search/hooks/useSearchState.ts`
- [Listings API](https://github.com/superteamdao/earn/blob/main/src/app/api/listings/route.ts): `src/app/api/listings/route.ts`
- [Home Feed](https://github.com/superteamdao/earn/blob/main/src/features/feed/queries/home-feed.ts): `src/features/feed/queries/home-feed.ts`
- [Homepage Feed API](https://github.com/superteamdao/earn/blob/main/src/app/api/homepage/feed/route.ts): `src/app/api/homepage/feed/route.ts`
- [Hackathon Discovery](https://github.com/superteamdao/earn/blob/main/src/features/hackathon/components/HackathonSection.tsx): `src/features/hackathon/components/HackathonSection.tsx`

### Sponsor Operations

- [Listing Builder](https://github.com/superteamdao/earn/blob/main/src/features/listing-builder/components/ListingBuilder.tsx): `src/features/listing-builder/components/ListingBuilder.tsx`
- [Sponsor Listing Actions](https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/listing/%5Bid%5D/publish/route.ts): `src/app/api/sponsor-dashboard/listing/[id]/publish/route.ts`
- [Listing AI Generation](https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/ai-generate/title/route.ts): `src/app/api/sponsor-dashboard/ai-generate/title/route.ts`
- [Submission Review](https://github.com/superteamdao/earn/blob/main/src/features/sponsor-dashboard/mutations/useCommitReviewsSubmissions.ts): `src/features/sponsor-dashboard/mutations/useCommitReviewsSubmissions.ts`
- [Commit Submission Reviews](https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/submissions/ai/commit-reviewed/route.ts): `src/app/api/sponsor-dashboard/submissions/ai/commit-reviewed/route.ts`
- [Grant AI Review](https://github.com/superteamdao/earn/blob/main/src/features/sponsor-dashboard/mutations/useCommitReviewsGrantApplications.ts): `src/features/sponsor-dashboard/mutations/useCommitReviewsGrantApplications.ts`
- [Commit Grant Reviews](https://github.com/superteamdao/earn/blob/main/src/app/api/sponsor-dashboard/grant-application/ai/commit-reviewed/route.ts): `src/app/api/sponsor-dashboard/grant-application/ai/commit-reviewed/route.ts`

### Grant Programs

- [Grant Programs](https://github.com/superteamdao/earn/blob/main/src/features/grants/components/GrantsSection.tsx): `src/features/grants/components/GrantsSection.tsx`
- [Grant Applications API](https://github.com/superteamdao/earn/blob/main/src/app/api/grant-application/create/route.ts): `src/app/api/grant-application/create/route.ts`
- [Grant Tranches](https://github.com/superteamdao/earn/blob/main/src/app/api/grant-application/request-tranche/route.ts): `src/app/api/grant-application/request-tranche/route.ts`

### Accounts And Support

- [Authentication](https://github.com/superteamdao/earn/blob/main/src/features/auth/components/SignIn.tsx): `src/features/auth/components/SignIn.tsx`
- [User Session](https://github.com/superteamdao/earn/blob/main/src/features/auth/utils/getUserSession.ts): `src/features/auth/utils/getUserSession.ts`
- [Wallet Transactions](https://github.com/superteamdao/earn/blob/main/src/app/api/wallet/create-signed-transaction/route.ts): `src/app/api/wallet/create-signed-transaction/route.ts`
- [Credits And Disputes](https://github.com/superteamdao/earn/blob/main/src/app/api/spam-dispute/route.ts): `src/app/api/spam-dispute/route.ts`
- [Identity Verification](https://github.com/superteamdao/earn/blob/main/src/features/kyc/utils/checkVerificationStatus.ts): `src/features/kyc/utils/checkVerificationStatus.ts`

### Other components

- **Talent**
- **Sponsor**
- **Solana RPC**
- **Dispute Notification Service**

## Connections

- Talent → Listing Search State: filters listings
- Listing Search State → Listings API: requests listings
- Talent → Home Feed: views activity
- Home Feed → Homepage Feed API: loads feed
- Talent → Hackathon Discovery: explores events
- Sponsor → Listing Builder: creates opportunity
- Listing Builder → Listing AI Generation: requests content
- Sponsor → Sponsor Listing Actions: publishes listing
- Submission Review → Commit Submission Reviews: commits reviews
- Grant AI Review → Commit Grant Reviews: commits reviews
- Talent → Grant Programs: explores grants
- Talent → Grant Applications API: applies for grant
- Talent → Grant Tranches: requests tranche
- Talent → Authentication: signs in
- Authentication → User Session: establishes session
- Wallet Transactions → User Session: validates session
- Wallet Transactions → Solana RPC: submits transaction
- Talent → Credits And Disputes: disputes credit
- Credits And Disputes → Dispute Notification Service: notifies dispute
- Sponsor → Identity Verification: verifies identity
