toolzer Internal Docs
API

apps/api

The Node/Hono service at api.toolzerhub.com. It does three unrelated jobs behind one process:

  • A metered public data API (/v1, /v2) — public social, e-commerce, and ad-library data, scraped or proxied from third parties and normalized into a stable shape.
  • Toolzer Hub's own account dashboard backend (/hub) — API keys, credits, usage, billing.
  • Vantage, a TikTok Shop rank-tracking product (/app) — a separate multi-tenant application that happens to live in the same deployment.

Staff tooling (/admin) and internal observatory endpoints (/internal) round out the surface. The Apify Store GET views are public catalogue data; its POST controls require a staff session. See apps/api/src/routes/index.ts for the exact mounting.

There is no /docs route on this service. The public API reference is docs.toolzerhub.com, a separate Fumadocs site (apps/web/toolzerhub-docs) built from this service's /openapi.json.

Router surfaces

MountAuthWho calls itNotes
/v1x-api-key (apiKeyAuth)External customers, published Apify ActorsPublic data API — one router per platform (/v1/tiktok, /v1/walmart, /v1/ad-library, ...). Metered.
/v2x-api-key (apiKeyAuth)External customersNewer, fully external (RapidAPI-sourced) surface. Currently just Instagram. Metered.
/authnone (issues sessions)Toolzer Hub and Vantage browser clientsSignup/login/logout/invites, shared by both dashboards so neither authenticates through a route named after the other.
/hubsession (sessionAuth + requireCapability("api"))Toolzer Hub's own dashboard UIAPI key management, credits, usage, billing.
/appsession (sessionAuth, requireCapability("rankings") on most routes)Vantage dashboard UITikTok Shop keyword tracking, scans, creator/ad intel.
/adminstaff session (adminAuth, applied inside the router)Internal staff consoleCross-tenant: every workspace, every user, manual credit grants, job health.
/internalmixedInternal network onlyApify Store GET views are public catalogue data; sweep and developer-watch POST controls require adminAuth.

Plus /health, /ready, /openapi.json, and /llm.txt (unauthenticated, outside all of the above). /health is process liveness; /ready gates traffic on Postgres, worker, and browser minter, and attests their built commit against the API while reporting optional ClickHouse degradation. See infrastructure.md for probe and rollout semantics.

In this folder

  • architecture.md — module map, the app/worker split, and how a request travels through middleware to a response.
  • auth-and-credits.md — API keys, sessions, the workspace/subscription/allowance model, and the credit reservation lifecycle.
  • env.md — every environment variable this service reads, with defaults and which are conditionally required.
  • observability.md — logging, metrics, tracing, and where the operational runbooks live.

On this page