GitLedger is a review-accountability protocol for AI-era code review.
It links GitHub review events to onchain stake records, attestations, and resolution outcomes so reviewers have economic skin in the game.
- Frontend app (
app,components) for explorer, reviewer, repo, and dashboard views - Backend service (
backend) for:- GitHub webhook intake and repo install tracking
- OAuth routes for GitHub identity linking
- tRPC API surface used by frontend
- queue + worker pipeline for prompt-stake jobs
- onchain stake/resolve orchestration
- health checks for Postgres, Redis, GitHub, and Base RPC
- Smart contracts (
contract) for:- stake lifecycle (
ACTIVE,CLEAN,SLASHED) - treasury-subsidized yield payouts
- slash distribution and oracle-driven settlement
- stake lifecycle (
- Backend API:
https://backend-uuq8.onrender.com - Chain: Base Mainnet
- GitLedger contract:
0x0eCc198f69Bb0334A73250BC672FD157E13A87cc - GitLedger EAS attestor:
0x8D921d9329B810238566b88E7C0311f75B4373e3 - EAS schema UID:
0xa2236010ddea87b84147ee9dabcbf77d898fc3c575dfd7db8a2ae082a0d2e6be
app/,components/: Next.js frontendbackend/: Bun + Hono + tRPC backendcontract/: Solidity contracts, tests, and scripts.github/workflows/backend-cicd.yml: backend CI/CD
npm install
npm run dev:frontendcd backend
cp .env.example .env
bun install
bun run devcd contract
npm install
npm testUse backend/.env.example as the source template. Core required runtime fields include:
DATABASE_URL,REDIS_URLBASE_RPC_URL,SIGNER_PRIVATE_KEYGITLEDGER_CONTRACT,EAS_CONTRACT_BASE,EAS_SCHEMA_UID,TREASURY_ADDRESSGITHUB_APP_ID,GITHUB_APP_PRIVATE_KEY,GITHUB_WEBHOOK_SECRET,GITHUB_WEBHOOK_URL,GITHUB_TOKENGITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_CLIENT_SECRET,SESSION_SECRETINTERNAL_API_TOKENNOTIFIER_WEBHOOK_URL,NOTIFIER_WEBHOOK_AUTH_TOKEN(for prompt-stake notification receiver)
Schema string:
bytes32 stakeId, address reviewer, string status, bytes32 prHash
cd contract
set -a; source .env; set +a
npx hardhat run script/deploy.js --network baseFund from the configured treasuryManager wallet via contract function call.
Do not direct-transfer USDC to the contract for pool accounting.
cd contract
set -a; source .env; set +a
GITLEDGER_ADDRESS=0x0eCc198f69Bb0334A73250BC672FD157E13A87cc AMOUNT_USDC=3.5 npx hardhat run script/fundYieldPool.js --network baseWorkflow: .github/workflows/backend-cicd.yml
Jobs:
test- install deps, typecheck, unit/integration testsbuild- build and push backend image to GHCRrelease- create tag and GitHub releasedeploy- trigger Render hook when configured
- Backend: deployed and healthy
- Contract: deployed on Base Mainnet
MIT