This guide covers the local setup, architecture, testing workflow, and pull request expectations for Stellar-Batch-Pay.
- Node.js 20 or newer
- npm 10 or newer
- Rust toolchain with
wasm32-unknown-unknown - Soroban CLI
- Clone your fork and add the upstream remote if needed:
git clone https://github.com/<your-user>/Stellar-Batch-Pay.git
cd Stellar-Batch-Pay
git remote add upstream https://github.com/jahrulezfrancis/Stellar-Batch-Pay.git- Install JavaScript dependencies:
npm install- Install the Soroban target for contract builds:
rustup target add wasm32-unknown-unknown- Install Soroban CLI if it is not already available:
cargo install --locked soroban-cliRun the web app locally:
npm run devThe Next.js application will be available at http://localhost:3000.
The repository is organized into three main areas:
app/: Next.js App Router pages and API routescomponents/: reusable client-side UI componentslib/stellar/: parsing, validation, batching, and transaction-building logiccontracts/batch-vesting/: Soroban smart contract for time-locked batch vestingtests/: Vitest unit tests for the JavaScript and TypeScript payment logic
lib/stellar/parser.ts: converts JSON and CSV files into payment rowslib/stellar/validator.ts: validates Stellar addresses, assets, and batch settingslib/stellar/batcher.ts: groups valid payment instructions into transaction-safe batchesapp/api/batch-build/route.ts: builds unsigned batch transactions for wallet signing
Run the JavaScript and TypeScript test suite:
npm testRun the production build:
npm run buildRun the Soroban contract tests from the contracts/ workspace:
cargo test --manifest-path contracts/Cargo.tomlBuild the Soroban contract artifacts:
cargo build --manifest-path contracts/Cargo.toml --target wasm32-unknown-unknownBefore opening a pull request, make sure the relevant local checks complete successfully.
- Create a focused branch from the latest
main - Keep each pull request scoped to a small set of related changes
- Add or update tests for behavior changes
- Update docs when the user-facing flow or developer workflow changes
- Include the linked issue numbers in the PR description
- Confirm the web app build and the relevant test suite pass locally before pushing
- Use clear commit messages describing the behavior change
- Avoid mixing refactors with unrelated fixes
- Do not force-push over someone else’s branch without coordination
When opening an issue or PR, include:
- expected behavior
- actual behavior
- reproduction steps
- logs, screenshots, or failing test output when available