Thanks for your interest in contributing to Stashu!
git clone https://github.com/keshav0479/Stashu.git
cd Stashu
npm install
# Server environment
cp server/.env.example server/.env
# Edit server/.env - TOKEN_ENCRYPTION_KEY is required:
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Client environment (optional - defaults work for local dev)
cp client/.env.example client/.env
# Start dev servers (client on :5173, server on :3000)
npm run dev# All tests
npm test
# Server tests only
npm test --workspace=server
# Single test file
npx tsx --test server/src/lib/encryption.test.tsStashu uses Cashu mints for payments. For local development, you need access to a mint with real (small amounts of) sats:
| Mint | URL | Notes |
|---|---|---|
| Minibits | https://mint.minibits.cash/Bitcoin |
Default. Reliable, small fees |
| LNbits (self-hosted) | http://localhost:5000/cashu/api/v1/... |
Run your own, full control |
Getting test sats:
- Install Minibits (mobile) or use Nutstash (web)
- Receive a small Lightning payment (10-100 sats) from a faucet or friend
- Mint Cashu tokens from the Lightning payment
- Use those tokens to test the buy flow, or paste invoices for the sell flow
Cashu operates on mainnet Lightning, so there's no "testnet" mode. Keep test amounts small (10-100 sats). For a fully isolated setup, self-host an LNbits instance with the Cashu extension.
- Prettier formats all code on pre-commit (via husky + lint-staged)
- ESLint runs on client code:
npm run lint --workspace=client - Single quotes, semicolons, 100 char line width, trailing commas (es5)
To check formatting manually:
npx prettier --check .- Create a feature branch from
main - Make your changes with clear, focused commits
- Ensure
npm run build,npm test, andnpx prettier --check .all pass - Open a PR against
mainwith a description of what changed and why
client/ React + Vite + TailwindCSS frontend
server/ Hono + SQLite backend
shared/ TypeScript types shared between client and server
If you find a security vulnerability, do not open a public issue. Instead, email the maintainer directly or use GitHub's private vulnerability reporting feature.
By contributing, you agree that your contributions will be licensed under the MIT License.