The three subsystems
Catalog
Read-only inventory of GPUs available right now. Aggregates listings from
every upstream provider into one queryable surface.
Rental orchestrator
Reserves and launches pods on behalf of users. Talks to each upstream
provider’s native API; we hide the differences.
Billing engine
Prepaid wallet, Stripe integration, per-second metering, ledger. The only
component that handles money.
Request flow
The dashboard never talks to providers directly. Every transaction passes through our API server so the wallet stays consistent and the user identity is attested.Persistence
| Concern | Store | Why |
|---|---|---|
| Users, sessions, OAuth state | PostgreSQL | Strong consistency needed for auth |
| SSH keys | PostgreSQL | Per-user, indexed, mutable |
| Rentals + metering | PostgreSQL | Append-only ledger, audited |
| Wallet balance | PostgreSQL with row-level locks | Money — no eventual consistency |
| Catalog cache | In-memory + 30s TTL | Read-heavy, tolerates staleness |
| Sessions | HttpOnly cookies | XSS-resistant, no localStorage tokens |
SELECT … FOR UPDATE on every debit so concurrent
metering ticks from multiple pods can’t race past zero. See
Charging strategies (RFC-07)
for the full design.
What’s open-source
The marketplace frontend (packages/client) and the server skeleton
(packages/server) live in the monorepo.
Provider adapters and the production billing implementation are proprietary —
they’re what we sell.
Local development
A mock-fetch shim ships in the client (packages/client/src/shared/mock/) and
serves the entire /v1/* surface from in-memory fixtures. Set
VITE_MOCK_MODE=1 and you can iterate on UI without a backend running. See
CLI / local dev for the full setup.
Production topology
- API: Node.js on Render/Fly, behind Cloudflare. Stateless — scale by adding instances.
- DB: Managed Postgres with point-in-time recovery.
- Object storage: S3-compatible for snapshots and logs.
- CDN: Cloudflare for the marketing landing + docs site you’re reading now.
- Workers: BullMQ on Redis for the per-second metering tick.