A comprehensive trading application built with a Go backend and a React/TypeScript frontend.
This project is organized into a clear separation of concerns between the backend and frontend services.
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
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.
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.