# Alepha - Core

A full-stack TypeScript framework. One schema, everywhere.

## Installation

Part of the `alepha` package. Import from `alepha`.

```bash
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`](https://latest.alepha.dev/docs/reference-primitives-$atom.md) - Define an atom for state management.
- [`$computed`](https://latest.alepha.dev/docs/reference-primitives-$computed.md) - Define a derived, read-only value computed from one or more atoms
- [`$env`](https://latest.alepha.dev/docs/reference-primitives-$env.md) - Get typed values from environment variables.
- [`$error`](https://latest.alepha.dev/docs/reference-primitives-$error.md) - Declares an error: a name, and a schema for the data it carries.
- [`$hook`](https://latest.alepha.dev/docs/reference-primitives-$hook.md) - Registers a new hook.
- [`$inject`](https://latest.alepha.dev/docs/reference-primitives-$inject.md) - Get the instance of the specified type from the context.
- [`$mode`](https://latest.alepha.dev/docs/reference-primitives-$mode.md) - Activate a selective bootstrap mode.
- [`$module`](https://latest.alepha.dev/docs/reference-primitives-$module.md) - Wrap Services and Primitives into a Module.
- [`$pipeline`](https://latest.alepha.dev/docs/reference-primitives-$pipeline.md) - Creates a pipeline primitive that composes middleware with a handler.
- [`$scope`](https://latest.alepha.dev/docs/reference-primitives-$scope.md) - Middleware that wraps the handler in an ALS (AsyncLocalStorage) context.
- [`$store`](https://latest.alepha.dev/docs/reference-primitives-$store.md) - Reads a value out of the application store from a class property.

### Providers

- [`CodecManager`](https://latest.alepha.dev/docs/reference-providers-codecmanager.md) - CodecManager manages multiple codec formats and provides a unified interface
- [`Json`](https://latest.alepha.dev/docs/reference-providers-json.md) - Mimics the JSON global object with stringify and parse methods.
- [`ReadRecorder`](https://latest.alepha.dev/docs/reference-providers-readrecorder.md) - Records, for one request, the reads that make a page personal (#E78).
- [`SchemaValidator`](https://latest.alepha.dev/docs/reference-providers-schemavalidator.md) - Validates + coerces a value against a zod schema.
