Config, types & tooling
config/ · typescript/ · util/ · lib/ · json/ · build config
| Area | Files | Notes |
|---|---|---|
| Config & constants | config/constants.ts, config/filterOptions.ts | Env-derived app constants (cookie names, token prefix) + KPI tooltip copy; static dropdown option lists (payment status/gateway, order/account type, payout status…). |
| Shared TS types | typescript/interface/*, typescript/types/* | common.interface.ts — HttpStatusCode enum, BaseApiResponse; icons.interface.ts — the icon-component contract; common.type.ts — userData shape. |
| Formatting & date/time | lib/dateTime.tsx, lib/regex/index.ts | Centralized Intl.DateTimeFormat-based formatting layer with a DateTimeContext/useDateTimeFormatter() hook, used throughout the date pickers. |
| Small utilities | util/brokerMapper.ts, util/maskEmail.ts | Broker display-label resolution; email masking for display. |
| Static JSON | json/assets, json/events, json/messages, json/mock | Asset path map, event-name registry, validation copy, and a large set of mock KPI datasets still used to stub several unwired panels. |
| Build/lint/test | next.config.ts, vitest.config.ts, eslint.config.mjs, docker-compose.yaml | Next config sets a strict security-header set (CSP, HSTS, X-Frame-Options) on every route and transpiles @mui/x-date-pickers for Turbopack; Vitest runs in jsdom with the same @/ path alias as the app. |