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:
| Service | URL |
|---|---|
| API | http://localhost:8000 |
| Frontend | http://localhost:3000 |
| Admin | http://localhost:8000/admin/ |
| API Docs | http://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.