Skip to main content

Quickstart

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');

Notes

  • getConfig(), getEnv(), getLogger(), getI18n(), getTelemetry(), and getCache() return the active singleton implementation for each feature; getCache() is backed by @quik/cache when that package is loaded, otherwise a default no-op/in-memory implementation.
  • initUpdatableFeature() registers a default feature implementation; other modules can override it later with their own implementation of the same interface.
  • FeatureFlagStore toggles runtime feature flags; FeatureFlagStore.loadFromConfig(getConfig().object("featureFlags", {})) bulk-loads flags from config.
  • QObject is the base class for framework objects — it exposes a logger getter and protected span helpers (startSpan(), endSpan(), recordSpanError(), setSpanAttribute()) for telemetry instrumentation.