Files
opsxsql/frontend/src/features

Feature Domains

features/* stores product-domain code. Page files should stay thin: routing, page-level state, and composition only.

Recommended structure:

  • features/<domain>/components: domain UI components
  • features/<domain>/hooks: domain data/state hooks
  • features/<domain>/types.ts: domain types
  • features/<domain>/utils.ts: domain-only helpers

Current domains:

  • datasource: instance inventory and MySQL/PostgreSQL engine surfaces
  • redis: Redis value formatting, Hash/ZSet viewers, Redis command helpers
  • mongo: MongoDB database/collection/document surfaces
  • query: self-service query workspace
  • ticket: change ticket lifecycle
  • governance: workflows, audit rules, approval policy
  • rbac: users, roles, permissions, permission groups, LDAP sync
  • system: settings, notifications, announcements, audit logs

Migration rule:

  • If a page grows past roughly 700 lines, extract domain components or hooks before adding more behavior.
  • If logic is reused by two domains, move it to shared/* instead of another feature domain.
  • API clients stay under api/<domain>; features consume APIs but do not define transport details.