Ingests Stellar network activity (via RPC/Horizon), computes corridor and anchor reliability metrics, and serves them over REST, GraphQL, and WebSockets — with caching, rate limiting, alerting, and full observability built in.
- Rust (stable)
- PostgreSQL (production) or SQLite (development, default)
- Redis (caching, rate limiting)
- Vault for secrets in production (see
docs/SECRETS_MANAGEMENT.mdin the core repo)
-
Copy the environment template and fill in required values:
cp .env.example .env
At minimum, set
JWT_SECRET,ENCRYPTION_KEY, andSEP10_SERVER_PUBLIC_KEY— the server refuses to start with placeholder values. -
Run database migrations:
./scripts/migrate.sh
-
Start the server:
cargo run
The server listens on
SERVER_HOST:SERVER_PORT(default127.0.0.1:8080).
docker build -t stellar-insights-backend .
docker run --env-file .env -p 8080:8080 stellar-insights-backendThe container entrypoint (entrypoint.sh) runs pending migrations before starting the server.
| Path | Contents |
|---|---|
src/api/ |
REST endpoint handlers (anchors, corridors, alerts, auth, achievements, ...) |
src/graphql/ |
GraphQL schema and resolvers |
src/rpc/ |
Stellar RPC/Horizon client, rate limiting, circuit breaker |
src/ingestion/ |
Network data ingestion pipelines |
src/auth/, auth_middleware.rs |
SEP-10 Stellar auth and JWT session handling |
src/cache/ |
Redis-backed caching and invalidation |
src/jobs/ |
Background jobs (corridor/anchor refresh, price feed, cache cleanup) |
src/observability/ |
OpenTelemetry tracing, health checks |
src/logging/ |
Structured (JSON) logging, ELK/Logstash forwarding |
src/webhooks/, src/telegram/ |
Outbound alert delivery |
src/vault/ |
Vault-backed secrets integration |
migrations/ |
SQL migrations (32 to date) |
scripts/ |
Migration, backup, and smoke-test scripts |
cargo testIntegration/load tests live in tests/ and load-tests/.
- Logs — set
LOGSTASH_ENABLED=trueto forward structured logs to an ELK stack (seedocker-compose.elk.ymlin the core repo) - Traces — set
OTEL_ENABLED=trueto export traces to Jaeger (docker-compose.jaeger.yml) - API docs — OpenAPI schema generated via
utoipa(src/openapi.rs)