A Stellar-based rent payment dApp that helps roommates send, track, and verify rent payments on-chain
Live Demo • Quick Start • Smart Contracts • Features • Documentation • Contributing
SplitRent is a production-ready decentralized application (dApp) built on the Stellar blockchain that solves the common problem of splitting rent and managing shared expenses among roommates. Leveraging Soroban smart contracts, SplitRent provides transparent, secure, and automated rent payment splitting with full on-chain verification.
| Benefit | Description |
|---|---|
| Transparent | All transactions are recorded on-chain and publicly verifiable via Stellar Explorer |
| Automated | Smart contracts automatically split and distribute rent among participants |
| Secure | Funds are held in escrow with built-in dispute resolution and refund mechanisms |
| User-Friendly | Intuitive interface with seamless multi-wallet integration |
| Battle-Tested | 28 comprehensive smart contract tests with full coverage |
Our Soroban escrow smart contract is deployed on Stellar Testnet:
| Property | Value |
|---|---|
| Contract Address | CBA5V42PSZBF5EIDTFEVSBPPUWXIT6QNOVHBJM6BBDM4U33JLZ3MOGIC |
| WASM Hash | 1bb75a3a55667aa0c4033c7cfba8e6d5863b5fb29d49b3190e2cfcf4e1f447de |
| Deployment TX | 1e465506275f45c9c7356b935d646ed89a1c10323ca9e5fba43777f122f2a5cc |
| Network | Stellar Testnet (Test SDF Network ; September 2015) |
| WASM Size | 16,242 bytes |
| Test Coverage | 28 tests passing ✅ |
- Escrow Management: Create, fund, and manage rent-splitting escrows
- Multi-Participant Support: Add unlimited roommates to a single escrow
- Automated Distribution: Automatic fund splitting and landlord payment
- Refund Mechanism: Time-based refunds if funding deadline not met
- Dispute Resolution: Built-in arbitration for exceptional cases
- Reentrancy Protection: Security-first design with transfer guards
┌─────────────┐
│ Active │ ──► Timeout/Cancel ──► Refunding ──► Refunded
│ (Created) │
└─────┬───────┘
│
▼ (All deposits received)
┌─────────────┐
│ FullyFunded │ ──► Dispute ──► Disputed ──► Resolved
└─────┬───────┘
│
▼ (Release called)
┌─────────────┐
│ Released │
└─────────────┘
Experience SplitRent on Stellar Testnet:
| Resource | Link |
|---|---|
| 🌐 Live Application | https://splitrent.vercel.app |
| � Network | Stellar Testnet (default) |
| � Get Test XLM | Stellar Laboratory |
| � Contract Explorer | View on Stellar Expert |
Note: The live demo runs on Stellar Testnet. You'll need a compatible wallet (Freighter recommended) and test XLM tokens to interact with the smart contracts.
graph TB
A[User Connects Wallet] --> B[Create Escrow]
B --> C[Invite Roommates]
C --> D[All Participants Deposit]
D --> E{All Funds Received?}
E -->|Yes| F[Smart Contract Splits]
E -->|No - Timeout| G[Refund Process]
F --> H[Landlord Receives Rent]
G --> I[Participants Refunded]
- Escrow Creation: User sets up escrow with participants, amounts, and deadline
- Deposit Phase: All participants deposit their proportional share
- Funding Complete: Contract marks escrow as fully funded when target reached
- Distribution: Landlord calls release to receive all funds
- Refund (if needed): If deadline passes without full funding, participants can refund
- ✅ Connecting a Freighter wallet
- ✅ Checking balance and refreshing
- ✅ Creating an escrow
- ✅ Inviting roommates to deposit
- ✅ Viewing transaction history
- ✅ Verifying transactions on Stellar Explorer
- ✅ Using dark/light mode
- ✅ Multi-wallet support: Freighter, xBull, Albedo, Rabet
- ✅ Seamless connection: One-click wallet connection with auto-detection
- ✅ Network validation: Automatic testnet/mainnet detection and switching
- ✅ Real-time balance: Auto-refresh every 30s with manual refresh option
- ✅ Transaction history: Complete on-chain transaction log with explorer links
- ✅ Escrow lifecycle: Create → Fund → Release/Refund
- ✅ Multi-participant: Support for unlimited roommates per escrow
- ✅ Individual tracking: Per-participant deposit status and amounts
- ✅ Automated splitting: Proportional distribution to landlord
- ✅ Dispute system: Built-in arbitration for conflict resolution
- ✅ Time-based refunds: Automatic refund eligibility after deadline
- ✅ Comprehensive testing: 28 unit tests with 100% core logic coverage
- ✅ XLM payments: Send native Stellar lumens with validation
- ✅ Token support: SPL and custom token transfers (via Soroban)
- ✅ Real-time feedback: Instant transaction status updates
- ✅ Verification: Direct links to Stellar Explorer for all transactions
- ✅ Error handling: Clear, actionable error messages
- ✅ Modern design: Built with shadcn/ui component library
- ✅ Responsive layout: Mobile-first design for all devices
- ✅ Theme support: Dark/light mode with system preference detection
- ✅ Accessibility: WCAG 2.1 compliant components
- ✅ Performance: Optimized loading with skeleton screens
- ✅ TypeScript strict mode: Full type safety across the codebase
- ✅ Comprehensive tests: Vitest for frontend, Rust tests for contracts
- ✅ CI/CD pipeline: Automated testing and deployment via GitHub Actions
- ✅ Code quality: ESLint 9, Prettier, and Rust clippy integration
- ✅ Documentation: Extensive inline docs and developer guides
| Technology | Version | Purpose |
|---|---|---|
| Framework | Next.js 16.1.6 | React framework with App Router |
| Language | TypeScript 5.x | Type-safe development |
| UI Library | React 19.2.3 | Component rendering |
| Styling | Tailwind CSS 4.x | Utility-first CSS |
| Components | shadcn/ui | Pre-built accessible components |
| State | Zustand 5.0.11 | Lightweight state management |
| Validation | Zod 4.3.6 | Schema validation |
| Testing | Vitest 4.0.18 | Unit and integration tests |
| Technology | Version | Purpose |
|---|---|---|
| Network | Stellar | Blockchain layer |
| Smart Contracts | Soroban SDK 25 | Rust-based smart contracts |
| SDK | @stellar/stellar-sdk 14.5.0 | Horizon API client |
| Wallet Kit | @creit.tech/stellar-wallets-kit 2.0.0 | Multi-wallet integration |
| Tool | Purpose |
|---|---|
| Package Manager | pnpm 9.x (fast, disk-efficient) |
| CI/CD | GitHub Actions (automated testing & deployment) |
| Deployment | Vercel (edge-optimized hosting) |
| Code Quality | ESLint 9, TypeScript strict, Rust clippy |
| Error Tracking | Sentry (production error monitoring) |
| Wallet | Browser | Mobile |
|---|---|---|
| Freighter | ✅ Chrome, Firefox, Edge | ❌ |
| xBull | ✅ Chrome, Firefox | ✅ iOS, Android |
| Albedo | ✅ Chrome, Brave | ❌ |
| Rabet | ✅ Chrome, Firefox | ❌ |
Rent-Payment-Splitter/
├── frontend/ # Next.js application
│ ├── app/ # App Router pages
│ │ ├── page.tsx # Landing page
│ │ ├── dashboard/page.tsx # Main dashboard
│ │ ├── escrow/ # Escrow management
│ │ └── api/ # API routes
│ ├── components/
│ │ ├── landing/ # Landing page components
│ │ ├── dashboard/ # Dashboard components
│ │ ├── shared/ # Shared components
│ │ └── ui/ # shadcn/ui primitives
│ ├── lib/
│ │ ├── stellar/ # Stellar blockchain utilities
│ │ ├── wallet/ # Wallet integration logic
│ │ ├── hooks/ # Custom React hooks
│ │ └── types/ # TypeScript type definitions
│ ├── __tests__/ # Unit and integration tests
│ ├── .env.example # Environment variables template
│ ├── package.json # Frontend dependencies
│ └── tsconfig.json # TypeScript configuration
│
├── SplitRent/ # Smart contracts (Soroban)
│ ├── contracts/
│ │ └── escrow/ # Escrow smart contract
│ │ ├── src/
│ │ │ ├── lib.rs # Contract implementation
│ │ │ └── test.rs # Contract tests (28 tests)
│ │ └── Cargo.toml # Contract dependencies
│ ├── Cargo.toml # Workspace configuration
│ └── frontend-integration/ # Contract-FE integration utilities
│
├── docs/ # Documentation
│ ├── DEVELOPMENT.md # Development guide
│ ├── ROADMAP.md # Project roadmap
│ ├── PRD.md # Product requirements
│ ├── screenshots/ # Application screenshots
│ └── videos/ # Demo videos
│
├── .github/
│ ├── workflows/
│ │ └── ci.yml # CI/CD pipeline
│ └── copilot-instructions.md # AI assistant guidelines
│
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
├── CODE_OF_CONDUCT.md # Community standards
├── SECURITY.md # Security policy
└── QWEN.md # Project context & setup
Before you begin, ensure you have the following installed:
| Requirement | Version | Purpose |
|---|---|---|
| Node.js | 20.x or higher | JavaScript runtime |
| pnpm | 9.x or higher | Package manager |
| Git | Latest | Version control |
| Rust | Latest stable | Smart contract development (optional) |
| Wallet | Freighter (recommended) | Stellar wallet extension |
git clone https://github.com/x0lg0n/Rent-Payment-Splitter.git
cd Rent-Payment-Splitterpnpm install# Copy the example environment file
cp frontend/.env.example frontend/.env.localNote: The default configuration works for Stellar Testnet. Modify
frontend/.env.localonly if you need custom settings.
pnpm devOpen http://localhost:3000 to see the application.
| Command | Description |
|---|---|
pnpm dev |
Start development server on port 3000 |
pnpm build |
Build for production |
pnpm start |
Run production server |
pnpm lint |
Run ESLint code quality checks |
pnpm typecheck |
Run TypeScript type checking |
pnpm test |
Run Vitest test suite |
pnpm test:watch |
Run tests in watch mode |
Always run these checks before committing:
pnpm lint && pnpm typecheck && pnpm testcd SplitRent
# Build WASM artifact
cargo build --target wasm32-unknown-unknown --release
# Run contract tests (28 tests)
cargo test
# Format code
cargo fmt
# Lint with clippy
cargo clippy
# Deploy to testnet (requires Soroban CLI)
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/escrow.wasm \
--source YOUR_ACCOUNT \
--network testnetTip: See docs/DEVELOPMENT.md for comprehensive development guides.
See our detailed ROADMAP.md for complete project timeline and milestones.
- Multi-wallet integration (Freighter, xBull, Albedo, Rabet)
- Payment system with XLM support
- Transaction history with explorer links
- Modern UI/UX with dark/light mode
- Comprehensive test suite (28 contract tests)
- CI/CD pipeline with GitHub Actions
- Production deployment on Vercel
- Soroban smart contract development
- Contract deployment to testnet
- Escrow lifecycle management
- Escrow creation UI
- Participant management interface
- Automated splitting and distribution
- Real-time escrow status tracking
- Email notifications for participants
- Recurring payment schedules
- Payment reminders and notifications
- Analytics dashboard
- Multi-lease support
- Expense tracking beyond rent
- Mobile application (React Native)
- Security audit by third-party firm
- Mainnet deployment
- Performance optimization
- Advanced dispute resolution
- Insurance fund integration
- Multi-language support
# Run all quality checks
pnpm lint && pnpm typecheck && pnpm test
# Run tests with coverage
pnpm test -- --coverage
# Watch mode for development
pnpm test:watchWe maintain comprehensive test coverage across the entire stack:
| Component | Framework | Coverage | Status |
|---|---|---|---|
| Smart Contracts | Rust tests | 100% core logic | ✅ 28/28 passing |
| Wallet Integration | Vitest | 95% | ✅ |
| Payment Flows | Vitest | 90% | ✅ |
| UI Components | Vitest + RTL | 85% | ✅ |
| Utilities | Vitest | 95% | ✅ |
Our CI/CD pipeline enforces:
- ✅ ESLint: No errors or warnings
- ✅ TypeScript: Strict mode, no implicit any
- ✅ Tests: All tests must pass
- ✅ Build: No compilation errors
- ✅ Contract tests: 100% pass rate
The default configuration works out-of-the-box for Stellar Testnet:
# frontend/.env.local
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_EXPLORER_BASE_URL=https://stellar.expert/explorer/testnet/tx
NEXT_PUBLIC_FRIENDBOT_URL=https://laboratory.stellar.org/#account-creator?network=test
NEXT_PUBLIC_NETWORK_PASSPHRASE=Test SDF Network ; September 2015For mainnet deployment:
NEXT_PUBLIC_HORIZON_URL=https://horizon.stellar.org
NEXT_PUBLIC_EXPLORER_BASE_URL=https://stellar.expert/explorer/public/tx
NEXT_PUBLIC_NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015# Error tracking with Sentry
NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn_here
# Analytics
NEXT_PUBLIC_VERCEL_ANALYTICS_ID=your_analytics_id
# Feature flags
NEXT_PUBLIC_FEATURE_ESCROW_ENABLED=trueSee frontend/.env.example for all available options.
| Problem | SplitRent Solution |
|---|---|
| Splitting rent manually | Automatic proportional splitting |
| Tracking who paid | Real-time payment status dashboard |
| Chasing roommates for money | Automated reminders and notifications |
| Trust issues with money | Transparent on-chain escrow |
| Payment disputes | Built-in dispute resolution |
| Benefit | Impact |
|---|---|
| Instant payment verification | Reduced administrative overhead |
| Automated collection | Consistent on-time payments |
| Clear audit trail | Easy tax and accounting |
| Reduced conflicts | Better tenant relationships |
| Lower processing fees | Cost savings vs traditional methods |
- Easy setup: No technical blockchain knowledge required
- Low fees: Fraction of traditional payment processing costs
- Secure: Trustless smart contract escrow
- Educational: Learn about blockchain and smart contracts
- Flexible: Support for irregular lease terms and roommate changes
- Open source: Study and learn from production dApp code
- Well documented: Comprehensive guides and examples
- Modern stack: Next.js 16, TypeScript, Soroban, Rust
- Test coverage: Best practices for testing blockchain applications
- Contributions welcome: Great first open-source contribution
We welcome contributions from the community! Please see our Contributing Guide for detailed guidelines.
| Area | How to Help |
|---|---|
| 🐛 Bug Reports | File issues on GitHub with reproduction steps |
| 💡 Feature Requests | Suggest improvements via GitHub Discussions |
| 📝 Documentation | Improve guides, fix typos, add examples |
| 💻 Code | Submit PRs for features, fixes, or refactoring |
| 🎨 Design | Suggest UI/UX improvements |
| 🧪 Testing | Write tests, improve coverage |
| 🌍 Translation | Help localize the application |
# 1. Fork the repository
# 2. Clone your fork
git clone https://github.com/your-username/Rent-Payment-Splitter.git
cd Rent-Payment-Splitter
# 3. Create a feature branch
git checkout -b feat/your-feature-name
# 4. Make your changes and commit with conventional commits
git commit -m "feat: add your feature description"
# 5. Run all quality checks
pnpm lint && pnpm typecheck && pnpm test
# 6. Push and open a pull request
git push origin feat/your-feature-nameWe follow Conventional Commits:
feat: add new escrow creation flow
fix: resolve wallet connection timeout on Firefox
docs: update installation instructions
test: add unit tests for payment validation
refactor: extract wallet utilities to separate module
chore: update dependencies to latest versions
If this is your first open-source contribution, we're here to help!
- Read CONTRIBUTING.md for guidelines
- Look for issues labeled
good first issue - Join our Discord for questions
- Submit your first PR!
| Document | Description |
|---|---|
| README.md | Project overview and quick start |
| docs/DEVELOPMENT.md | Complete development guide |
| docs/ROADMAP.md | Project timeline and milestones |
| CONTRIBUTING.md | Contribution guidelines |
| Document | Description |
|---|---|
| docs/PRD.md | Product requirements document |
| CHANGELOG.md | Version history and releases |
| CODE_OF_CONDUCT.md | Community guidelines |
| SECURITY.md | Security policy and reporting |
| Practice | Why It Matters |
|---|---|
| Never share private keys | Your keys control your funds |
| Verify URLs | Phishing sites can steal credentials |
| Use testnet for development | Test before risking real funds |
| Review transactions | Always verify before signing |
| Keep wallets updated | Security patches and improvements |
- ✅ Reentrancy guards: Protection against reentrant calls
- ✅ Access control: Proper authorization checks
- ✅ Overflow protection: Safe arithmetic operations
- ✅ Time-based locks: Secure deadline handling
- 🔄 Audit pending: Third-party audit planned for Phase 4
Please report security vulnerabilities responsibly:
- Email: [email protected]
- GitHub: Use Security Advisories
- Discord: DM a maintainer in our Discord server
See our Security Policy for full details.
This project is licensed under the MIT License.
SplitRent is built on the shoulders of giants:
- Stellar Development Foundation - For the amazing blockchain platform
- Soroban - For smart contract capabilities
- shadcn/ui - For beautiful, accessible UI components
- Next.js Team - For the excellent React framework
- All Contributors - For making this project possible
| Platform | Link |
|---|---|
| GitHub Issues | Report bugs or request features |
| GitHub Discussions | Join the conversation |
| Discord | Join our community |
| @YourTwitter |
If you find SplitRent useful, please consider:
| Way to Support | Impact |
|---|---|
| ⭐ Star the repo | Helps others discover the project |
| 🔗 Share with friends | Spread the word to those who need it |
| 💡 Contribute | Help improve the project |
| 📢 Social media | Amplify our reach |
| 🐛 Report bugs | Help us catch issues early |




