alepha@docs:~/docs/packages/alepha$
cat core.md | pretty
2 min read
Last commit:

#Alepha - Core

Easy-to-use modern TypeScript framework for building many kind of applications.

#Installation

Part of the alepha package. Import from alepha.

npm install alepha

#Overview

Core container of the Alepha framework.

It is responsible for managing the lifecycle of services, handling dependency injection, and providing a unified interface for the application.

#API Reference

#Primitives

  • $atom — Define an atom for state management.
  • $computed — Define a derived, read-only value computed from one or more atoms
  • $env — Get typed values from environment variables.
  • $hook — Registers a new hook.
  • $inject — Get the instance of the specified type from the context.
  • $memoize — Lightweight in-process memoization middleware.
  • $mode — Activate a selective bootstrap mode.
  • $module — Wrap Services and Primitives into a Module.
  • $pipeline — Creates a pipeline primitive that composes middleware with a handler.
  • $scope — Middleware that wraps the handler in an ALS (AsyncLocalStorage) context.
  • $store — Reads a value out of the application store from a class property.

#Providers

  • CodecManager — CodecManager manages multiple codec formats and provides a unified interface
  • Json — Mimics the JSON global object with stringify and parse methods.
  • KeylessJsonSchemaCodec — KeylessJsonSchemaCodec provides schema-driven JSON encoding without keys.
  • SchemaValidator — Validates + coerces a value against a zod schema.
  • TypeProvider — Static config knobs, still read by I18nProvider for validation-error