Skip to main content

Quik Framework :: Core

Provides core framework utilities, configuration management, and default features such as logging and internationalization. The module exports helpers and registers default implementations used across the framework.

Installation

npm install @quik/core

Usage

Access configuration and shared services:

import { getConfig, getI18n, getLogger } from '@quik/core';

getConfig().set('app.name', 'Quik App');
const name = getConfig().string('app.name');

getLogger().info(`Starting ${ name }`);
getI18n().translate('app.welcome');

API Highlights

  • getConfig() returns the configuration store.
  • getEnv() reads environment variables with helpers.
  • getLogger() and getI18n() access default logger/i18n providers.
  • getTelemetry() accesses the active telemetry provider.
  • getCache() accesses the active cache provider (backed by @quik/cache when loaded).
  • initUpdatableFeature() registers default feature implementations.
  • FeatureFlagStore toggles runtime feature flags.
  • FeatureFlagStore.loadFromConfig(flags) bulk-loads flags from a plain object (call with getConfig().object("featureFlags", {})).
  • QObject base class exposes protected span helpers: startSpan(), endSpan(), recordSpanError(), setSpanAttribute().
  • QHTTPStatus.TOO_MANY_REQUESTS (429) is available for rate-limit responses.

Testing & Coverage

See the root instructions for details on running pnpm run test:coverage and accessing coverage artifacts.

API Reference

Generated API documentation is available in the core API section.