Polymarket-tra / README.md
algorembrant's picture
Upload 66 files
ed5e325 verified

Awesome Last Commit Go TypeScript JavaScript HTML5 CSS3 React TailwindCSS Vite Docker PostCSS JSON YAML Markdown Git ESLint

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.

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.