A lightweight Integration Hub built with FastAPI + Postgres that runs connector-based jobs asynchronously, tracks executions/attempts, and supports retries.
This project is designed as a portfolio-friendly foundation for building real integrations (e.g., SpaceX APIs, webhooks, ETL triggers, internal systems) using a plugin-style connector architecture.
- Job orchestration
POST /jobscreates a job and starts attempt 1POST /jobs/{job_id}/retrycreates attempt N+1
- Execution tracking
- Each attempt is stored in
job_executions(status, timestamps, output, error)
- Each attempt is stored in
- Connector registry
- Run jobs by
connector_name(plugin pattern) - Example connector:
echo
- Run jobs by
- Filtering & pagination
GET /jobs?status=SUCCESS&connector_name=echo&limit=50&offset=0
- Python + FastAPI
- SQLAlchemy
- Postgres (Docker)
- Connector registry (plugin-style design)
spacex-integration-hub/
├── app/
│ ├── connectors/
│ │ ├── init.py
│ │ ├── base.py
│ │ ├── echo.py
│ │ └── registry.py
│ ├── db.py
│ ├── main.py
│ └── models.py
├── docker-compose.yml
├── requirements.txt
└── README.md
docker compose up -d
python -m venv .venv ..venv\Scripts\Activate.ps1 python -m pip install --upgrade pip pip install -r requirements.txt
uvicorn app.main:app --reload
Swagger UI: http://127.0.0.1:8000/docs
Health check: http://127.0.0.1:8000/health
$body = @{ connector_name = "echo"; payload = @{ msg = "hello" } } | ConvertTo-Json -Depth 5
$job = Invoke-RestMethod `
-Uri "http://127.0.0.1:8000/jobs" `
-Method POST `
-ContentType "application/json" `
-Body $body
$job
Start-Sleep 2 Invoke-RestMethod "http://127.0.0.1:8000/jobs/$($job.job_id)"
$retry = Invoke-RestMethod -Uri "http://127.0.0.1:8000/jobs/$($job.job_id)/retry" -Method POST $retry
Start-Sleep 2 Invoke-RestMethod "http://127.0.0.1:8000/jobs/$($job.job_id)"
Invoke-RestMethod "http://127.0.0.1:8000/jobs?status=SUCCESS&connector_name=echo&limit=10&offset=0"
$body = @{ connector_name = "nope"; payload = @{ msg = "should fail" } } | ConvertTo-Json -Depth 5 $job2 = Invoke-RestMethod -Uri "http://127.0.0.1:8000/jobs" -Method POST -ContentType "application/json" -Body $body
Start-Sleep 2 Invoke-RestMethod "http://127.0.0.1:8000/jobs/$($job2.job_id)"
Add a real SpaceX connector (e.g., latest launches)
Add Alembic migrations (versioned schema)
Add a proper job queue (Celery + Redis) instead of FastAPI background tasks
Add authentication / API keys
Add structured logging + observability
This project is licensed under the MIT License. See LICENSE.