Getting Started

This guide walks you through setting up your development environment for MangroveAI.

Prerequisites

  • Python 3.11+
  • PostgreSQL 17 (with pgvector extension)
  • Docker (recommended)
  • Git
  • Node.js 18+ (for frontend development)

Quick Start (Docker)

1. Clone the Repository

git clone https://github.com/MangroveTechnologies/MangroveAI.git
cd MangroveAI

2. Set Up Configuration

# Copy example config
cp src/MangroveAI/config/local-example-config.json src/MangroveAI/config/local-config.json

# Create .env file
cp src/MangroveAI/.env.example src/MangroveAI/.env
Edit .env and add your API keys:
  • OPENAI_API_KEY (required for AI Copilot)
  • FIREBASE_CONFIG (optional for local dev)

3. Start Services

# Start all services
docker compose up -d

# View logs
docker compose logs -f mangrove-app

4. Verify Installation

curl http://localhost:5001/health
# Returns: {"status": "healthy"}
Access Points:

Project Structure

MangroveAI/
  src/MangroveAI/
    domains/           # Business domains (signals, strategies, backtesting, etc.)
    integrations/      # External API clients (CoinAPI, Nansen, etc.)
    config/            # Configuration files
    scripts/           # Database migrations and utilities
  tests/               # Test suite
  docker-compose.yml   # Container orchestration

Common Tasks

Run Tests

# Fast unit tests only
pytest --test-suite=fast

# Include database tests
pytest --test-suite=slow

# All tests
pytest --test-suite=all

Format Code

black src/MangroveAI/
flake8 src/MangroveAI/ --max-line-length=120

Database Migrations

Migrations are in src/MangroveAI/scripts/migrations/ and run automatically on startup.

Next Steps