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
NEW! Every PR is automatically analyzed and optimized by our self-optimization workflow:
- β Auto-fix ESLint Issues: Formatting, imports, and style violations
- β Dead Code Detection: Finds unused exports, imports, and unreachable code
- β Complexity Analysis: Identifies functions that need refactoring
- β Test Coverage Gaps: Detects untested code and generates test templates
- β
Security Scanning: Flags risky patterns like
eval(), type safety issues - β Inline PR Comments: Contextual recommendations on specific code lines
- Code formatting and style
- Unused imports
- Simple ESLint violations
- Type inference improvements
- High complexity functions (cyclomatic complexity > 10)
- Security risks (eval, innerHTML, etc.)
- Excessive
anytype usage - TODO/FIXME in production code
- Low test coverage (<80%)
- Mock/placeholder implementations
See Self-Optimization Guide for complete documentation.
# Run all optimizations locally
npm run optimize
# Fix linting issues
npm run lint:fix
npm run lint:webapp:fix
# Analyze dead code
npm run dead-code:analyze
# Analyze test coverage gaps
npm run coverage:analyze- 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
- Self-Optimization - Automated code quality workflow
- 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