Equal Platform — Sistema de Paper Trading com IA
MondeNel/equal-platform
Microserviços de paper trading com análise IA e copy trading social
Ver no GitHubPlataforma de simulação de trading (sem dinheiro real) construída com microserviços em FastAPI, integrada com Claude AI para análise de mercado. Inclui camada social com copy trading, leaderboard gamificado e suporte para ações, forex e criptomoedas.
Instalação
npx convez-ai MondeNel/equal-platform1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Aprender trading sem risco financeiro com feedback IA em tempo real
- Estudar arquitetura de microserviços em produção com Docker e orquestração
- Explorar análise de mercado automatizada com Claude em backend
Veredito

Projeto robusto e bem arquitetado para aprender microserviços em contexto real. Backend completo com testes, integração Claude ativa, frontend ainda em progresso. Ideal para quem quer estudar design de sistemas e aplicações financeiras simuladas.
README
A tradução para o português deste README ainda está na fila.
Equal Platform — Microservices Paper Trading System
Why I built this
I built Equal Platform to learn microservices at the infrastructure level — real service boundaries, container orchestration, inter‑service communication, and a production‑style test suite. Paper trading (simulated trading without real money) is the perfect sandbox: clear domain boundaries (users, trades, market data, analysis) and enough complexity to force real architectural decisions.
I have integrated Claude AI as a service that analyzes the markets in the backend and sends notifications to the user. This project brings all of that together: FastAPI microservices, PostgreSQL per service, Docker, JWT auth, and an Anthropic Claude integration.
Current state
✅ Backend microservices complete (Auth, Wallet, Trading, Follow, OrbitBet, Arbitrage, AI Analysis)
✅ 14‑script integration test suite passing (auth, trading, copy trading, wallet, arbitrage, OrbitBet, WebSocket)
✅ AI analysis pipeline working
🚧 Frontend mini‑applications in progress
The backend is fully containerised and can power multiple trading experiences. The React frontend is actively being developed as several independent mini‑apps.
Overview
Equal Platform is a containerised paper trading system. Users can register, simulate trades across stocks, forex and crypto, and receive AI‑generated feedback on every closed trade. A social trading layer lets users follow top traders, automatically copy their positions, and view a ranked leaderboard.
The backend is a collection of independent FastAPI microservices, each with its own PostgreSQL database. All services are orchestrated with docker‑compose, fronted by an Nginx API gateway, and verified by a comprehensive integration test suite.
Architecture
| Service | Responsibility | Stack |
|---|---|---|
| Auth Service | Registration, login, JWT generation & validation | FastAPI, PostgreSQL, SQLAlchemy |
| Wallet Service | Balance management, deposits/withdrawals, transaction history | FastAPI, PostgreSQL, SQLAlchemy |
| Trading Service | Order execution, order book, P&L, real‑time prices (CoinGecko) | FastAPI, PostgreSQL, SQLAlchemy |
| Follow Service | Follow/unfollow traders, copy trade triggers, leaderboard data | FastAPI, PostgreSQL, SQLAlchemy |
| OrbitBet Service | Probability‑based betting game engine | FastAPI, PostgreSQL, SQLAlchemy |
| Arbitrage Service | Cross‑exchange price comparison, automated arbitrage execution | FastAPI, PostgreSQL, Redis (optional) |
| AI Analysis Service | Trade analysis via Anthropic Claude | FastAPI, Anthropic API |
| API Gateway | Reverse proxy, route aggregation, rate limiting | Nginx |
All internal traffic goes through the gateway. The frontend never communicates with services directly — only through the unified API.
Backend features (all tested)
- JWT auth flow (register, login, refresh, protected routes)
- Wallet management with atomic debit/credit operations
- Multi‑asset trade execution (market and limit orders)
- Real‑time market data via CoinGecko
- Copy‑trading engine (follow → copy)
- OrbitBet probability game (spin & guess)
- Arbitrage detection and simulated cross‑exchange execution
- AI‑powered trade evaluation
- Full trade history, portfolio summary, and leaderboard endpoints
Frontend mini‑applications (in progress)
The frontend is split into a Shell (shared container) and five independent React apps, each with its own folder, Vite config, and Tailwind setup. All consume the same backend API through the Nginx gateway.
Shell
The shell is the user’s entry point. It renders a Landing Page with login and registration buttons, and once authenticated, it mounts the active mini‑app inside a persistent bottom navigation bar. The bottom nav shows icons for each app (Trading, OrbitBet, Arbitrage, Leaderboard, Profile) and lets users switch instantly without a full page reload. The shell manages authentication state, JWT token storage, and hands the token down to child apps via React context. This architecture means each mini‑app can be developed and deployed separately while still feeling like a single product.
Auth App
A focused login/registration flow. The Login Page validates email format and minimum password length before posting to the Auth Service. On success, it stores the JWT access and refresh tokens and redirects to the shell. The Register Page asks for email, password, confirm password, and an initial paper‑money balance. Registration calls the Auth Service, which also creates a Wallet Service account atomically. All API calls from other mini‑apps use the stored JWT, with automatic token refresh when the access token expires.
Trading App
The core paper trading experience. It fetches real‑time prices from CoinGecko and presents a professional‑style trading dashboard with:
- CandleChart.jsx – interactive candlestick chart using Recharts, with zoom and timeframe toggles (1m, 5m, 1h, 1d). Prices update every few seconds.
- Order placement panel – choose market or limit order, set quantity, view estimated cost, and submit buy/sell. The panel validates against the user’s wallet balance in real time.
- Wallet integration – a wallet modal (
WalletModal.jsx) shows paper balance, transaction history, and allows simulated deposits/withdrawals. - Streak system – bonus multipliers for consecutive winning trades (
StreakBonusModal.jsx,StreakDisplay.jsx). Streak logic is tracked client‑side via a custom hook (usePlayerStats.js).
The app is built with a component library shared across mini‑apps where appropriate, but its own Vite config and Tailwind theme.
OrbitBet App
A gamified trading experience borrowed from slot machines. The user picks a market (e.g., BTC/USD) and a symbol. The price “spins” through rapid simulated price changes, and the user has three chances to guess whether the final price will be higher or lower by pressing up/down arrow buttons.
- OrbitCanvas.jsx – a full‑screen canvas animation showing a glowing ring (the “orbit”) with the price spinning inside it. The animation speed increases and then decelerates to a dramatic stop.
- OrbitControls.jsx – the up/down buttons, disabled during a spin, with visual feedback on correct/incorrect guesses.
- RoundPopup.jsx – after three guesses, a modal shows the result (win/loss), amount won or lost, and a rematch button.
- StreakStack.jsx – a visual stack of tokens that grows with each consecutive round won. Cashing out at a high streak yields a multiplier on the original bet.
- CashVolt.jsx – a progress bar that fills as the user accumulates winnings. When full, it triggers a “Cash Volt” bonus round with higher multipliers.
- WalletModal.jsx – reused from the Trading app to show balance and top‑up.
- Sound effects –
loss.mp3,orbit_pulse.mp3,streak_flash.mp3,win_major.mp3play at key moments, all managed by a customuseAudiohook that respects user mute preferences.
The game communicates with the OrbitBet Service for spin outcomes, balance checks, and payout settlements. The spin result is determined server‑side to ensure fairness, not on the client.
Arbitrage App
A powerful tool that simulates cross‑exchange arbitrage. It displays live prices for a selected asset across multiple simulated exchanges (e.g., “Luno”, “Binance SA”, “VALR”) and highlights profitable discrepancies.
- ExchangePrices.jsx – a grid of current ask/bid prices per exchange, fetched from the Arbitrage Service’s WebSocket endpoint. Green highlights indicate where the price is lower than another exchange’s selling price.
- OpportunityAlert.jsx – when an arbitrage spread exceeds a configurable threshold (e.g., 0.8%), an animated alert slides in from the top, showing the potential profit after simulated fees.
- ExecuteButton.jsx – one‑click arbitrage: the user selects the buy exchange and sell exchange, enters an amount, and the app submits a pair of limit orders. The Arbitrage Service simulates the execution and returns a transaction breakdown.
- TransactionBreakdown.jsx – a detailed receipt showing buy price, sell price, gross profit, exchange fees, and net profit, all styled with clear green/red indicators.
- AccountBalances.jsx – displays the user’s simulated balances across all connected exchanges, so they can see where funds are held.
- MarketSelector.jsx and OrderTypeSelector.jsx – let the user pick which asset and what type of arbitrage (simple two‑leg or triangular).
All arbitrage logic is handled server‑side by the Arbitrage Service, which continuously scans price feeds and calculates spreads. The frontend subscribes to real‑time updates via WebSocket, giving a live trading‑floor feel.
Social trading — Followers & Leaderboard
The Follow Service manages follow relationships and copy‑trading logic.
- Follow/unfollow: users can subscribe to other traders.
- Copy trades: when a followed trader opens or closes a position, the Trading Service notifies the Follow Service, which automatically replicates the trade for all followers (trade size is configurable).
- Leaderboard: ranked list of top traders by ROI, win rate, or total profit. Endpoints support different periods (7d, 30d, all‑time).
All backend endpoints are implemented, and a leaderboard UI is already partially built inside the Trading app.
Tech stack
Backend
Python · FastAPI · PostgreSQL · SQLAlchemy · Alembic · Pytest · Anthropic Claude API
Infrastructure
Docker · docker‑compose · Nginx · JWT
Frontend
React 18+ · Vite · Tailwind CSS · React Router · Axios · Recharts · WebSocket (for Arbitrage) · Canvas API (OrbitBet animations)