A visual tool for creating complex, infinitely branching SplitXCH royalty distribution systems
Build beautiful split trees β’ Calculate basis points β’ Generate SplitXCH addresses
IFSTT (IF Split Then That) is an open-source visual builder for creating sophisticated royalty distribution systems using SplitXCH. Perfect for NFT creators, artists, developers, and teams who need to split royalties across multiple recipients with complex, nested structures.
β¨ Visual Split Tree Builder
- Interactive GoJS-powered diagram interface
- Drag-and-drop node management
- Real-time basis points validation
- Apple-quality, responsive design
π Infinitely Nested Splits
- Create splits within splits (no depth limit)
- Support for 128+ recipients via cascading structures
- SplitXCH nodes and fixed wallet addresses
π Basis Points System
- Precise percentage calculations (1 bp = 0.01%)
- Automatic fee calculation and display
- Real-time validation ensuring totals = 10,000 bp (100%)
πΎ Export & Finalize
- Export to JSON format
- Generate SplitXCH addresses via API
- Download finalized split configurations
π¨ Beautiful UI/UX
- Clean, modern interface
- Visual feedback for empty addresses
- Contextual menus and shortcuts
- Sidebar details panel
- Node.js 16+ and npm
- Ionic CLI (optional, for advanced usage)
npm install -g @ionic/cli-
Clone the repository
git clone https://github.com/Koba42Corp/splitxch-builder.git cd splitxch-builder/client -
Install dependencies
npm install
-
Start the development server
npm start # or ionic serve -
Build for production
npm run build
The built files will be in the
docs/directory (ready for GitHub Pages).
-
Start with the default tree
- When you open IFSTT, you'll see a root "Main Split" node with two default recipients
-
Add recipients
- Click on a SplitXCH node to select it
- Click the "+" button or right-click and select "Add Recipient"
- Choose between:
- Fixed Wallet: Enter an existing XCH wallet address
- New Split: Create a nested split branch
-
Edit recipient details
- Click on a recipient in the sidebar to edit
- Update name, address, and percentage
- Percentages must sum to 100% for each split
-
Validate your tree
- The status banner at the top shows validation status
- All wallet addresses must be filled
- All basis points must sum correctly
-
Finalize and generate addresses
- Click "Finalize Blueprint" when ready
- IFSTT will call the SplitXCH API to create addresses
- Download the finalized tree as JSON
- 1 basis point (bp) = 0.01%
- 10,000 basis points = 100%
- SplitXCH charges a 150 bps (1.5%) fee per split
- The UI automatically accounts for fees in calculations
- π΄ Red border: Wallet node with empty address
- π΅ Blue border: Selected node
- β¬ Rectangle: SplitXCH node (can have children)
- β Circle: Wallet/Recipient node (leaf node)
client/
βββ src/
β βββ app/
β β βββ models/
β β β βββ split-tree.models.ts # Data models
β β βββ services/
β β β βββ split-tree.service.ts # Tree logic & validation
β β β βββ splitxch-api.service.ts # SplitXCH API integration
β β βββ split-builder/
β β β βββ split-builder.page.ts # Main component
β β β βββ components/
β β β βββ split-diagram/ # GoJS diagram component
β β βββ ...
β βββ environments/
β βββ environment.ts # Dev config
β βββ environment.prod.ts # Prod config
βββ docs/ # Build output (for GitHub Pages)
- SplitTreeService: Core business logic for tree operations
- SplitXCHApiService: Integration with SplitXCH compute API
- SplitDiagramComponent: GoJS-based visual diagram
- SplitBuilderPage: Main UI and state management
IFSTT integrates with the SplitXCH Compute API:
POST /api/compute/fast- Create a new splitGET /api/compute/{id}- Check compute status (future use)
Update the API URL in src/environments/environment.ts:
export const environment = {
production: false,
splitXCHApiUrl: 'https://splitxch.com/api',
};{
"recipients": [
{
"name": "Recipient Name",
"address": "xch1...",
"points": 9850,
"id": 1
}
]
}Note: The API automatically adds a 150 bps (1.5%) fee. Recipient points should sum to 9,850, which the code handles automatically.
npm testThe project uses:
- TypeScript for type safety
- Angular for framework
- Ionic for UI components
- GoJS for diagram visualization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Contributions are welcome! Please feel free to submit a Pull Request.
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
- β‘ Performance optimizations
- π§ͺ Test coverage
Please read our Contributing Guidelines (coming soon) for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- SplitXCH for the royalty splitting protocol
- GoJS for the excellent diagramming library
- Ionic for the mobile-first framework
- Angular for the robust application framework
- Issues: GitHub Issues
- Discussions: GitHub Discussions
If you find IFSTT useful, please consider giving it a β on GitHub!
Built with β€οΈ by the open-source community
Website β’ Documentation β’ Changelog
