Skip to content

feat: add GitHub Repo Marketplace backend (Closes #857) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] - #1460

Open
waterWang wants to merge 15 commits into
SolFoundry:mainfrom
waterWang:feat/marketplace
Open

feat: add GitHub Repo Marketplace backend (Closes #857) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]#1460
waterWang wants to merge 15 commits into
SolFoundry:mainfrom
waterWang:feat/marketplace

Conversation

@waterWang

Copy link
Copy Markdown

GitHub Repo Marketplace

Closes #857

Reward: 1M $FNDRY | Tier: T3 | Domain: Marketplace, Backend

What is included

A complete FastAPI backend module for the GitHub Repo Marketplace:

Backend Structure

backend/
├── requirements.txt
├── app/
│   ├── __init__.py
│   ├── main.py              # FastAPI app with marketplace routes
│   ├── config.py             # Settings (pydantic-settings)
│   ├── database.py           # SQLAlchemy async session
│   ├── models.py             # RepoListing, FundingGoal, Contribution, Distribution
│   ├── schemas.py            # Pydantic request/response schemas
│   ├── github_client.py      # GitHub REST API client for repo discovery
│   ├── routes/
│   │   ├── __init__.py
│   │   └── marketplace.py    # Full REST API for marketplace
│   ├── services/
│   │   ├── __init__.py
│   │   └── marketplace.py    # Business logic layer
│   └── tests/
│       ├── __init__.py
│       └── test_marketplace.py

API Endpoints

  • GET /marketplace/repos — List repos with language/star/search filtering
  • POST /marketplace/repos — Add a repo (auto-enriches with GitHub metadata)
  • GET /marketplace/repos/{id} — Get repo details
  • POST /marketplace/repos/{id}/goals — Create funding goal
  • GET /marketplace/repos/{id}/goals — List goals for a repo
  • GET /marketplace/goals — List all goals (with optional status filter)
  • GET /marketplace/stats — Aggregated marketplace stats
  • POST /marketplace/goals/{id}/contributions — Contribute to a goal
  • GET /marketplace/goals/{id}/contributions — List contributions
  • POST /marketplace/goals/{id}/distributions — Create payment distribution
  • GET /marketplace/goals/{id}/distributions — List distributions
  • PATCH /marketplace/distributions/{id}/complete — Mark distribution as completed

Acceptance Criteria Covered

  • ✅ GitHub repo discovery with filtering by language/stars
  • ✅ Funding goal setup and progress tracking
  • ✅ Payment distribution to contributors
  • ✅ Auto-enrichment from GitHub API on repo add
  • ✅ Async SQLAlchemy + PostgreSQL persistence
  • ✅ Aggregated stats endpoint
  • ✅ Pydantic validation on all endpoints
  • ✅ Synthetic test suite

Design Principles

  • Async-first: All DB and HTTP calls are async (FastAPI + SQLAlchemy async + httpx)
  • Layered architecture: routes → services → models → DB
  • Graceful degradation: GitHub API enrichment fails silently, keeps minimal data
  • FNDRY-native: All amounts tracked in FNDRY with Solana wallet addresses
  • Testable: Service layer is decoupled from HTTP, tests use ASGITransport

Wallet: fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T3: GitHub Repo Marketplace

1 participant