Ern Internal Docs
Apps

tools-api

Internal API and background jobs service

What it does

tools-api is the internal Fastify backend that handles auth, integrations, and asynchronous task workflows.

Run locally

bun run dev:tools-api

Runs on http://localhost:5001.

Key environment variables

Source of truth: apps/tools-api/.env.example

  • DATABASE_URL: PostgreSQL connection string.
  • BETTER_AUTH_SECRET: Better Auth signing secret.
  • BETTER_AUTH_URL: Public base URL used by auth callbacks.
  • TOOLS_API_BOT_SECRET: Shared secret for trusted bot requests.
  • OPENROUTER_API_KEY: AI provider key for routed model calls.
  • TRIGGER_SECRET_KEY: Trigger.dev key for task orchestration.

Deploy and ownership

  • Deploy target: Railway.
  • Operational note: translation and revalidation flows depend on matching MARKETING_REVALIDATION_URL and REVALIDATION_SECRET.
  • Team: Ern engineering.
  • Primary: Ern engineering on-call.

On this page