Polymarket-tra / README.md
algorembrant's picture
Upload 66 files
ed5e325 verified
![Awesome](https://img.shields.io/badge/awesome-yes-8a2be2.svg?style=flat-square) ![Last Commit](https://img.shields.io/badge/last%20commit-january%202026-9acd32.svg?style=flat-square) ![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=flat-square&logo=go&logoColor=white) ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=flat-square&logo=typescript&logoColor=white) ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=flat-square&logo=javascript&logoColor=%23F7DF1E) ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=flat-square&logo=html5&logoColor=white) ![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=flat-square&logo=css3&logoColor=white) ![React](https://img.shields.io/badge/react-%2320232a.svg?style=flat-square&logo=react&logoColor=%2361DAFB) ![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=flat-square&logo=tailwind-css&logoColor=white) ![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=flat-square&logo=vite&logoColor=white) ![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=flat-square&logo=docker&logoColor=white) ![PostCSS](https://img.shields.io/badge/postcss-%23DD3A0A.svg?style=flat-square&logo=postcss&logoColor=white) ![JSON](https://img.shields.io/badge/json-%23000000.svg?style=flat-square&logo=json&logoColor=white) ![YAML](https://img.shields.io/badge/yaml-%23ffffff.svg?style=flat-square&logo=yaml&logoColor=black) ![Markdown](https://img.shields.io/badge/markdown-%23000000.svg?style=flat-square&logo=markdown&logoColor=white) ![Git](https://img.shields.io/badge/git-%23F05033.svg?style=flat-square&logo=git&logoColor=white) ![ESLint](https://img.shields.io/badge/eslint-%234B32C3.svg?style=flat-square&logo=eslint&logoColor=white)
# 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.