Package modules#
The packages use native ES modules and publish JavaScript plus TypeScript declarations under dist/. Import from the documented package entry points rather than internal source paths such as @veap/database/src/model.
Server and client entry points#
Several packages intentionally split server and client APIs:
@veap/auth/serverexposes server-oriented auth APIs and crypto helpers.@veap/auth/clientexposes React context and hooks.@veap/intl/serverexposes request-aware locale detection, message loading, the server provider and translation getter.@veap/intl/clientexposes client React hooks and the client provider.@veap/plugins/serverexposes server actions, registry, router and server-rendered widgets.@veap/plugins/clientexposes client widget/extension components.@veap/plugins/routerexposes route-tree utilities.@veap/database/migrationsand/relationsexpose specialized database modules.
Use server entry points only in server code. Keep @veap/database, filesystem storage and secret-bearing auth/mail services out of Client Components.
Global state#
The inspected kernel container and several services are attached to globalThis to survive repeated module evaluation/HMR. This is convenient in a long-lived Node.js process, but it is not the same as request-scoped dependency injection. Do not put per-user state into singleton services or assume separate requests have separate containers.
Configuration patterns#
ApplicationBuilder.use()registers a provider class, provider instance, or factory callback.register()should register bindings;boot()runs after all providers have registered.- Providers may initialize external resources in
boot()and should release persistent resources inshutdown(). - A package may augment the
ApplicationBuilderinterface with convenience methods such aswithMail(),withSettings()orwithPlugins()when its composition module is imported. The base kernel by itself does not define every package-specific method.
Version discipline#
The package ecosystem is pre-1.0 in the inspected source snapshot. Pin compatible versions, use a lockfile, and verify type declarations before relying on any API outside the examples in this documentation.