Thanks for considering contributing — this project is built in the open specifically so others can help. This guide covers everything you need to go from "cloned the repo" to "opened a PR."
- Read README.md for what Astrea is and why it exists.
- Read docs/architecture.md for how the pieces fit together, and the ADRs behind key decisions — several of them (ADR-003, ADR-005, ADR-006) exist because a real assumption turned out to be wrong when tested, which is exactly the kind of thing worth reading before you build on top of it.
- Check docs/build-plan.md for the current phase and task list. Every GitHub issue traces back to a coded task there (e.g.
[E02],[U01]) — the code in an issue title tells you which phase it belongs to and what depends on it.
Fork the repo first (top-right on GitHub) — you won't have push access to Astrea-Payouts/astrea directly, and a PR has to come from a branch GitHub can see, which means your fork. Then clone your fork, not the upstream one:
git clone https://github.com/<your-username>/astrea.git
cd astrea
git remote add upstream https://github.com/Astrea-Payouts/astrea.git
npm install
cp .env.example .envThe upstream remote is so you can pull in new work before starting a task:
git fetch upstream
git checkout main
git merge upstream/mainFill in .env following the comments in .env.example and prisma/README.md:
- Database: a free Supabase project gets you
DATABASE_URL/DIRECT_URL— seeprisma/README.mdfor the exact steps and the migration-baseline gotcha before runningprisma migrate devfor the first time. - Trustless Work: request a testnet API key at dapp.trustlesswork.com (BackOffice → API keys). Never a mainnet key for local dev.
- Stellar network: leave
NEXT_PUBLIC_STELLAR_NETWORK=testnetandALLOW_MAINNET=false. See ADR in architecture.md for why mainnet is gated behind an explicit flag.
npm run dev # start the dev server
npm run test # run the test suite (Vitest)
npm run lint # Biome check
npm run typecheck # tsc --noEmit
npm run build # production buildTo exercise anything wallet-related you'll need one of Freighter, Albedo, xBull, or LOBSTR, set to testnet. Freighter is the most common for local dev — after installing, switch its network to Testnet (Settings → Security → Network) before connecting.
This repo uses Biome for linting/formatting and Husky + commitlint for commit hygiene, both locally and in CI:
- Pre-commit:
lint-stagedruns Biome on staged files automatically. If it can't auto-fix something, the commit is blocked until you do. - Commit messages: must follow Conventional Commits (
feat: add event wizard,fix: trustline check,docs: update README). Enforced locally by a Husky hook and again in CI on every PR — a bypassed local hook still gets caught. - CI: every PR runs lint, typecheck, test, and build. All four must pass before merge.
If a check fails and you're not sure why, the error output is usually specific enough to act on directly — Biome and tsc both point at exact lines.
- Branch off your fork's
main, push it to your fork, then open the PR from there againstAstrea-Payouts/astrea:main— GitHub does this automatically when you push a branch to your fork and click "Compare & pull request." - Reference the issue you're working on in the PR description (
Closes #123). - Keep it scoped to the linked task — if you find something else worth fixing along the way, open a separate issue rather than bundling it in.
- If your change touches money movement (anything under
E0*, escrow calls, signing, the reconciliation job) — say so explicitly in the PR description and how you verified it on testnet. These get extra review; see thesecuritylabel. - Update docs alongside code — if you change a decision recorded in an ADR, update the ADR rather than leaving it stale. A wrong doc is worse than no doc.
- Open a GitHub Discussion or an issue with the
questionlabel for anything project-specific. - For general Stellar/Soroban questions unrelated to Astrea itself, the Stellar Developers Discord is a better fit.
If you find something that could put user funds or data at risk, please don't open a public issue. Email the maintainer directly (see the GitHub profile on the repo) with details, and allow time for a fix before any public disclosure. Everything else — non-security bugs, feature requests, questions — is fine as a normal public issue.
By contributing, you agree your contributions are licensed under the project's MIT License.