# Frontend API Integration ## Client `lib/accounting-api.ts`: - Base URL from `NEXT_PUBLIC_ACCOUNTING_API_URL` - Always sets `Content-Type`, `X-Tenant-ID`, Bearer token - Throws `AccountingApiError` with backend `error.code` / `error.message` - No mock adapters, no fake fixtures ## Env ``` NEXT_PUBLIC_ACCOUNTING_API_URL=http://localhost:8002 ``` Also wired in `next.config.mjs`, `.env.example`, and `docker-compose.yml`. ## Query keys Convention: `["accounting", tenantId, resource, ...ids]`