Skip to content

omerada/bist-robogo

Repository files navigation

🚀 BIST RoboGo

AI-Powered Automated Trading Platform for Borsa Istanbul (BIST)

CI Python 3.12+ Next.js 15 FastAPI TypeScript License: MIT PRs Welcome

FeaturesArchitectureQuick StartDocumentationContributing


An open-source, modular, AI-driven trading infrastructure for Borsa Istanbul (BIST) — featuring real-time market data, automated order execution, technical & AI-based strategies, backtesting, and a professional dashboard.

⚠️ Disclaimer: This platform does not provide investment advice. Trading involves risk of loss. Use responsibly.

✨ Features

Feature Description
Real-Time Market Data Live prices, volume, and order book via WebSocket
Automated Order Execution Risk-controlled buy/sell with broker adapters
Trend & Bottom Detection Technical indicators (RSI, MACD, Bollinger) + AI models
Risk Management Daily loss limits, position sizing, volatility controls
Backtesting Engine Historical strategy simulation with detailed metrics
Professional Dashboard Real-time P&L, positions, risk gauges, performance charts
Index Filtering BIST30, BIST100, Participation Index support
AI Strategy Engine ML-powered predictions using XGBoost, scikit-learn, PyTorch
Paper Trading Safe simulation mode before going live
Notifications Telegram bot & email alerts for signals and risk events

🏗️ Architecture

                    Frontend (Next.js 15)
                           │
                    API Gateway (Nginx)
                           │
                    Backend (FastAPI)
                    ┌──────┼──────┐
                    │      │      │
               Market   Trading  Strategy
               Data     Engine   Engine
                    │      │      │
              ┌─────┼──────┼──────┼─────┐
              │     │      │      │     │
          PostgreSQL TimescaleDB Redis Kafka MinIO

🛠️ Tech Stack

Layer Technology
Backend Python 3.12+, FastAPI, Celery, SQLAlchemy 2.0
Frontend Next.js 15, React 19, TypeScript 5.7, TailwindCSS
Database PostgreSQL 16 + TimescaleDB
Cache / Queue Redis 7+, Kafka / Redpanda
AI/ML scikit-learn, XGBoost, PyTorch, TA-Lib
Monitoring Prometheus, Grafana, Sentry, structlog
DevOps Docker, Docker Compose, GitHub Actions
Testing pytest, Vitest, Playwright

📁 Project Structure

bist-robogo/
├── backend/                 # Python Backend (FastAPI)
│   ├── app/
│   │   ├── api/             # REST API routes (v1)
│   │   ├── brokers/         # Broker adapters (paper, live)
│   │   ├── core/            # Config, security, Redis, WebSocket
│   │   ├── indicators/      # Technical indicators (RSI, MACD, etc.)
│   │   ├── models/          # SQLAlchemy ORM models
│   │   ├── schemas/         # Pydantic request/response schemas
│   │   ├── services/        # Business logic layer
│   │   ├── strategies/      # Trading strategies (MA crossover, AI trend)
│   │   ├── tasks/           # Celery async tasks
│   │   └── websocket/       # Real-time WebSocket streams
│   ├── alembic/             # Database migrations
│   ├── tests/               # Backend test suite (pytest)
│   └── pyproject.toml
├── frontend/                # Next.js 15 Frontend
│   ├── src/
│   │   ├── app/             # App Router pages
│   │   ├── components/      # React components (auth, charts, layout)
│   │   ├── hooks/           # Custom React hooks
│   │   ├── lib/             # API client, utilities
│   │   ├── stores/          # Zustand state management
│   │   └── types/           # TypeScript type definitions
│   └── package.json
├── docs/                    # Design & implementation docs (12 files)
├── docker-compose.yml       # Full dev environment (6 services)
├── Makefile                 # Common dev commands
└── .github/workflows/       # CI pipeline

📚 Documentation

The docs/ directory contains 12 detailed design & implementation documents:

# Document Topics
01 R&D & Requirements Analysis Tech research, functional/non-functional requirements
02 System Architecture Modules, data flows, deployment
03 Data Models & API DB schemas, API contracts, event flows
04 Frontend Design & UX UI/UX, wireframes, component hierarchy
05 Development Plan & MVP Sprint planning, roadmap
06 Gap Analysis Report Coverage gaps in existing docs
07 Backend Implementation Guide File structure, code patterns
08 Frontend Implementation Guide Components, hooks, stores
09 Design System Color tokens, typography, component catalog
10 Step-by-Step Dev Guide Docker, CI/CD, phased tasks
11 AI Agent Dev Prompt End-to-end AI agent master prompt
12 Project Status Current progress & completed phases

🚀 Quick Start

Prerequisites

One-Command Setup (Docker)

# Clone the repository
git clone https://github.com/omerada/bist-robogo.git
cd bist-robogo

# Copy environment template
cp .env.example .env
# Edit .env with your own secrets (see .env.example for details)

# Start all services
docker compose up -d --build

# Verify
docker compose ps
# http://localhost:8000/health → 200 OK (Backend)
# http://localhost:3000         → Dashboard  (Frontend)

Local Development (without Docker)

# Backend
cd backend
poetry install
poetry run alembic upgrade head
poetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

# Frontend (in a separate terminal)
cd frontend
pnpm install
pnpm dev

Make Commands

make dev            # Start all services (Docker)
make test           # Run all tests (backend + frontend)
make backend-test   # Backend tests with coverage
make frontend-test  # Frontend unit tests
make migrate        # Run database migrations
make seed           # Seed BIST30 symbols & indexes

🧪 Testing

# Backend (272+ tests)
cd backend && poetry run pytest -v --cov=app

# Frontend (Vitest)
cd frontend && pnpm test

# E2E (Playwright)
cd frontend && pnpm test:e2e

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🔒 Security

For security concerns, please see SECURITY.md. Do not open public issues for security vulnerabilities.


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


⭐ Star History

If you find this project useful, please consider giving it a star!


⚠️ Disclaimer: This platform does not provide investment advice. Trading involves risk of loss. Use responsibly. The developers are not liable for any financial losses incurred through the use of this software.

About

AI-powered automated trading platform for Borsa Istanbul (BIST). Real-time market data, automated order execution, backtesting, risk management, and a professional dashboard. Built with FastAPI, Next.js 15, React 19, and PostgreSQL.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors