Price services for Flash. This repository contains two Node 20 workspaces:
realtime: serves near real-time BTC price data over gRPC.history: serves historical BTC price data over gRPC.
- Node.js 20
- Yarn 1.x
- Docker, for container builds
Install dependencies from the repository root:
yarn install --frozen-lockfileRun workspace commands through the root scripts:
yarn realtime build
yarn realtime tsc-check
yarn realtime eslint-check
yarn realtime ci:test:unit
yarn history build
yarn history tsc-check
yarn history eslint-check
yarn history ci:test:unitThe Makefile wraps the same checks:
make realtime-check-code
make realtime-unit-in-ci
make history-check-code
make history-unit-in-ciEach service loads default.yaml from its workspace and then merges an optional
custom YAML file.
By default, custom config is read from:
/var/yaml/custom.yaml
Override that path with:
YAML_CONFIG_PATH=/path/to/custom.yamlRealtime Ibex exchange credentials use the current ibex-client credential
shape:
IBEX_CLIENT_ID=...
IBEX_CLIENT_SECRET=...
IBEX_ENVIRONMENT=production # or sandboxFor deployment compatibility, the realtime service still falls back to the old env names when the new ones are not present:
IBEX_EMAIL=...
IBEX_PASSWORD=...
IBEX_URL=...Use the new names for new deployments.
Build images from the repository root:
docker build -f ./realtime/Dockerfile -t flash-price-realtime .
docker build -f ./history/Dockerfile -t flash-price-history .Docker builds use yarn install --frozen-lockfile so dependency changes require
an updated yarn.lock.
GitHub Actions run on pull requests and pushes to main:
- TypeScript, ESLint, build, and unit tests for each workspace.
- CodeQL scanning.
- Dependency audit for production dependencies at high severity and above.
- Secret scanning with Gitleaks.
- Build-only Docker checks for both service images.