Dualtarget is an innovative decentralized automated trading bot specifically designed for Cardano (ADA) holders. This platform bridges the gap between traditional staking and modern automated trading, allowing users to grow their cryptocurrency assets passively while maintaining full control through decentralized mechanisms.
- For Stakers: Earn additional returns on your ADA holdings through intelligent algorithmic trading
- For Traders: Access a decentralized trading infrastructure with minimal fees and maximum transparency
- For Developers: Build upon a robust, open-source blockchain infrastructure with clean APIs
- For the Community: Support a fully decentralized, community-driven trading ecosystem
The platform combines cutting-edge blockchain technology with sophisticated trading strategies to provide a seamless experience for managing and growing digital assets.
Watch the Demo Video:
- Earn competitive rewards by staking ADA through integrated pools
- Real-time stake pool performance monitoring
- Automatic reward collection and compounding
- Support for multiple delegation strategies
- AI-powered trading algorithms optimized for Cardano ecosystem
- Support for DEX trading through Minswap SDK
- Real-time market data from multiple sources (Blockfrost, Koios)
- Backtesting and strategy simulation tools
- Multi-wallet support with seamless integration
- Portfolio tracking and performance analytics
- Transaction history and detailed reporting
- Secure wallet connections (Chrome extensions)
- Mainnet (Production) - Full production trading environment
- Preprod (Testnet) - Safe testing ground for new features
- Easy network switching within the application
- Smart contract auditable architecture
- Non-custodial design - you always control your private keys
- Transparent transaction validation on-chain
- Integration with trusted blockchain APIs
- Multi-language support (Vietnamese, English, and more)
- Localized content and documentation
- Region-specific configurations
- Framework: Next.js 14.1.0 - React-based production-ready framework
- Language: TypeScript - For type-safe development
- Styling: SCSS/CSS - Modern, modular styling approach
- State Management: React Context API - Global state handling
- Wallet Integration: Support for major Cardano wallet extensions
- Language: Go - High-performance, concurrent processing
- API Layer: RESTful architecture with clean endpoints
- Database: PostgreSQL - Reliable data persistence
- Docker: Containerized deployment and scaling
- Blockfrost API: Primary blockchain data provider
- Koios API: Backup blockchain data source
- Minswap SDK: DEX protocol integration
- Cardano: Native blockchain network
- Git: Version control and collaboration
- Docker Compose: Multi-container orchestration
- npm/Node.js: Package management
dualtarget/
βββ frontend/ # Next.js React Application
β βββ src/
β β βββ app/ # Next.js App Router (pages and routes)
β β βββ assets/ # Images, icons, fonts
β β βββ components/ # Reusable React components
β β βββ configs/ # Configuration files
β β βββ constants/ # Static constant values
β β βββ contexts/ # Global state management
β β βββ data/ # Static data (FAQs, guides)
β β βββ helpers/ # Utility helper functions
β β βββ hooks/ # Custom React hooks
β β βββ layouts/ # Layout components
β β βββ libs/ # Third-party integrations
β β βββ services/ # API services
β β βββ styles/ # Global styles
β β βββ translations/ # i18n translation files
β β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
β βββ Dockerfile # Container configuration
β βββ docker-compose.yml # Docker Compose setup
β βββ next.config.mjs # Next.js configuration
β βββ tsconfig.json # TypeScript configuration
β βββ package.json # Dependencies
β
βββ backend/ # Go REST API
β βββ src/
β β βββ main.go # Entry point
β β βββ api/ # External API integrations
β β βββ configs/ # Configuration management
β β βββ constants/ # Constants and enums
β β βββ controllers/ # API request handlers
β β βββ data/ # Data structures
β β βββ dto/ # Data transfer objects
β β βββ helpers/ # Utility functions
β β βββ models/ # Database models
β β βββ repository/ # Database access layer
β β βββ routers/ # Route definitions
β β βββ services/ # Business logic
β β βββ utils/ # General utilities
β βββ Dockerfile # Container configuration
β βββ docker-compose.yml # Docker Compose setup
β βββ go.mod # Go module definition
β βββ go.sum # Dependency checksums
β
βββ database/ # Database setup and migrations
βββ docker-compose.yml # Database container configuration
| Directory | Purpose | Contains |
|---|---|---|
app |
Route management using Next.js App Router | Page components, layout components, route definitions |
assets |
Static project resources | PNG/SVG images, icon fonts, custom fonts, brand assets |
components |
Reusable UI components | Button, Input, Modal, Card, Chart, Table, etc. |
configs |
Application configuration | Route definitions, wallet configurations, API endpoints |
constants |
Static application data | Environment names, wallet lists, network info, headers |
contexts |
Global state management | User context, wallet context, theme context |
data |
Static content | FAQ items, guide content, founder information |
helpers |
Utility functions | Network validation, date conversion, data formatting |
hooks |
Custom React hooks | useWallet, useCopy, useLocalStorage, custom logic hooks |
layouts |
Layout components | Header, Footer, Sidebar, navigation structures |
libs |
Third-party integrations | SDK initialization, external library wrappers |
services |
API integration layer | Blockfrost service, Koios service, transaction service |
styles |
Global styling | Global CSS/SCSS, variables, mixins, theme definitions |
translations |
i18n files | Translation JSON for multiple languages |
types |
TypeScript types | Custom type definitions, interfaces, enums |
wallets.ts- Configuration for supported Cardano wallets (Eternl, Nami, etc.)routes.ts- Application route definitions and navigation structurenetworks.ts- Network configuration (Mainnet, Preprod, custom RPC endpoints)
The Go backend provides RESTful APIs for:
- Account Management - User profile, authentication, account settings
- Transaction Processing - Transaction creation, validation, and monitoring
- Mail Services - Notifications and email communications
- Blockchain Integration - Communication with Cardano network
Get up and running in just 5 minutes!
Before starting, ensure you have:
# Check Git installation
git --version
# Check Node.js installation (v16 or higher)
node --version
npm --version
# Optional: Check Docker installation
docker --version# Clone the repository from GitHub
git clone https://github.com/independenceee/dualtarget.git
# Navigate to the frontend directory
cd dualtarget/frontend
# (Optional) Check the available branches
git branch -aCreate or update next.config.mjs with your blockchain API keys:
-
Get Blockfrost API Key:
- Visit blockfrost.io
- Sign up for a free account
- Create a new project
- Copy your API key for Mainnet and/or Preprod
-
Get Koios API Key (Optional):
- Visit koios.rest
- Review documentation
- Use the public API endpoint or get your own
-
Configure
next.config.mjs:
const nextConfig = {
env: {
// ===== MAINNET CONFIGURATION =====
BLOCKFROST_NETWORK_NAME_MAINNET: "Mainnet",
BLOCKFROST_RPC_URL_MAINNET: "https://cardano-mainnet.blockfrost.io/api/v0",
BLOCKFROST_PROJECT_API_KEY_MAINNET: "YOUR_BLOCKFROST_MAINNET_KEY",
KOIOS_RPC_URL_MAINNET: "https://api.koios.rest/api/v1",
NEXT_APP_BASE_URL_MAINNET: "https://api.dualtarget.vn/api/v1",
DUALTARGET_CONTRACT_ADDRESS_MAINNET: "your_contract_address",
DUALTARGET_PAYMENT_ADDRESS_MAINNET: "your_payment_address",
DUALTARGET_STAKE_ADDRESS_MAINNET: "your_stake_address",
POOL_ID_MAINNET: "pool1rqgf6qd0p3wyf9dxf2w7qcddvgg4vu56l35ez2xqemhqun2gn7y",
// ===== PREPROD (TESTNET) CONFIGURATION =====
BLOCKFROST_NETWORK_NAME_PREPROD: "Preprod",
BLOCKFROST_RPC_URL_PREPROD: "https://cardano-preprod.blockfrost.io/api/v0",
BLOCKFROST_PROJECT_API_KEY_PREPROD: "YOUR_BLOCKFROST_PREPROD_KEY",
KOIOS_RPC_URL_PREPROD: "https://preprod.koios.rest/api/v1",
NEXT_APP_BASE_URL_PREPROD: "https://preprod.dualtarget.vn/api/v1",
DUALTARGET_CONTRACT_ADDRESS_PREPROD: "your_contract_address",
DUALTARGET_PAYMENT_ADDRESS_PREPROD: "your_payment_address",
DUALTARGET_STAKE_ADDRESS_PREPROD:
"stake_test1uq7cj74n8ryrmg20rasqnqcygv4kwrmn2yjemkv3ux2k7lgqu950l",
POOL_ID_PREPROD: "pool1ke9h4mggr8ttf45ale5dv4ntkvuw2wkvm6la4mv02688xuy99qp",
},
};
export default nextConfig;Advantages: No local dependencies, consistent environment, easy cleanup
# Ensure Docker is running, then execute:
docker compose up --build
# The application will start automatically and be available at:
# http://localhost:3000
# To stop: Press Ctrl+C or run:
docker compose downAdvantages: Faster iteration, easier debugging, no Docker overhead
# Install project dependencies
npm install
# This downloads all required packages (may take 2-3 minutes on first run)
# Start the development server
npm run dev
# Server will start at http://localhost:3000
# Press Ctrl+C to stop the server
# Watch for file changes and auto-reload enabledMake sure you have all required software installed:
# Verify Git
git --version
# Should output: git version X.X.X...
# Verify Node.js (16.0.0 or higher)
node --version
npm --version
# Should output versions like v18.x.x and 9.x.x
# Verify Docker (if using Docker method)
docker --version
docker compose --versiongit clone https://github.com/independenceee/dualtarget.git
cd dualtarget/frontendConfigure your .env.local or next.config.mjs with API endpoints:
-
Blockfrost Setup (Primary):
- Create account at blockfrost.io
- Generate API keys for desired networks
- Add to configuration
-
Koios Setup (Optional Backup):
- Visit koios.rest
- Can use public endpoints or register for custom ones
Using Docker:
docker compose up --buildUsing Node.js:
npm install
npm run devBoth will launch at http://localhost:3000
When ready to deploy:
# Create optimized production build
npm run build
# Test production build locally
npm run start
# Application runs at http://localhost:3000 in production mode
# Verify bundle size
npm run analyze # If available# Start development server with hot reload
npm run dev
# Build optimized production bundle
npm run build
# Start production server
npm run start
# Run linting checks (ESLint)
npm run lint
# Run tests (if configured)
npm run test
# Format code (Prettier)
npm run format
# Type checking
npm run type-check- Component Structure: Keep components small and focused (max 300 lines)
- Naming Convention: Use PascalCase for components, camelCase for functions
- Styling: Use SCSS modules for component-specific styles
- Type Safety: Always define TypeScript types/interfaces
- Comments: Document complex logic with clear comments
- Testing: Write unit tests for utilities and complex components
BLOCKFROST_NETWORK_NAME_*: Network display name
BLOCKFROST_RPC_URL_*: Blockchain API endpoint
BLOCKFROST_PROJECT_API_KEY_*: Your Blockfrost API key
DUALTARGET_CONTRACT_ADDRESS_*: Main contract address
DUALTARGET_PAYMENT_ADDRESS_*: Payment address
DUALTARGET_STAKE_ADDRESS_*: Staking address
NEXT_APP_BASE_URL_*: Backend API base URL
KOIOS_RPC_URL_*: Koios blockchain API
-
Mainnet (Production)
- Real ADA transactions
- Live stake pools
- Production contracts
-
Preprod (Testnet)
- Free test ADA (from faucet)
- Development/testing only
- Safe for experimentation
Edit configs/wallets.ts to add/modify supported wallet extensions:
export const WALLET_EXTENSIONS = {
eternl: { name: "Eternl", extension: "..." },
nami: { name: "Nami", extension: "..." },
// Add more wallets as needed
};POST /api/v1/accounts/register- Create new accountPOST /api/v1/accounts/login- User authenticationGET /api/v1/accounts/{id}- Get account detailsPUT /api/v1/accounts/{id}- Update account info
POST /api/v1/transactions/create- Create transactionGET /api/v1/transactions/{id}- Get transaction detailsGET /api/v1/transactions- List user transactionsPOST /api/v1/transactions/{id}/sign- Sign transaction
GET /api/v1/staking/pools- List available poolsPOST /api/v1/staking/delegate- Delegate to poolGET /api/v1/staking/rewards- Get staking rewardsGET /api/v1/staking/status- Check delegation status
POST /api/v1/mail/send- Send email notificationPOST /api/v1/mail/subscribe- Subscribe to notifications
All API responses follow this standard format:
{
"status": "success|error",
"data": {
/* response payload */
},
"message": "Human readable message",
"timestamp": "2024-01-01T00:00:00Z"
}# On Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# On macOS/Linux
lsof -ti:3000 | xargs kill -9# Clear npm cache
npm cache clean --force
# Remove node_modules and package-lock
rm -rf node_modules package-lock.json
# Reinstall
npm install# Remove containers and rebuild
docker compose down -v
docker compose up --build
# Check logs
docker compose logs -f- Verify API keys in
next.config.mjs - Check network selection (Mainnet vs Preprod)
- Ensure backend API is running
- Check firewall/VPN settings
- Clear browser cache and cookies
- Disable browser extensions temporarily
- Try different Cardano wallet extension
- Check wallet is unlocked and connected to correct network
Enable detailed logging:
// In your component
const DEBUG = process.env.NODE_ENV === "development";
if (DEBUG) {
console.log("Debug information...");
}- Check GitHub Issues
- Review documentation
- Contact support (see below)
- Submit detailed bug report with:
- Error message
- Steps to reproduce
- Browser/OS information
- Network (Mainnet/Preprod)
This project is released under the MIT License.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...
See LICENSE file for full text.
- Email: nguyenkhanh17112003@gmail.com
- GitHub: independenceee/dualtarget
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Follow us on GitHub for updates
- Check GitHub Discussions for community topics
- Report bugs with detailed information
- Share feature requests and suggestions
We welcome contributions! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- π Documentation: Check the README and code comments
- π Bug Reports: Use GitHub Issues
- π¬ General Questions: Use GitHub Discussions
- π§ Direct Contact: Email the maintainer
Made with β€οΈ for the Cardano Community
Cardano β’ Minswap β’ Blockfrost β’ Koios

