File size: 4,994 Bytes
ed5e325 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
                
# 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.
|