A Next.js dashboard for managing and monitoring Solana DEX trading activities. Intended to be used with the DEX Trading Platform Backend.
NOTE: This is a work in progress and is not yet ready for production.
This dashboard provides a real-time interface for:
- Monitoring wallet balances and token holdings
- Managing copy trade settings
- Executing trades on multiple DEXs (pump.fun, Raydium)
- Viewing trade history and notifications
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State Management: Zustand
- Real-time Updates: WebSockets
- Form Handling: React Hook Form
- Notifications: Sonner
- Clone the repository
- Install dependencies:
npm install- Set up environment variables:
NEXT_PUBLIC_API_URL=http://localhost:3000
NEXT_PUBLIC_WS_URL=ws://localhost:3001- Run the development server:
npm run dev- Real-time balance monitoring
- Token holdings display
- Trade execution interface for any token
- Support for multiple DEXs
- Enable/disable copy trading
- Configure trade amounts and limits
- Set slippage tolerance
- Manage position limits
- Token allowlist support
- Real-time trade notifications
- Settings update confirmations
- Error notifications
- Connection status updates
src/
├── components/
│ ├── dashboard/ # Dashboard-specific components
│ │ ├── server-wallet-card.tsx
│ │ ├── copy-trade-settings-panel.tsx
│ │ ├── notification-panel.tsx
│ │ └── ...
│ └── ui/ # Reusable UI components (shadcn)
├── hooks/
│ └── useWebSocket.ts # WebSocket connection management
├── stores/
│ └── walletTrackerStore.ts # Global state management
└── types/
├── index.ts # Common types
├── ui.ts # UI-specific types
└── websocket.ts # WebSocket types
import { ServerWalletCard } from "@/components/dashboard/server-wallet-card";
// Displays wallet balance and token holdingsimport { CopyTradeSettingsPanel } from "@/components/dashboard/copy-trade-settings-panel";
// Manages copy trade configurationimport { TradePanel } from "@/components/dashboard/trade-panel";
// Provides buy/sell interface for tokensThe application uses Zustand for state management. Key stores include:
// stores/walletTrackerStore.ts
interface WalletTrackerState {
serverWallet: WalletUpdate | null;
copyTradeSettings: CopyTradeSettings | null;
// ... other state
// Actions
setCopyTradeSettings: (settings: CopyTradeSettings) => void;
executeBuy: (address: string, amount: number) => Promise;
executeSell: (address: string, amount: number) => Promise;
}Real-time updates are handled through a WebSocket connection:
// hooks/useWebSocket.ts
const useWebSocket = (url: string) => {
// Manages WebSocket connection and message handling
// Returns connection status and message sender
};- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request