TrustBridge Dashboard is the open-source web interface for the TrustBridge project. It connects GitHub contributor identities to Stellar G-addresses and validates payout readiness before Wave disbursements.
The problem: Stellar payments fail with
PAYMENT_NO_TRUSTwhen a recipient account lacks a trustline for the asset being sent (e.g. USDC). Maintainers need a single source of truth mappinggithub_username → stellar_addresswith live trustline and reserve checks — before batch payouts.
- Features
- Quick start
- Documentation
- Tech stack
- Routes & API
- Environment variables
- Deployment
- Contributing
- License
| Audience | Capability |
|---|---|
| Contributors | Sign in with GitHub OAuth, register a Stellar G-address, get live Horizon validation (funding, USDC trustline, XLM reserve) |
| Maintainers | View all registrations, filter by readiness, batch re-check via Horizon, export CSV for Wave payout prep |
| Everyone | Public landing page with Wave readiness stats |
| Status | Badge | Meaning |
|---|---|---|
| Ready | ✅ | Funded, USDC trustline active, XLM ≥ minimum reserve |
| Low reserve | Funded + trustline, but XLM below threshold | |
| Not ready | ❌ | Unfunded account or missing trustline |
- Node.js 18+ and npm
- PostgreSQL database (local, Neon, Supabase, or Vercel Postgres)
- GitHub OAuth App (create one here)
git clone https://github.com/your-org/trustbridge-dashboard.git
cd trustbridge-dashboard
npm installcp .env.example .env.localFill in all required values — see docs/ENVIRONMENT.md for full reference.
npm run db:pushnpm run devOpen http://localhost:3000.
GitHub OAuth callback URL (local):
http://localhost:3000/api/auth/callback/github
All docs are cross-linked from this README:
| Document | Description |
|---|---|
| Setup guide | Step-by-step local development setup |
| Environment variables | Every env var explained |
| Architecture | System design, data flow, auth model |
| Project structure | Directory layout and key files |
| Deployment | Vercel deployment checklist |
| Contributing | How to contribute to this repo |
| Layer | Technology |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS, shadcn/ui patterns |
| Data fetching | TanStack React Query |
| Auth | NextAuth.js + GitHub OAuth |
| Database | PostgreSQL + Prisma ORM |
| Blockchain | stellar-sdk + Horizon API |
| Deployment | Vercel (recommended) |
Brand colors: Stellar purple #3E1BDB, cyan accent #00B4D8. Dark mode supported.
| Route | Auth | Description |
|---|---|---|
/ |
Public | Landing page, TrustBridge explainer, Wave stats |
/register |
GitHub OAuth | Contributor Stellar address registration |
/dashboard |
GitHub OAuth + org member | Maintainer payout readiness table |
| Endpoint | Method | Description |
|---|---|---|
/api/auth/[...nextauth] |
GET/POST | NextAuth.js handlers |
/api/check |
POST | Horizon validation { address, asset_code?, asset_issuer? } |
/api/register |
GET/POST | Read/save contributor registration (authenticated) |
/api/contributors |
GET/POST | List contributors / batch re-check (maintainer only) |
/api/stats |
GET | Aggregate readiness statistics |
src/middleware.ts protects /register (requires sign-in) and /dashboard (requires sign-in + GITHUB_MAINTAINER_ORG membership).
Copy .env.example to .env.local and configure:
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=
GITHUB_MAINTAINER_ORG=
DATABASE_URL=
NEXT_PUBLIC_HORIZON_URL=https://horizon.stellar.org
NEXT_PUBLIC_DEFAULT_ASSET_CODE=USDC
NEXT_PUBLIC_DEFAULT_ASSET_ISSUER=GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX5IHOWEBMGJI55ITFSZ6
NEXT_PUBLIC_MIN_XLM_BALANCE=1
SOROBAN_CONTRACT_ID= # optional, future on-chain registrySee docs/ENVIRONMENT.md for details.
Generate NEXTAUTH_SECRET:
openssl rand -base64 32This project is optimized for Vercel:
- Push to GitHub
- Import repo in Vercel
- Add environment variables from docs/ENVIRONMENT.md
- Attach a Postgres database (Vercel Postgres, Neon, etc.)
- Run
npm run db:pushagainst productionDATABASE_URL - Set GitHub OAuth callback to
https://your-domain.vercel.app/api/auth/callback/github
Full checklist: docs/DEPLOYMENT.md
We welcome contributions! Please read docs/CONTRIBUTING.md before opening a PR.
Quick flow:
- Fork the repo
- Create a feature branch (
git checkout -b feat/my-feature) - Commit with clear messages
- Open a pull request against
main
The scaffold stores registrations in PostgreSQL. Set SOROBAN_CONTRACT_ID when an on-chain Soroban registry is deployed — integration hooks can mirror writes to the contract (see docs/ARCHITECTURE.md).
This project is licensed under the MIT License.