Skip to content

Tech Stack

LayerTechnology
RuntimeCloudflare Workers (Edge computing)
StateDurable Objects with SQLite
LanguageTypeScript (strict mode)
Routingitty-router
TestingVitest
DeploymentWrangler
Data SourceHyperliquid API + WebSocket

Project Structure

Entry Points & Routing

  • apps/backend/src/index.ts — Main worker export
  • apps/backend/src/endpoints/_router.ts — itty-router setup
  • apps/backend/src/endpoints/*.ts — API endpoints (price, allMids, clearinghouseState, healthcheck, portfolio)

Utilities & Constants

  • apps/backend/src/utils/ — BigNumber, binary shard encoding, compression library
  • apps/backend/src/constants/ — Asset definitions (26 pairs), fee tiers, geo-fallbacks

Testing

  • apps/backend/test/durables/ — DO integration tests (630+ tests)
  • apps/backend/test/utils/ — Utility tests
  • apps/web/e2e/ — Web API tests (Vitest + Playwright)

Auto-Generated Types

  • packages/ace-trader/ — Auto-generated type exports — do not edit manually

See Type Exports for details.