Architecture
Project Structure
polymarks/
├── app/ # Next.js App Router pages
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Homepage (3D landing)
│ ├── markets/ # Markets dashboard
│ ├── whales/ # Whale tracker
│ ├── outliers/ # Smart money signals
│ ├── market/[slug]/ # Individual market pages
│ └── api/ # API routes (proxies)
│ ├── markets/ # Polymarket markets proxy
│ └── trades/ # Polymarket trades proxy
├── core/ # Shared utilities
│ ├── api/ # API clients
│ ├── config/ # Environment config
│ └── types/ # TypeScript types
├── features/ # Feature modules
│ ├── markets/ # Market listing & filtering
│ ├── whales/ # Whale tracking
│ ├── outliers/ # Smart money detection
│ ├── referral/ # Polymarket referral URLs
│ └── market-whale-sentiment/ # Market sentiment
├── components/ # Shared UI components
└── hooks/ # Custom React hooksDesign Principles
1. Feature Modules
2. Core Module
3. API Routes as Proxies
4. Client vs Server Components
Data Flow
State Management
Performance Optimizations
Last updated