# API Client Package AI Agent Instructions (`packages/api-client`) > **Package:** `@keluargamart/api-client` > **Role:** Standardized Axios HTTP Wrapper & Normalization --- ## 1. Responsibilities - Wraps Axios client creation with default timeout, request interceptor (Bearer token injection), and response error normalization. - Exports `createApiClient` and `ApiError` class (`status`, `code`, `message`, `details`). - Ensures all frontend clients receive uniform error envelopes matching backend Go responses. --- ## 2. Modification Rules 1. Do not introduce breaking changes to `ApiError` property names. 2. Must run in both Browser (SPA) and Node.js (SSR / test runner). 3. Run tests: `pnpm --filter @keluargamart/api-client test`.