Skip to content

Darkdruce/OpenDrip-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenDrip

Continuous, transparent funding for open-source contributors — powered by Stellar and Drips.

OpenDrip is an open-source funding infrastructure that automatically streams payments to contributors based on their measurable impact on a project. Sponsors fund a pool, GitHub contributions are tracked and scored, and funds flow continuously to developers via Stellar.


The Problem

Open-source software powers the internet, yet most contributors:

  • Work without stable income
  • Depend on irregular, one-off donations
  • Have no transparent system for fair fund distribution

Most donation platforms send money only to project owners — not the people doing the actual work.

OpenDrip fixes this.


How It Works

Sponsor deposits funds
        ↓
Funds accumulate in project treasury (Drips pool)
        ↓
GitHub activity is tracked (commits, PRs, issues, docs)
        ↓
Contribution scores are calculated per contributor
        ↓
Funds are distributed proportionally via Stellar payments
        ↓
Contributors receive continuous payment streams

Example

A project has a monthly pool of $5,000 and three contributors:

Contributor Commits PRs Merged Issues Resolved Score Share Monthly Hourly
Alice 50 10 5 95 50% $2,500 $3.47
Ben 20 5 8 51 27% $1,350 $1.88
Chika 5 2 2 21 11% $550 $0.76

Scores are calculated using weighted contribution metrics. Payments are streamed continuously rather than sent in monthly lump sums.


Project Structure

OpenDrip/
├── apps/
│   ├── web/                    # Next.js frontend dashboard
│   │   ├── pages/              # Dashboard, project, contributor views
│   │   ├── components/         # Reusable UI components
│   │   ├── hooks/              # React hooks
│   │   └── styles/             # Global styles
│   │
│   └── api/                    # Express backend API
│       └── src/
│           ├── index.ts        # Server entry point
│           └── routes/         # contributors, pools, payments
│
├── packages/
│   ├── stellar/                # Stellar SDK — wallet, payments, transactions
│   ├── drips/                  # Drips — funding streams and project pools
│   ├── github/                 # GitHub — contribution tracking
│   ├── payments/               # Payment distribution and treasury
│   └── reputation/             # Contributor scoring engine
│
├── contracts/
│   └── funding_pool/           # Funding pool allocation logic
│
├── scripts/
│   ├── deploy.ts               # Deploy treasury and pool
│   └── seed-data.ts            # Seed demo data
│
├── tests/
│   ├── unit/                   # Unit tests (scoring, treasury)
│   └── integration/            # Integration tests (pools, distribution)
│
├── docs/                       # Full documentation
└── config/                     # Environment configuration

Packages

packages/stellar

Wraps the Stellar SDK for wallet management, XLM payments, and transaction history.

File Description
wallet.ts Create wallets, fetch balances
payments.ts Send XLM payments on testnet/mainnet
transactions.ts Fetch transaction history for an account

packages/drips

Manages Drips-based funding streams and project pools.

File Description
pools.ts Create and fund project pools
streams.ts Create and list continuous payment streams

packages/github

Connects to the GitHub API to collect contribution data.

File Description
contributors.ts Fetch contributor metrics (commits, PRs, issues)
metrics.ts Per-contributor commit and PR counts

packages/reputation

Scoring engine that calculates each contributor's share of the funding pool.

Scoring formula:

score = (commits × 1) + (mergedPRs × 3) + (issuesResolved × 2) + (docsContributions × 1.5)
share = contributor_score / total_score

packages/payments

Handles fund distribution and treasury balance management.

File Description
distribution.ts Distribute pool proportionally via Stellar
treasury.ts Deposit, withdraw, and query treasury balance

API Reference

Base URL: http://localhost:3001

Contributors

GET /contributors/:owner/:repo

Returns scored contributors for a GitHub repo.

Response:

[
  {
    "login": "alice",
    "commits": 50,
    "mergedPRs": 10,
    "issuesResolved": 5,
    "docsContributions": 0,
    "score": 95,
    "share": 0.503
  }
]

Pools

GET  /pools              → list all pools
POST /pools              → create a pool  { "project": "my-repo" }
POST /pools/:id/fund     → fund a pool    { "amount": 5000 }

Payments

POST /payments/distribute

Fetches GitHub metrics, scores contributors, and distributes funds via Stellar.

Body:

{
  "owner": "my-org",
  "repo": "my-repo",
  "totalAmountXLM": 1000,
  "senderSecret": "S..."
}

Response:

{
  "summary": [
    {
      "contributor": "alice",
      "share": "50.30%",
      "amountXLM": "503.0000000",
      "hourlyRateXLM": "0.6986111"
    }
  ],
  "results": [
    { "contributor": "alice", "amount": "503.0000000", "success": true }
  ]
}

Getting Started

Prerequisites

  • Node.js 18+
  • A GitHub personal access token
  • A Stellar testnet account (get one free)

Installation

git clone https://github.com/Darkdruce/OpenDrip-
cd OpenDrip-
npm install

Configuration

cp config/.env.example config/.env

Edit config/.env:

GITHUB_TOKEN=your_github_token
STELLAR_SECRET=your_stellar_secret_key
STELLAR_NETWORK=testnet

Run

# Start API + web dashboard
npm run dev

# Or individually
npm run dev --workspace=apps/api
npm run dev --workspace=apps/web

Seed demo data

npm run seed

Roadmap

  • Project scaffold and package structure
  • GitHub contribution tracking
  • Weighted scoring engine
  • Stellar payment distribution
  • Drips pool management
  • REST API (contributors, pools, payments)
  • Frontend dashboard (contributor view)
  • Drips protocol on-chain integration
  • Continuous streaming (per-second payouts)
  • Sponsor dashboard and deposit flow
  • DAO governance for weight configuration
  • Multi-repo contributor aggregation
  • AI-based contribution analysis
  • Cross-chain funding pools

Contributing

See docs/contribution.md.


License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors