Royalty splitting for Nigeria's creative economy, powered by Stellar and Soroban.
SplitNaira is in active development. This repo currently contains:
contracts/Soroban smart contract and testsfrontend/Next.js + Tailwind scaffoldbackend/Express API scaffolddemo/Static HTML flow prototype
- Frontend: Next.js (App Router), TailwindCSS, TypeScript
- Backend: Node.js, Express, TypeScript
- Smart contracts: Soroban (Rust)
- Blockchain: Stellar (testnet + mainnet)
Prerequisites:
- Node.js >= 18
- Rust + Cargo
- Stellar CLI (optional for deploy)
- Frontend
cd frontend
npm install
npm run dev- Backend
cd backend
npm install
npm run dev- Contracts
cd contracts
cargo build
cargo test- Environment setup
# Frontend
cp frontend/.env.example frontend/.env.local
# Backend
cp backend/.env.example backend/.envUse this guide to build the Soroban contract, deploy to Stellar testnet, and wire the deployed contract ID into backend/frontend.
stellarCLI installed and authenticated- Rust toolchain installed
- A funded Stellar testnet account for deployment
cd contracts
stellar contract buildBuilt artifact is generated under contracts/target/wasm32v1-none/release/.
stellar network add testnet --rpc-url https://soroban-testnet.stellar.org --network-passphrase "Test SDF Network ; September 2015"If your deployer key is not set up yet:
stellar keys generate alice
stellar keys fund alice --network testnetFrom contracts/, run:
stellar contract deploy \
--wasm target/wasm32v1-none/release/splitnaira_contract.wasm \
--source alice \
--network testnetCopy the returned contract ID (starts with C...).
Update backend/.env:
HORIZON_URL=https://horizon-testnet.stellar.org
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
SOROBAN_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
CONTRACT_ID=<PASTE_TESTNET_CONTRACT_ID>Update frontend/.env.local:
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_CONTRACT_ID=<PASTE_TESTNET_CONTRACT_ID># terminal 1
cd backend
npm install
npm run dev# terminal 2
cd frontend
npm install
npm run dev- Backend health endpoint responds at
http://localhost:3001/health - Frontend loads at
http://localhost:3000 - Creating a split from frontend/backend flow returns an unsigned XDR built against your deployed testnet contract ID
splitnaira/
backend/
src/
index.ts
routes/
services/
middleware/
contracts/
Cargo.toml
lib.rs
errors.rs
events.rs
tests.rs
demo/
frontend demo.html
frontend/
src/
app/
components/
lib/
GitHub Actions runs the following checks:
- Frontend:
npm run lint,npm run build - Backend:
npm run lint,npm run build - Contracts:
cargo test
- Backend deployment workflow:
.github/workflows/backend-deploy.yml - Default deploy target: Render
- Deployment setup docs: docs/backend-deploy.md
- Contract baseline
- Frontend scaffold
- Backend scaffold
- Wallet integration
- Split creation UI wired to Soroban
- Testnet deployment
- Earnings dashboard
- Mainnet launch
We welcome contributions from developers, designers, and creatives who care about fair pay in Nigeria's creative economy.
Please read our CONTRIBUTING.md to get started.
This project is licensed under the MIT License. See LICENSE for details.