Skip to main content

Local Development

Run SpatialFlow locally using Docker Compose for development and testing.

Prerequisites

  • Docker and Docker Compose
  • Git

Quick Start

# Clone and start all services
git clone <repository-url>
cd spatialflow.io
docker compose --profile dev up

Services will be available at:

ServiceURL
APIhttp://localhost:8000
Frontendhttp://localhost:3000
Adminhttp://localhost:8000/admin/
API Docshttp://localhost:8000/api/v1/docs
Flower (Celery)http://localhost:5555
Mailpit (Email)http://localhost:8025

Testing Against the Local API

Use cURL or any HTTP client to test against your local instance:

# Create a geofence
curl -X POST http://localhost:8000/api/v1/geofences/ \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Test Zone", "geometry": {...}}'

See the Authentication guide for details on API keys and JWT tokens.

OpenAPI Specification

The OpenAPI spec is available from both your local instance and the production API:

# Local
curl http://localhost:8000/api/v1/openapi.json

# Production
curl https://api.spatialflow.io/api/v1/openapi.json

Import the spec into tools like Postman, Insomnia, or use code generators like openapi-generator to create typed clients for your language of choice.