The most advanced Solana DeFi platform with flash loan arbitrage, sniper bot, token launchpad, and comprehensive Web3 UI.
# Interactive setup
./quick-start.sh
# Or use Make commands
make help # Show all available commands
make dev # Start local development
make docker-up # Start with DockerDeploy to any platform in minutes! See DEPLOYMENT.md for comprehensive guides.
| Platform | Best For | Command | Guide |
|---|---|---|---|
| 🌐 Vercel | Webapp (Serverless) | vercel --prod |
Guide |
| 🚂 Railway | Backend (Container) | railway up |
Guide |
| ☁️ AWS | Enterprise Scale | make deploy-aws |
Guide |
| 🔷 Azure | Microsoft Cloud | make deploy-azure |
Guide |
| 🐳 Docker | Any Server | make docker-up |
Guide |
| 💻 VPS | Full Control | make deploy-vps |
Guide |
| 🏠 Localhost | Development | make dev |
Guide |
- ✅ Unified Server: Single entry point for all deployments
- ✅ Docker Orchestration: Backend + Webapp + Monitoring
- ✅ 50+ Make Commands: Simplified management
- ✅ Automated Scripts: One-command VPS deployment
- ✅ Health Checks: Kubernetes-compatible endpoints
- ✅ WebSocket Support: Real-time updates with auto-reconnect
- ✅ Monitoring: Prometheus + Grafana integration
✨ Multi-Platform Deployment Support
- ✅ Unified Server:
src/server.tsworks across all platforms - ✅ Docker Excellence: Multi-stage builds, dev & prod configs
- ✅ Comprehensive Docs: 26KB deployment guide covering 8+ platforms
- ✅ Automation: Makefile with 50+ commands, deployment scripts
- ✅ CI/CD: Docker build workflow, automated testing
- ✅ WebSocket Stability: Enhanced reconnection logic
✨ Production-Ready API with Comprehensive Validation & Automated Deployment
- ✅ Input Validation: Comprehensive validation for all API endpoints with type checking and sanitization
- ✅ Error Handling: Centralized error handling with standardized responses and custom error types
- ✅ CORS Configuration: Production-ready CORS with environment-aware configurations
- ✅ Automated Deployment: CI/CD workflows for Vercel and Railway with health checks and auto-rollback
- ✅ Enhanced Security: Rate limiting, input sanitization, and authentication validation
- ✅ Complete Documentation: Comprehensive guides for API, validation, deployment, and configuration
📖 Deployment Guide | Quick Start | API Validation
Production-ready Next.js web app with full Solana integration!
- 🔄 Jupiter Swap - Best rates across all Solana DEXs
- 🎯 Sniper Bot - Monitor and snipe new token launches (Pump.fun + 8-22 DEXs)
- 🚀 Token Launchpad - Launch tokens with 3D airdrop roulette game
- 🎁 Airdrop Checker - Wallet scoring and auto-claim with Jupiter integration
- 💎 Staking - Marinade, Lido, Jito, Kamino integration
- ⚡ Flash Loan Arbitrage - Real-time opportunity scanning and execution
- 📱 Responsive Design - Mobile, tablet, and desktop optimized
- 🎨 Modern UI - Solana-themed with purple, blue, green gradients and 3D effects
webapp in the project settings.
- Go to https://vercel.com/new
- Import:
SMSDAO/reimagined-jupiter - Set Root Directory:
webapp← REQUIRED - Add env:
NEXT_PUBLIC_RPC_URL - Deploy
cd webapp
vercel --prodSee VERCEL_DEPLOY.md for detailed instructions and troubleshooting.
Railway provides 24/7 backend hosting with automated arbitrage scanning!
bash scripts/setup-railway.sh# Install Railway CLI
curl -fsSL https://railway.app/install.sh | sh
# Login and link to project
railway login
railway link 2077acd9-f81f-47ba-b8c7-8bf6905f45fc
# Set environment variables
railway variables --set SOLANA_RPC_URL="your-rpc-url"
railway variables --set WALLET_PRIVATE_KEY="your-private-key"
# Deploy
railway upFeatures:
- ✅ 24/7 automated arbitrage scanning
- ✅ Auto-deployment on push to main
- ✅ Preview deployments for PRs
- ✅ Health check monitoring with auto-restart
- ✅ Secret synchronization workflow
- ✅ Automatic rollback on failure
- ✅ Real-time logs and metrics
Required Secrets:
RAILWAY_TOKEN- Railway API tokenRAILWAY_PROJECT_ID-2077acd9-f81f-47ba-b8c7-8bf6905f45fcSOLANA_RPC_URL- Solana RPC endpointWALLET_PRIVATE_KEY- Wallet private key (base58)ADMIN_USERNAME- Admin usernameADMIN_PASSWORD- Admin passwordJWT_SECRET- JWT secret
📖 See docs/RAILWAY_DEPLOYMENT.md for complete Railway deployment guide.
- RPC: High-performance Solana RPC endpoint
- Functions: Serverless compute for price monitoring
- KV Store: Key-value storage for opportunity caching
- Streams: Real-time blockchain event monitoring
- Marginfi - 0.09% fee
- Solend - 0.10% fee
- Kamino - 0.12% fee
- Mango - 0.15% fee
- Port Finance - 0.20% fee
- Raydium
- Orca
- Serum
- Saber
- Mercurial
- Lifinity
- Aldrin
- Crema
- Meteora (mainnet-grade)
- Phoenix (mainnet-grade)
- OpenBook (mainnet-grade)
- ⚡ Flash Loan Arbitrage: Leverage flash loans from 5 providers with fees ranging from 0.09%-0.20%
- 🔄 Triangular Arbitrage: Multi-hop trading using Jupiter v6 aggregator
- 🎯 Hybrid Strategy: Combine both approaches for maximum profitability
- Native: SOL, wSOL, RAY, ORCA, MNGO, SRM, JUP, RENDER, JTO, PYTH, STEP
- Stablecoins: USDC, USDT, USDH, UXD, USDR
- Liquid Staking Tokens: mSOL, stSOL, jitoSOL, bSOL, scnSOL
- Memecoins: BONK, WIF, SAMO, MYRO, POPCAT, WEN
- GXQ Ecosystem: GXQ, sGXQ, xGXQ
- 🔍 Multi-Angle Scanning: Flash loan, triangular, and cross-DEX arbitrage detection
- ⚡ 1-Second Polling: Real-time opportunity detection with configurable intervals
- 🌐 20+ Aggregators: Jupiter + 12 direct DEX integrations for comprehensive coverage
- 💾 Historical Analysis: Database-backed tracking and analytics
- 📊 Dynamic Gas Estimation: Real-time compute unit estimation via Solana RPC
- 🎯 User-Configurable Slippage: Set maximum slippage tolerance
- 🔔 Live Notifications: Real-time alerts for profitable opportunities
- 📈 Performance Metrics: Detailed statistics and success rate tracking
- 🎁 Airdrop Checker: Automatic detection and claiming of airdrops
- 📋 Preset Management: Pre-configured strategies for different market conditions
- 🛡️ MEV Protection: Jito bundle integration to prevent front-running
- ⚡ Auto-Execution: Continuous monitoring and execution of profitable opportunities
- 🔧 Manual Execution: Review and manually execute opportunities with "sweet profit"
- 💰 Dev Fee System: Automatic 10% profit sharing to development wallet
- 💎 GXQ Ecosystem Integration: Native support for GXQ tokens
# Clone the repository
git clone https://github.com/SMSDAO/reimagined-jupiter.git
cd reimagined-jupiter
# Install dependencies
npm install
# Build the project
npm run buildCopy the example environment file and configure your settings:
cp .env.example .envEdit .env with your configuration:
# Solana Configuration
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
WALLET_PRIVATE_KEY=your_private_key_here
# QuickNode Configuration
QUICKNODE_RPC_URL=your_quicknode_rpc_url
QUICKNODE_API_KEY=your_quicknode_api_key
QUICKNODE_FUNCTIONS_URL=your_quicknode_functions_url
QUICKNODE_KV_URL=your_quicknode_kv_url
QUICKNODE_STREAMS_URL=your_quicknode_streams_url
# Arbitrage Configuration
MIN_PROFIT_THRESHOLD=0.005
MAX_SLIPPAGE=0.01
GAS_BUFFER=1.5
# Dev Fee Configuration (10% of profits)
DEV_FEE_ENABLED=true
DEV_FEE_PERCENTAGE=0.10
DEV_FEE_WALLET=monads.solananpm start airdropsnpm start claimnpm start presetsnpm start scannpm start startReview opportunities before executing:
npm start manualnpm start providersReal-time multi-angle arbitrage detection with 1-second polling:
# Start enhanced scanner
npm start enhanced-scan
# View scanner statistics
npm start scanner-stats
# View database statistics
npm start db-stats
# Historical analysis
npm start historySee ENHANCED_SCANNER.md for complete documentation.
- Strategy: Flash loan arbitrage with stablecoins
- Tokens: USDC, USDT, USDH, UXD
- Risk: Low
- Min Profit: 0.3%
- Strategy: Triangular arbitrage with SOL
- Tokens: SOL, USDC, USDT, RAY, ORCA
- Risk: Medium
- Min Profit: 0.5%
- Strategy: Hybrid approach with LSTs
- Tokens: SOL, mSOL, stSOL, jitoSOL, bSOL
- Risk: Low-Medium
- Min Profit: 0.4%
- Strategy: High-frequency memecoin trading
- Tokens: BONK, WIF, SAMO, MYRO, POPCAT
- Risk: High
- Min Profit: 1.0%
- Strategy: GXQ token ecosystem opportunities
- Tokens: GXQ, sGXQ, xGXQ, SOL, USDC
- Risk: Medium
- Min Profit: 0.5%
- Strategy: Major DeFi token opportunities
- Tokens: JUP, RAY, ORCA, MNGO, SRM
- Risk: Medium
- Min Profit: 0.6%
The system includes multiple layers of MEV protection:
- Jito Bundle Integration: Bundle transactions to prevent front-running
- Private RPC: Send transactions through private mempool
- Dynamic Priority Fees: Optimize gas fees based on urgency
- Dynamic Slippage: Market-aware slippage calculation based on volatility and liquidity
- Safety Checks: Confidence scoring and opportunity validation
src/
├── config/ # Configuration and token definitions
├── providers/ # Flash loan provider implementations
├── dex/ # DEX integrations
├── integrations/ # QuickNode and Jupiter integrations
├── services/ # Core services (airdrop, presets, auto-execution)
├── strategies/ # Arbitrage strategies
├── types.ts # TypeScript type definitions
└── index.ts # Main entry point and CLI
High-performance PowerShell script for automated branch merging with parallel processing:
- ⚡ 5x Faster: Parallel processing reduces 42m → 8m (80% improvement)
- 🔄 Parallel Jobs: Up to 8 branches merged simultaneously
- 🛡️ Safe: Automatic conflict resolution, rollback, and health checks
- 📊 Monitored: Comprehensive performance metrics and benchmarking
- 🧪 Tested: Full test suite with health validation
# Merge specific branches
./scripts/Merge-Branches.ps1 -SourceBranches @("feature/auth", "feature/api")
# Auto-sweep all feature branches
./scripts/Merge-Branches.ps1 -AutoSweep -MaxParallelJobs 8
# Dry run (test without changes)
./scripts/Merge-Branches.ps1 -SourceBranches @("feature/test") -DryRun- Merge Automation Guide - Complete user manual
- GitHub Actions Integration - CI/CD workflows
- Performance Results - Detailed benchmarks
| Configuration | Time | Speedup | Memory |
|---|---|---|---|
| Sequential (baseline) | 42m 30s | 1.0x | 2.1 GB |
| Parallel (4 jobs) | 18m 45s | 2.3x | 3.2 GB |
| Optimized (8 jobs) | 8m 30s | 5.0x | 3.5 GB |
See Performance Results for detailed analysis.
# Run in development mode
npm run dev
# Run linter
npm run lint
# Run tests
npm test
# Validate API endpoints
npm run validate-endpoints http://localhost:3000
# Test merge automation (PowerShell)
pwsh ./scripts/Test-MergeBranches.ps1All API endpoints now include:
- ✅ Input Validation: Type checking, range validation, and sanitization
- ✅ Error Handling: Consistent error responses with detailed messages
- ✅ Rate Limiting: Protection against abuse (configurable per endpoint)
- ✅ CORS Configuration: Environment-aware cross-origin access control
- ✅ Authentication: JWT-based authentication with expiration
- ✅ Request Logging: Comprehensive logging for debugging and monitoring
See API Validation Guide for complete documentation.
- ✅ Automatic deployment on push to main
- ✅ Health check validation after deployment
- ✅ Automatic rollback on failure
- ✅ Preview deployments for PRs
- ✅ Deployment status tracking
- ✅ Automatic deployment with health checks
- ✅ Retry logic for transient failures
- ✅ Endpoint validation tests
- ✅ Issue creation on deployment failure
See Deployment Automation Guide for setup instructions.
The Autonomous Oracle continuously analyzes the codebase during CI/CD pipeline execution to ensure code quality, security, and performance optimization.
- 🏗️ Architecture Analysis: Detects circular dependencies, god classes, and architectural debt
- 🔒 Security Scanning: Identifies vulnerabilities, validates RBAC/encryption usage
- ⚡ Gas Optimization: Analyzes compute units and priority fees for Solana efficiency
- ⚙️ Mainnet Compatibility: Validates versioned transactions and best practices
- 🧬 Evolution Intelligence: Identifies technical debt and suggests modern patterns
- 🎫 Auto-Ticketing: Creates GitHub issues for critical findings
- 90-100: Excellent - Deploy with confidence
- 70-89: Good - Minor improvements recommended
- 50-69: Fair - Address issues before deployment
- 0-49: Poor - Critical issues require immediate attention
The oracle runs automatically in CI/CD and blocks deployment if critical issues are detected:
- ❌ Critical issues = Deployment blocked
⚠️ High issues (>2) = Review required- ✅ No blockers = Safe to deploy
See AUTONOMOUS_ORACLE.md for complete documentation.
| Provider | Fee | Liquidity | Speed | Best For |
|---|---|---|---|---|
| Marginfi | 0.09% | High | Fast | General arbitrage |
| Solend | 0.10% | Very High | Fast | Large trades |
| Kamino | 0.12% | High | Medium | Stable trades |
| Mango | 0.15% | Medium | Fast | Leverage plays |
| Port Finance | 0.20% | Medium | Medium | Niche opportunities |
- Detect price discrepancy across DEXs
- Borrow funds via flash loan (no collateral)
- Execute arbitrage trade
- Repay loan + fee
- Keep the profit
- Identify 3-token cycle opportunity
- Use Jupiter v6 for optimal routing
- Execute A → B → C → A trades
- Profit from price inefficiencies
Cryptocurrency trading and arbitrage involve significant risks:
- Smart contract risks
- Market volatility
- MEV attacks
- Slippage
- Network congestion
Always test with small amounts first and never invest more than you can afford to lose.
MIT License - see LICENSE file for details
- Quick Start Guide - Fast setup and common tasks
- Deployment Ready - Mainnet deployment instructions
- Implementation Summary - Complete feature overview
- API Validation Guide - Input validation and error handling
- Endpoint Configuration - Endpoint reference and configuration
- Deployment Automation - CI/CD workflows and automation
- Vercel Deployment - Vercel-specific instructions
- Enhanced Scanner - Real-time arbitrage scanning
- Merge Automation Guide - PowerShell merge automation (80% faster)
- GitHub Actions Integration - CI/CD workflow integration
- Performance Results - Benchmark analysis and optimization metrics
- Flash Loan Enhancements - Flash loan system details
- Security Guide - Security best practices
- Testing Guide - Testing procedures and coverage
For complete mainnet deployment instructions, see DEPLOYMENT_READY.md including:
- API keys & credentials setup
- Security best practices
- Testing checklist
- Monitoring & maintenance
- Troubleshooting guide
- Expected profitability ($2,000-$10,000+/month)
We welcome contributions! See CONTRIBUTING.md for guidelines.
Before contributing:
- Read the documentation in
docs/ - Follow the coding standards
- Add tests for new features
- Ensure all CI checks pass
- Update documentation as needed
This project includes a comprehensive CI/CD pipeline with automated testing, security scanning, and deployment previews.
- Multi-Node Testing: Tests run on Node.js 18 and 20
- Code Quality: ESLint with zero warnings policy
- Type Safety: Strict TypeScript checking
- Test Coverage: Automated coverage collection with 90% target
- Security Scanning: CodeQL analysis and npm audit
- Preview Deployments: Automatic Vercel and Railway previews for every PR
- Auto-merge: Automated PR merging when all checks pass
- Dual Deployment: Automatic deployment to both Vercel (webapp) and Railway (backend) on push to main
# Run all validation checks
npm run validate
# Individual checks
npm run lint # Lint backend
npm run lint:webapp # Lint webapp
npm run type-check # Type check backend
npm run type-check:webapp # Type check webapp
npm run test # Run backend tests with coverage
npm run test:webapp # Run webapp tests with coverage
npm run build # Build both backend and webapp
npm run build:backend # Build backend only
npm run build:webapp # Build webapp onlyThe project includes a comprehensive master orchestration script that automates the full build, validation, and deployment pipeline:
# Run full master orchestration (recommended before deploying)
npm run master # Complete build & validation pipeline
# Individual orchestration scripts
npm run env-check # Validate required environment variables
npm run env-sync # Check .env.example is in sync
npm run db-migrate # Run database migrations (if DB configured)
npm run validate-build # Validate all build artifacts exist
npm run health # Run system health checks
npm run perf # Generate performance reportMaster Orchestration Pipeline Steps:
- Environment validation (required variables)
- Clean dependency installation (backend + webapp)
- TypeScript type-checking (strict mode)
- Code linting (ESLint with zero-warning policy)
- Auto-fix pass (format & fix issues)
- Backend build (TypeScript compilation)
- Webapp build (Next.js production build)
- Database schema validation & migration (if configured)
- API health check configuration validation
- Build artifact validation
- Git operations (commit, tag, push)
Environment Requirements:
All required environment variables must be documented in .env.example as placeholders. The system validates:
- Required variables are present in your local
.env - All production variables are documented in
.env.example - No real secrets are committed to
.env.example
Database Support:
Optional PostgreSQL database support with automated migrations:
- Schema:
db/schema.sql - Migrations:
npm run db-migrate - Configuration: Set
DB_HOST,DB_USER,DB_PASSWORD,DB_NAMEin.env
Repository maintainers should configure these secrets in Settings → Secrets and variables → Actions:
VERCEL_TOKEN- Vercel authentication tokenVERCEL_PROJECT_ID- Vercel project IDVERCEL_ORG_ID- Vercel organization/team IDNEXT_PUBLIC_RPC_URL- Solana RPC URL for webapp
RAILWAY_TOKEN- Railway API authentication tokenRAILWAY_PROJECT_ID- Railway project ID (2077acd9-f81f-47ba-b8c7-8bf6905f45fc)SOLANA_RPC_URL- Solana RPC endpoint URLWALLET_PRIVATE_KEY- Wallet private key (base58 format)ADMIN_USERNAME- Admin panel usernameADMIN_PASSWORD- Admin panel passwordJWT_SECRET- JWT authentication secret
CODECOV_TOKEN- Codecov upload token
SLACK_WEBHOOK- Slack webhook URL for notifications
Check the Actions tab to view workflow runs and results. Each PR will show:
- ✅ Lint and type checking results
- ✅ Test results with coverage report
- ✅ Security scan results
- ✅ Build success/failure
- 🔗 Preview deployment URL (when secrets are configured)
For support and questions:
- Issues: Open a GitHub issue with appropriate labels
- Documentation: Check the
docs/directory - Security: See SECURITY_GUIDE.md
- Deployment: See DEPLOYMENT_AUTOMATION.md
- Solana Foundation
- Jupiter Aggregator
- QuickNode
- All flash loan providers and DEX protocols
Built with ❤️ by GXQ STUDIO
- ✅ 5 Flash Loan Providers with fees from 0.09%-0.20%
- ✅ 11 DEX Integrations including Jupiter v6 aggregator
- ✅ 30+ Token Support including stablecoins, LSTs, and memecoins
- ✅ MEV Protection via Jito bundles and private RPC
- ✅ Real-time Monitoring with 1-second polling intervals
- ✅ Automated Deployment with health checks and rollback
- ✅ Comprehensive Validation for all API endpoints
- ✅ Production-Ready with complete documentation
Status: Production-Ready | Last Updated: December 2024