Skip to Content
Configuration

@numa/config

Central configuration hub for the entire monorepo. Contains constants, types, platform definitions, route utilities, i18n locale config, UI theme values, and shared styles.

Imports

import { VAR_ACCESS_TOKEN } from "@numa/config"; import { PLATFORMS } from "@numa/config/platforms"; import { buildLocalePath } from "@numa/config/lib-routes"; import type { TMeUser } from "@numa/config/types/integrations/user";

What’s inside

Export pathPurpose
@numa/configConstants: cookie names, app metadata, date formats
@numa/config/platformsPlatform definitions, permissions, navigation config
@numa/config/routesRoute constants
@numa/config/lib-routesRoute utilities (buildLocalePath, isPublicRoute, getLocaleFromPathname)
@numa/config/iconsIcon source mappings
@numa/config/i18n/localesSupported locales definition
@numa/config/uiUI theme config
@numa/config/ui/themeCSS variable generation for the design system
@numa/config/styles/*Color palette, sizes, patterns
@numa/config/types/*All shared TypeScript types
@numa/config/types/integrations/*Domain-specific types (user, auth, energy, iam)

Constants

Defined in packages/config/index.ts:

  • Cookie namesVAR_ACCESS_TOKEN, VAR_REFRESH_TOKEN, VAR_PERMITTED_PLATFORMS, VAR_SELECTED_LOCALE
  • API configVAR_API_BASE_URL, CROSS_APP_URLS
  • Page defaultsNEXT_PUBLIC_DEFAULT_PAGE_SIZE

Platforms

Defined in packages/config/platforms.ts:

  • PLATFORMSENERGY, OPERATIONS, FINANCE
  • PLATFORM_APP_PERMISSIONS — exact permission strings (ENERGY_APP, OPERATIONS_APP, FINANCE_APP)
  • PLATFORM_ROUTE_PREFIX — URL path segments (/energy, /operations, /finance)
  • ENERGY_NAV — sidebar navigation items for the Energy app

Types

Types follow a T prefix convention:

type TMeUser = { id: string; name: string; email: string; permissions: string[]; roles: string[]; ... }; type TLocale = "en" | "rw"; type TPlatform = "ENERGY" | "OPERATIONS" | "FINANCE"; type TErrorPageProps = { ... };

Type locations

PathContains
types/shared.tsCommon shared types
types/table.tsTable component types
types/typography.tsTypography types
types/icon.tsIcon types
types/components.tsComponent prop types
types/energy-page.tsEnergy page layout types
types/error-page.tsError page types
types/integrations/user.tsTMeUser, user-related types
types/integrations/auth.tsAuth response types
types/integrations/energy.tsEnergy domain types
types/integrations/iam.tsIAM (Identity & Access) types
Last updated on