nxt-ui-components
Purpose
nxt-ui-components is the shared frontend library for NXT applications. It centralizes reusable Vue UI components, composables, style primitives, and integration helpers so product apps can ship consistently without duplicating core frontend infrastructure.
Scope
- In scope:
- Shared component primitives and domain-facing UI building blocks under
shared/components. - Shared composables and directives for cross-app behaviors under
shared/composablesandshared/directives. - Shared utility and integration layers (API connection, plugins, helpers) under
shared/libraries. - Global style tokens/mixins and common styling contract under
shared/styles.
- Shared component primitives and domain-facing UI building blocks under
- Out of scope:
- End-user app routing and product-specific page workflows.
- Backend business logic owned by service repositories.
What this library does in production
- Acts as the shared frontend foundation consumed by
nxt-control-room,nxt-crm,nxt-field-ops, andnxt-topup. - Provides one import surface (
@nxt/*in local dev ornxt-sharedin packaged consumption) for UI, plugins, API-connection helpers, and formatting utilities. - Reduces cross-repo drift by keeping common widgets, styles, and integration contracts in one maintained package.
Primary consumption workflows
- Local development workflow: consumer apps clone this repo as sibling and resolve
@nxt/*to../nxt-ui-components/shared/*. - CI/production dependency workflow: consumer apps install
nxt-sharedfrom GitHub and consume the packaged shared modules. - Design/system workflow: teams validate and iterate reusable components via Storybook (
npm run storybook).
Setup and run
- Repository: github.com/nxtgrid/nxt-ui-components
- Local setup:
nvm usenpm installnpm run storybookfor interactive component development.
APIs and interfaces
- Primary exported surface lives under
shared/:shared/componentsfor reusable Vue components.shared/composablesfor cross-app runtime behaviors (for example MQTT/realtime/payment-related helpers).shared/librariesfor API-connection, plugins, and helper modules.shared/stylesfor SCSS variables/mixins.
- Key integration entrypoint:
shared/nxt-vue.jsplugin-style integration for consumer apps. - Consumer contract is path/alias-based in development and git dependency-based in packaged environments.
Integrations and dependencies
- Core stack: Vue 3, Pinia, and shared utility/tooling dependencies used across all frontend consumers.
- Integration-facing dependencies include Supabase client, Mapbox stack, MQTT client, and Flutterwave-related surfaces.
- Storybook stack is used for component development/review lifecycle.
- Notable license-sensitive dependencies are explicitly tracked in the source README (for example
mapbox-gl-style-switcherGPL-3.0 andpaho-mqttEPL-1.0).
Operations notes
- This repo is a dependency hub; breaking changes can impact multiple frontend apps simultaneously.
- Consumer-facing change impact checks should always include at least one app in local-dev alias mode and one packaged dependency path.
- Known operational sharp edge:
@vueuse/corepatch expectations requirepatches/+patch-packagehandling in consumers using affected composables.
Source of truth
- Repository: github.com/nxtgrid/nxt-ui-components
- Package overview and consumption modes:
README.md - Package metadata and scripts:
package.json - Shared export structure:
shared/ - Integration/plugin entrypoint:
shared/nxt-vue.js - Storybook workflows:
npm run storybookandnpm run build-storybook