A fully containerized application stack for fetching, storing, and visualizing real-time market data from HyperLiquid.
The system consists of 5 orchestrated services:
graph LR
Browser["Browser :5173"] --> FE["frontend :80"]
Browser --> API["python-api :8000"]
API --> PG["postgres :5432"]
API --> RD["redis :6379"]
API --> RF["rust-fetcher :3000"]
RF --> RD
RF --> HL["Hyperliquid WS"]
- Frontend: React + Vite SPA served by Nginx. Displays real-time market data.
- Python API: FastAPI backend. Manages user authentication and serves market data APIs.
- Rust Fetcher: High-performance service that connects to HyperLiquid WebSocket and pushes updates to Redis.
- Redis: Pub/Sub broker for real-time market updates.
- PostgreSQL: Persistent storage for users, API keys, and historical data.
- Frontend: React, TypeScript, Vite, Nginx
- Backend: Python 3.13, FastAPI, SQLAlchemy (Async), Pydantic, UV
- Data Fetching: Rust, Tokio, Tungstenite (WebSocket), Serde
- Storage: PostgreSQL 16, Redis 7
- Infrastructure: Docker, Docker Compose
Prerequisites: docker and docker compose.
-
Start the stack:
docker compose up -d
-
Create Admin User: Run the seed script inside the running API container:
docker compose exec python-api uv run python -m python_api.db.seedCreates user
admin@example.comwith passwordadmin123. -
Access the Dashboard: Open http://localhost:5173 and log in with the admin credentials.
- Rebuild specific service:
docker compose build <service_name> - View logs:
docker compose logs -f <service_name> - Stop stack:
docker compose down