Skip to content

uriafranko/planet-earth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Planet Earth Logo

Unlocking your internal APIs for AI β€” The missing bridge that transforms how AI tools discover and interact with your organization's hidden service ecosystem.

GitHub Stars License

πŸš€ Overview

Planet Earth is an open-source platform that bridges the gap between modern AI-powered development environments and your internal services. By indexing and vectorizing your internal OpenAPI schemas, Planet Earth enables AI IDEs to discover and utilize your private APIs - something traditional AI assistants can't do without specific context about your internal systems.

✨ Features

  • API Discovery: Index and search internal OpenAPI schemas through vector embeddings
  • AI IDE Integration: Seamlessly connect AI-powered IDEs with your internal services
  • MCP Server: Expose a Machine Code Protocol server that AI tools can leverage
  • Self-Hosted: Deploy on your own infrastructure, keeping sensitive API data secure
  • Scalable Architecture: Built with FastAPI, Celery, React, Postgres with pgvector, and Bun for scalable MCP (Optional)
  • Helm Support: Easy Kubernetes deployment with included Helm charts
  • BYO Infrastructure: Bring your own Postgres or Redis instances if desired

πŸ“‹ Table of Contents

πŸ—οΈ System Architecture

Planet Earth follows a modern, microservices-based architecture:

Flow Diagram

Planet Earth Architecture

Services Map

The diagram below shows the major services in Planet Earth and their primary communication paths. The backend (earth-service) exposes an MCP endpoint for low/normal traffic, while the dedicated earth-mcp service is used for high-scale MCP workloads. Both MCP endpoints can be connected to by AI IDEs. Only the most essential connections are shown for clarity.

flowchart TD
  FE[earth-frontend React]
  BE[earth-service FastAPI]
  CEL[Celery Worker]
  REDIS[Redis]
  PG[Postgres + pgvector]
  MCP[earth-mcp Bun, high-scale MCP]
  IDE[AI IDE]

  FE --> BE
  BE ---> PG
  BE --> REDIS
  CEL ---> PG
  REDIS --> CEL

  BE <-.-> IDE
  MCP <-.-> IDE
  MCP <---> PG
Loading

Key points:

  • The backend (earth-service) exposes an MCP endpoint for low/normal traffic, and also handles core API and Celery orchestration.
  • The dedicated earth-mcp service is used for high-scale MCP workloads and only interacts with the vector database (pgvector in Postgres) and AI IDEs.
  • Both MCP endpoints can be added to your AI IDE for internal API discovery and usage.

πŸ”§ Installation

Prerequisites

  • Docker and Docker Compose
  • Kubernetes cluster (for production deployments)
  • Helm (for Kubernetes deployments)

Quick Start with Docker Compose

# Clone the repository
git clone https://github.com/uriafranko/planet-earth.git
cd planet-earth/earth-service

# Create .env file (copy from example)
cp .env.example .env

# Start all services
docker-compose up -d

Kubernetes Deployment with Helm

# Add the Planet Earth Helm repository
helm repo add planet-earth https://your-username.github.io/planet-earth/charts

# Update repositories
helm repo update

# Install Planet Earth
helm install planet-earth planet-earth/earth-chart \
  --namespace planet-earth \
  --create-namespace \
  --values your-values.yaml

πŸš€ Usage

Uploading OpenAPI / Postman Schemas

  1. Access the Planet Earth web interface at http://localhost:3000 (or your custom domain)
  2. Navigate to the "Schemas" section
  3. Upload your OpenAPI / Postman JSON or YAML files
  4. Planet Earth will automatically process and index the schemas

Connecting to an AI IDE

  1. In your Planet Earth dashboard, go to "MCP Settings"
  2. Copy your MCP endpoint URL and API key
  3. Configure your AI IDE to use the Planet Earth MCP:
    • For Cursor: Settings > AI > Custom Tools > Add MCP Server
    • For other IDEs: Follow your IDE's documentation for MCP/custom tool integration

Using the APIs in your IDE

Once connected, your AI IDE will be able to discover and use your internal APIs during code generation and assistance. Simply describe what you're trying to do, and the AI will suggest the appropriate internal API calls.

πŸ“ Project Structure

planet-earth/
β”œβ”€β”€ earth-service/        # FastAPI backend + Celery workers
β”‚   β”œβ”€β”€ app/              # Application code
β”‚   β”œβ”€β”€ tests/            # Backend tests
β”‚   β”œβ”€β”€ Dockerfile        # Backend Docker image
β”‚   └── compose.yaml      # Docker compose configuration
β”‚
β”œβ”€β”€ earth-frontend/       # React frontend
β”‚   β”œβ”€β”€ src/              # Frontend source code
β”‚   β”œβ”€β”€ public/           # Static assets
β”‚
β”œβ”€β”€ earth-mcp/            # Scalable MCP server (Bun)
β”‚   β”œβ”€β”€ index.ts              # MCP server code
β”‚   └── Dockerfile        # MCP Docker image
β”‚
β”œβ”€β”€ earth-chart/          # Helm charts for Kubernetes deployment
β”‚   β”œβ”€β”€ templates/        # Kubernetes manifest templates
β”‚   └── values.yaml       # Default configuration values
β”‚
β”œβ”€β”€ docs/                 # Documentation
β”‚   β”œβ”€β”€ getting-started/  # Getting started guides
β”‚   └── api/              # API documentation
β”‚
β”œβ”€β”€ scripts/              # Utility scripts
β”œβ”€β”€ .github/              # GitHub workflows and templates
└── README.md             # This file

πŸ’» Development

Setting Up Development Environment

# Clone the repository
git clone https://github.com/uriafranko/planet-earth.git
cd planet-earth

# Backend development
cd earth-service
make install
pre-commit install

# Frontend development
cd ../earth-frontend
npm install

# Start development servers
cd ../earth-service
docker-compose -f compose.yaml up

Running Tests

# Backend tests
cd earth-service
pytest

# Frontend tests
cd ../earth-frontend
npm test

πŸ‘₯ Contributing

We love contributions! Please see our Contributing Guide for details on how to get started.

πŸ“œ License

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

🌐 Community


Built with ❀️ by the Planet team

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published