Repository layout
server/FastAPI backendclient/React UI (Vite)sdk/Python SDK and examplesdocker-compose.ymllocal Postgres, MinIO, RedisARCHITECTURE.mdsystem architecture
- Docker and Docker Compose
- Python 3.11+
- Node.js 18+ and pnpm
From repo root
docker compose up -dServices
| Service | Local port | Purpose |
|---|---|---|
| Postgres | 5432 | Run and step metadata |
| MinIO S3 API | 9000 | Candidate sets and artifact blobs |
| MinIO Console | 9001 | Admin UI |
| Redis | 6379 | Ingest queue and query cache |
From repo root
cd server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --port 8000 --reloadBackend URLs
| URL | Purpose |
|---|---|
http://localhost:8000/health |
Health check |
http://localhost:8000/docs |
OpenAPI and Swagger UI |
From repo root
cd client
pnpm install
pnpm dev --port 3000UI URL
http://localhost:3000
UI configuration
Set the backend endpoint for the UI using Vite env
export VITE_XRAY_API_ENDPOINT="http://localhost:8000"The UI will show no runs until the SDK sends events.
From repo root
cd sdk
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export XRAY_ENDPOINT="http://localhost:8000"
python examples/minimal_api_demo.pyOther examples
python examples/ecommerce_search.pypython examples/rag_document_retrieval.pypython examples/recommendation_system.pypython examples/content_moderation.py
SDK configuration
| Config | Default | Use |
|---|---|---|
XRAY_ENDPOINT |
http://localhost:8000 |
Backend base URL |
XRAY_DISABLED |
false |
Disable tracing |
XRAY_SAMPLE_RATE |
1.0 |
Sample runs to control cost |
XRAY_BATCH_SIZE |
10 |
Flush batch size |
XRAY_FLUSH_INTERVAL |
1.0 |
Flush cadence seconds |
XRAY_TOP_K |
10 |
Top kept and top dropped capture size |
-
Backend shows zero runs
- Confirm
XRAY_ENDPOINTis set for the SDK - Confirm the backend is running on port 8000
- Confirm Redis, Postgres, and MinIO are healthy via
docker ps
- Confirm
-
MinIO bucket issues
- Open MinIO console at
http://localhost:9001 - Confirm bucket
xray-blobsexists
- Open MinIO console at
-
UI cannot reach backend
- Confirm
VITE_XRAY_API_ENDPOINTis set correctly before startingpnpm dev
- Confirm