📘 Start here: Use
DOCS_INDEX.mdas the canonical navigation for setup, deployment, DNS, and operations docs.
A sophisticated automated Web3 trading platform built with Next.js, React, and powered by Solana blockchain technology. Trade smarter with AI-driven insights and decentralized technology.
- Primary Domain: https://tradehax.net
- Mirror Domain: https://tradehaxai.tech
- 🚀 Modern Stack: Built with Next.js 15.5.12, React 19, TypeScript
- 🔗 Solana Integration: Native Web3 wallet support with Solana blockchain
- 🎨 Beautiful UI: Tailwind CSS 4 with custom design system
- 📱 Responsive Design: Mobile-first, works perfectly on all devices
- ⚡ Performance Optimized: Code splitting, lazy loading, and optimized bundle size
- 🔒 Security First: CSP headers, XSS protection, and secure authentication
- 📊 Analytics Ready: Vercel Analytics and Google Analytics integration
- 🎮 Interactive Gaming: Built-in game features with NFT integration
- 💼 Portfolio Management: Track and manage your investments
- 📝 Task Management: Built-in todo system
- 🎵 Music Section: Music lessons, scholarships, and showcase
- Node.js 18.x or higher
- npm, yarn, pnpm, or bun package manager
- Git
- Clone the repository
git clone https://github.com/DarkModder33/main.git
cd main- Install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install- Set up environment variables
# Copy the canonical environment template
cp .env.example .env.local
# Edit .env.local with your configuration
# See .env.example for all available optionsMinimum required variables:
NEXT_PUBLIC_SOLANA_NETWORK=mainnet-beta
NEXT_PUBLIC_SOLANA_RPC=https://api.mainnet-beta.solana.com
NEXT_PUBLIC_SITE_URL=http://localhost:3000- Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open your browser
Navigate to http://localhost:3000 to see the application.
npm run buildThis creates an optimized production build in the .next directory.
npm run startnpm run lintTradeHax currently supports two deployment paths. Pick one and keep it as the source of truth for production:
- Path A: Vercel (managed hosting + domain wiring)
- Path B: Namecheap VPS (custom VPS workflow via deploy scripts)
For precise setup and troubleshooting, use:
DEPLOYMENT_QUICKSTART.md(current decision tree + minimum required setup)GITHUB_SECRETS_SETUP.md(GitHub Actions secrets)VERCEL_DOMAIN_SETUP.mdandVERCEL_DEPLOYMENT_TROUBLESHOOTING.md(Vercel path)NAMECHEAP_CPANEL_DEPLOYMENT.mdandNAMECHEAP_MIGRATION_CHECKLIST.md(Namecheap path)
Operational rule: a commit being in
maindoes not mean production is updated until the selected deploy path completes successfully.
Run a full local deploy pipeline with one command (or one VS Code task button):
# Production deploy (preflight + social check + quality + build + deploy)
npm run deploy:one-click
# Preview deploy
npm run deploy:one-click:preview
# Validate full pipeline without sending a deployment
node ./scripts/one-button-deploy.js --prod --dry-runThe script uses npx vercel@latest so a global Vercel install is not required.
Run a high-intensity local loop that continuously hardens website quality, internal links, and LLM readiness checks with a report artifact:
# Full aggressive loop
npm run dev:aggressive
# Faster pass for frequent iteration
npm run dev:aggressive:quick
# Keep running remaining steps even if one fails
npm run dev:aggressive:continue
# Include deploy launcher dry-run audit
npm run dev:aggressive:deploy-ready
# Strict mode (fail fast)
npm run dev:aggressive:strict
# Verify latest report integrity + consistency
npm run dev:aggressive:verify
# Run + verify in one command
npm run dev:aggressive:prove
# Elite threshold proof (95+)
npm run dev:aggressive:prove:eliteEach run outputs:
.artifacts/aggressive-dev-report.json(execution proof).artifacts/aggressive-dev-report.sha256(integrity checksum).artifacts/aggressive-dev-plan.json(planned objectives and step map)
An autonomous CI workflow (.github/workflows/aggressive-proof-gate.yml) also runs this proof gate on schedule and key automation changes.
If your site is not live after deployment:
- Check GitHub Actions - Go to Actions tab and verify workflow succeeded
- Check Vercel Dashboard - Verify deployment shows "Ready" status
- Check DNS Propagation - Use https://dnschecker.org to verify DNS records
- Review Logs - Check GitHub Actions logs and Vercel deployment logs
- Consult Guide - See VERCEL_DEPLOYMENT_TROUBLESHOOTING.md for detailed solutions
| Variable | Description | Example |
|---|---|---|
NEXT_PUBLIC_SOLANA_NETWORK |
Solana network to use | mainnet-beta or devnet |
NEXT_PUBLIC_SOLANA_RPC |
Solana RPC endpoint | https://api.mainnet-beta.solana.com |
NEXT_PUBLIC_SITE_URL |
Your website URL | https://tradehaxai.tech |
| Variable | Description | Example |
|---|---|---|
NEXT_PUBLIC_HELIUS_API_KEY |
Helius RPC API key (recommended) | your-helius-key |
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID |
Google Analytics tracking ID | G-XXXXXXXXXX |
NEXT_PUBLIC_CLAIM_API_BASE |
Claim API endpoint | https://tradehaxai.tech/api/claim |
See .env.example for complete list of all available environment variables.
# Generate social API templates and scaffold missing placeholders into .env.local
npm run social:setup
# Check which provider credentials are still missing
npm run social:checkTemplates are written to .env.social.example, and provider toggles are controlled via TRADEHAX_SOCIAL_PROVIDERS.
.
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ │ ├── claim/ # Claim reward API
│ │ └── subscribe/ # Newsletter subscription API
│ ├── blog/ # Blog pages
│ ├── dashboard/ # Dashboard page
│ ├── game/ # Game page
│ ├── music/ # Music section
│ ├── portfolio/ # Portfolio page
│ ├── services/ # Services page
│ ├── todos/ # Todo app
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/ # React components
│ ├── counter/ # Solana counter
│ ├── landing/ # Landing page sections
│ ├── monetization/ # Ads and affiliate
│ ├── shamrock/ # Header and footer
│ └── ui/ # UI components
├── lib/ # Utility libraries
├── public/ # Static assets
├── styles.css # Additional styles
├── next.config.ts # Next.js configuration
├── tailwind.config.ts # Tailwind configuration
├── vercel.json # Vercel configuration
├── .env.example # Example environment variables
└── package.json # Dependencies and scripts
- ✅ Content Security Policy (CSP) headers
- ✅ XSS protection
- ✅ CSRF protection
- ✅ Secure headers (X-Frame-Options, X-Content-Type-Options)
- ✅ HTTPS enforced in production
- ✅ Rate limiting on API routes
- ✅ Input validation and sanitization
-
Never commit sensitive data
.envand.env.localare gitignored- Use Vercel environment variables for secrets
-
Keep dependencies updated
npm audit npm update
-
Use dedicated RPC providers
- Don't rely on public RPCs in production
- Use Helius, QuickNode, or Triton
The application includes several optimizations:
- ⚡ Next.js 15 with Turbopack for faster builds
- 🎨 Tailwind CSS 4 for optimized styles
- 📦 Code splitting and lazy loading
- 🖼️ Image optimization with Next.js Image
- 💾 Static generation where possible
- 🗜️ Compression enabled
- 📊 Bundle size optimization
To analyze bundle size:
npm run buildThe build output shows the size of each page and shared chunks.
- Homepage loads correctly
- Wallet connection works
- Navigation between pages
- API endpoints respond
- Forms submit properly
- Mobile responsiveness
- Cross-browser compatibility
# Coming soon
npm run testVercel Analytics is enabled by default. View analytics in your Vercel Dashboard.
To enable Google Analytics:
- Get your tracking ID from Google Analytics
- Add to environment variables:
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX - Deploy
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- IDE_AUTOMATION_WORKFLOW.md - Local IDE + pipeline contract for AI-assisted development
- LOCAL_REPO_WORKFLOW.md - Canonical and mirror clone workflow for local development
- HARD_LAUNCH_RUNBOOK.md - Production launch checklist and rollback process
- CUSTOM_LLM_MODEL_PLAN.md - Custom LLM model roadmap and dataset prep flow
- DEPLOYMENT_GUIDE.md - Complete deployment guide
- DOMAIN_SETUP_GUIDE.md - DNS and domain setup
- INTEGRATION_GUIDE.md - API integration guide
- VERCEL_API_SETUP.md - API keys and configuration
- AI_LLM_INTEGRATION.md - AI integration architecture
Issue: Build fails with module not found
# Solution: Clear cache and reinstall
rm -rf .next node_modules package-lock.json
npm install
npm run buildIssue: TypeScript errors
# Solution: Clear Next.js cache
rm -rf .next
npm run buildIssue: Wallet connection fails
- Ensure you have a Solana wallet installed (Phantom, Solflare)
- Check that RPC endpoint is accessible
- Verify network configuration (mainnet vs devnet)
Issue: API routes return 404
- Verify API routes exist in
app/api/ - Check Vercel function logs
- Ensure environment variables are set
Issue: Domain not resolving
- Wait 24-48 hours for full DNS propagation
- Check DNS records in Namecheap
- Use dnschecker.org to verify
Issue: SSL certificate not issued
- Ensure DNS is fully propagated
- Check Vercel domain status
- Wait up to 24 hours for certificate issuance
- Documentation: Check the docs in the repository
- Issues: Open an issue on GitHub
- Email: support@tradehaxai.tech
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js
- Styled with Tailwind CSS
- Blockchain powered by Solana
- Deployed on Vercel
Built with ❤️ by the TradeHax AI Team