A simple & intuitive DEX aggregator for Voi that finds the best routes across HumbleSwap and nomadex.
- Simple Interface: One input, one output, best route clearly shown
- Multi-DEX Support: HumbleSwap, nomadex, and Swap-API (swap200 contracts) integration
- Smart Routing: Direct routes and two-hop routes via common intermediates
- Price Impact Analysis: Real-time price impact calculations
- Route Comparison: Compare multiple routes side-by-side
- Swap-API Integration: Support for ARC200 token swaps with automatic wrap/unwrap
- Frontend: Vite + React 18 with TypeScript
- Styling: Tailwind CSS
- Wallet Integration: @txnlab/use-wallet-react for Algorand/Voi wallet connections
- Supports Pera, Defly, Lute, and other Algorand wallets via WalletConnect
- Build Tool: Vite
- Package Manager: npm
- Deployment: AWS Amplify
- Version Management: Automated version tracking with prebuild scripts
-
Install dependencies:
npm install
-
Start development server:
npm run dev
This runs the web app on http://localhost:3999
-
Build for production:
npm run build
-
Preview production build:
npm run preview
ally/
├── src/
│ ├── components/ # React components
│ │ ├── SwapInterface.tsx
│ │ ├── VersionDisplay.tsx
│ │ └── WalletConnectModal.tsx
│ ├── lib/
│ │ └── config.ts # Configuration loading utilities
│ ├── App.tsx # Main app component
│ ├── main.tsx # Application entry point
│ └── index.css # Global styles
├── public/
│ └── config/ # Configuration files (JSON)
│ ├── api.json # API endpoints configuration
│ ├── app.json # App settings
│ ├── pools.json # DEX pool configurations
│ └── tokens.json # Token list
├── config/ # Source config files (copied to public/)
│ └── README.md # Configuration documentation
├── scripts/ # Build and utility scripts
│ ├── setup-version-management.sh
│ └── update-version.cjs
├── docs/ # Documentation
│ └── PROMPT.md # Development prompt
├── dist/ # Production build output
├── vite.config.ts # Vite configuration
├── tailwind.config.cjs # Tailwind CSS configuration
├── amplify.yml # AWS Amplify deployment config
└── package.json
The app is configuration-driven using JSON files in the public/config/ directory:
api.json: API endpoint configurations for external servicesapp.json: Application settings including token whitelistspools.json: DEX pool configurations for HumbleSwap and nomadextokens.json: Token metadata including addresses, symbols, and decimals
These files are loaded at runtime and can be updated without rebuilding the application.
The app uses @txnlab/use-wallet-react for wallet connections. Supports:
- Pera Wallet: Algorand wallet integration
- Defly Wallet: Mobile-first Algorand wallet
- Lute Wallet: Primary wallet integration via WalletConnect
- Other Algorand wallets: Via WalletConnect protocol
The app is configured for the Voi mainnet network.
The project includes automated version management:
- Version is displayed in the UI via the
VersionDisplaycomponent - Version is automatically incremented (patch version) before each build via
prebuildscript - Version is stored in
package.jsonand exposed viaVITE_APP_VERSIONenvironment variable - Setup script available:
npm run setup-version
- Add token metadata to
config/tokens.json - Ensure the token is included in pool configurations in
config/pools.json - Optionally add to token whitelist in
config/app.jsonif using whitelisting
Configuration files in config/ are copied to public/config/ during build. For development, you can edit files directly in public/config/ to see changes immediately.
Run linting:
npm run lintFormat code:
npm run formatType checking:
npm run type-checkThe app integrates with multiple DEXes on the Voi network:
- HumbleSwap: Supports wrapped token pools with automatic wrap/unwrap
- nomadex: Direct token pair pools
- Swap-API: ARC200 token swaps via swap200 contracts
Pool configurations are defined in config/pools.json and can be updated without code changes.
- ✅ On-chain execution: Full swap execution via wallet integration
- ✅ Wallet connect: Real wallet integration with multiple wallet support
- ✅ Pool selection: Users can select specific pools
- ✅ Swap-API integration: Leverages external routing service
- ✅ Multi-DEX support: HumbleSwap, Nomadex, and swap200 contracts
- ✅ ARC200 support: Automatic wrap/unwrap handling
- ✅ Expandable route cards: Collapsible cards showing detailed pool breakdown
- ✅ Route comparison: Side-by-side comparison of available routes
- ✅ Version display: Shows app version in UI
- ✅ Automated version management: Patch version auto-increments on build
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
MIT License