A comprehensive social trading platform built for Solana that allows users to track top-performing wallets and automatically copy their trades. Built with Next.js, TypeScript, and Privy for authentication.
- Monitor top-performing Solana wallets in real-time
- Track wallet performance metrics (PnL, win rate, total trades)
- Rank wallets by performance score
- Add custom tags and descriptions for tracked wallets
- Detailed performance charts and metrics
- Historical performance tracking
- Wallet ranking and comparison tools
- Visual analytics with interactive charts
- Automatic copy trading from top performers
- Manual copy trading with customizable amounts
- Risk assessment and signal strength indicators
- Real-time trading signals and notifications
- Secure delegation of trading permissions
- Admin approval workflow for copy trading access
- Granular permission controls (max amounts, allowed tokens)
- User management and access control
- Manage delegation requests
- Monitor platform statistics
- Oversee copy trading activities
- User management and access control
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS
- Authentication: Privy
- Blockchain: Solana Web3.js
- Charts: Recharts
- UI Components: Radix UI, Lucide React
- Node.js 18+
- Yarn package manager
- Solana RPC endpoint
- Privy App ID and Secret
- Clone the repository:
git clone <repository-url>
cd copy-trading-social-media- Install dependencies:
yarn install- Set up environment variables:
cp .env.example .env.local- Configure your environment variables in
.env.local:
# Solana Configuration
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
NEXT_PUBLIC_SOLANA_WS_URL=wss://api.mainnet-beta.solana.com
SOLANA_PRIVATE_KEY=your_admin_wallet_private_key_here
# Privy Configuration
NEXT_PUBLIC_PRIVY_APP_ID=your_privy_app_id_here
PRIVY_APP_SECRET=your_privy_app_secret_here
# Admin Configuration
ADMIN_WALLET_ADDRESS=your_admin_wallet_address_here- Start the development server:
yarn dev- Open http://localhost:3000 in your browser.
src/
βββ app/ # Next.js app router pages
β βββ analytics/ # Analytics page
β βββ admin/ # Admin panel
β βββ copy-trading/ # Copy trading interface
β βββ wallets/ # Wallet tracking
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ admin/ # Admin components
β βββ analytics/ # Analytics components
β βββ copy-trading/ # Copy trading components
β βββ dashboard/ # Dashboard components
β βββ navigation/ # Navigation components
β βββ ui/ # Reusable UI components
β βββ wallet-tracker/ # Wallet tracking components
βββ lib/ # Core functionality
βββ auth.ts # Authentication logic
βββ copy-trading.ts # Copy trading engine
βββ solana.ts # Solana integration
βββ transaction-indexer.ts # Transaction processing
βββ utils.ts # Utility functions
βββ wallet-tracker.ts # Wallet tracking system
The platform continuously monitors Solana wallets by:
- Fetching recent transactions via Solana RPC
- Analyzing transaction patterns and performance
- Calculating PnL, win rates, and other metrics
- Ranking wallets by performance score
A sophisticated system that:
- Indexes and categorizes transactions (swaps, transfers, stakes)
- Extracts token transfer information
- Identifies trading patterns and opportunities
- Provides real-time transaction monitoring
Automated trading system that:
- Monitors tracked wallets for new transactions
- Generates trading signals based on performance
- Executes copy trades with customizable parameters
- Manages risk and position sizing
Secure permission management:
- Users request delegation from admin wallets
- Admins approve/reject requests with custom permissions
- Granular control over trading amounts and token restrictions
- Secure storage of delegation permissions
- Connect Wallet: Use Privy to connect your Solana wallet
- Request Delegation: Request copy trading permissions from admin
- Browse Wallets: Explore top-performing wallets
- Copy Trades: Execute copy trades manually or enable auto-copy
- Monitor Performance: Track your copy trading results
- Access Admin Panel: Navigate to
/admin(requires admin wallet) - Manage Delegations: Approve/reject user delegation requests
- Monitor Platform: View platform statistics and user activity
- Track Performance: Monitor overall copy trading performance
- All wallet connections are handled securely through Privy
- Delegation permissions are stored locally (in production, use secure database)
- Private keys should never be exposed in client-side code
- Admin functions are protected by wallet address verification
- All transactions are validated before execution
- Create components in appropriate directories
- Add new pages in the
app/directory - Update navigation in
components/navigation/navbar.tsx - Add any new API routes in
app/api/
yarn lint # Run ESLint
yarn build # Build for production
yarn start # Start production server- Build the application:
yarn build-
Deploy to your preferred platform (Vercel, Netlify, etc.)
-
Configure environment variables in your deployment platform
-
Ensure your Solana RPC endpoint is accessible from production
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the documentation
- Review the code comments for implementation details
- Database integration for persistent storage
- Advanced risk management features
- Social features (following, leaderboards)
- Mobile app development
- Advanced analytics and reporting
- Integration with more DEXs
- Automated strategy backtesting
- Community features and discussions