|                  | |
| # Polymarket Trader | |
| A comprehensive trading application built with a Go backend and a React/TypeScript frontend. | |
| ## Project Structure | |
| This project is organized into a clear separation of concerns between the backend and frontend services. | |
| ```text | |
| polymarket-trader | |
| βββ .gitignore | |
| βββ docker-compose.yml | |
| βββ backend | |
| β βββ .env.example | |
| β βββ go.mod | |
| β βββ go.sum | |
| β βββ server.exe | |
| β βββ cmd | |
| β β βββ server | |
| β β βββ main.go | |
| β β βββ main_test.go | |
| β βββ internal | |
| β βββ adapters | |
| β β βββ polymarket | |
| β β βββ client.go | |
| β β βββ websocket.go | |
| β βββ api | |
| β β βββ handlers.go | |
| β β βββ router.go | |
| β βββ config | |
| β β βββ config.go | |
| β βββ core | |
| β β βββ analytics.go | |
| β β βββ copy_engine.go | |
| β β βββ trader_discovery.go | |
| β βββ models | |
| β βββ models.go | |
| βββ frontend | |
| βββ .gitignore | |
| βββ components.json | |
| βββ eslint.config.js | |
| βββ index.html | |
| βββ package-lock.json | |
| βββ package.json | |
| βββ postcss.config.js | |
| βββ tailwind.config.js | |
| βββ tsconfig.app.json | |
| βββ tsconfig.json | |
| βββ tsconfig.node.json | |
| βββ vite.config.ts | |
| βββ public | |
| β βββ vite.svg | |
| βββ src | |
| βββ App.css | |
| βββ App.test.tsx | |
| βββ App.tsx | |
| βββ index.css | |
| βββ main.tsx | |
| βββ assets | |
| β βββ react.svg | |
| βββ components | |
| β βββ ActivePositions.tsx | |
| β βββ BotChat.tsx | |
| β βββ CopyConfigDialog.tsx | |
| β βββ ui | |
| β βββ avatar.tsx | |
| β βββ badge.tsx | |
| β βββ button.tsx | |
| β βββ card.tsx | |
| β βββ dialog.tsx | |
| β βββ input.tsx | |
| β βββ label.tsx | |
| β βββ scroll-area.tsx | |
| β βββ table.tsx | |
| β βββ tabs.tsx | |
| βββ lib | |
| β βββ utils.ts | |
| βββ test | |
| βββ setup.ts | |
| ``` | |
| ## Backend (`/backend`) | |
| The backend is built with **Go** and follows a standard clean architecture layout: | |
| - **`cmd/`**: Contains the main entry points for the application. | |
| - **`internal/`**: Private application code. | |
| - **`adapters/`**: implementations of interfaces for external services (e.g., Polymarket). | |
| - **`api/`**: HTTP handlers and router configuration. | |
| - **`core/`**: Business logic and domain services. | |
| ## Frontend (`/frontend`) | |
| The frontend is a **React** application powered by **Vite** and **TypeScript**: | |
| - **`src/`**: Source code for the frontend application. | |
| - **`components/`**: Reusable UI components. | |
| - **`lib/`**: Helper functions and utilities. | |