@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 path | Purpose |
|---|---|
@numa/config | Constants: cookie names, app metadata, date formats |
@numa/config/platforms | Platform definitions, permissions, navigation config |
@numa/config/routes | Route constants |
@numa/config/lib-routes | Route utilities (buildLocalePath, isPublicRoute, getLocaleFromPathname) |
@numa/config/icons | Icon source mappings |
@numa/config/i18n/locales | Supported locales definition |
@numa/config/ui | UI theme config |
@numa/config/ui/theme | CSS 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 names —
VAR_ACCESS_TOKEN,VAR_REFRESH_TOKEN,VAR_PERMITTED_PLATFORMS,VAR_SELECTED_LOCALE - API config —
VAR_API_BASE_URL,CROSS_APP_URLS - Page defaults —
NEXT_PUBLIC_DEFAULT_PAGE_SIZE
Platforms
Defined in packages/config/platforms.ts:
PLATFORMS—ENERGY,OPERATIONS,FINANCEPLATFORM_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
| Path | Contains |
|---|---|
types/shared.ts | Common shared types |
types/table.ts | Table component types |
types/typography.ts | Typography types |
types/icon.ts | Icon types |
types/components.ts | Component prop types |
types/energy-page.ts | Energy page layout types |
types/error-page.ts | Error page types |
types/integrations/user.ts | TMeUser, user-related types |
types/integrations/auth.ts | Auth response types |
types/integrations/energy.ts | Energy domain types |
types/integrations/iam.ts | IAM (Identity & Access) types |
Last updated on