> ## Documentation Index
> Fetch the complete documentation index at: https://docs.figentra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Figentra Packages: Typed Building Blocks for Monorepos

> Explore all @figentra/* packages and their roles in a monorepo project — from shared type contracts to structured logging and input validation.

Figentra ships a curated set of focused packages that work together inside a TypeScript monorepo. Each package handles one well-defined concern — types, errors, configuration, logging, and more — so you can compose exactly the functionality your services need without pulling in unnecessary dependencies.

## Package Catalog

<CardGroup cols={2}>
  <Card title="@figentra/contracts" icon="file-contract" href="/packages/contracts">
    Shared TypeScript interfaces and type contracts used across every service in your monorepo.
  </Card>

  <Card title="@figentra/health" icon="heart-pulse" href="/packages/health">
    Health check utilities for HTTP services, including readiness and liveness probe handlers.
  </Card>

  <Card title="@figentra/container" icon="box" href="/packages/container">
    A lightweight dependency injection container for wiring up services without heavy frameworks.
  </Card>

  <Card title="@figentra/testing" icon="flask" href="/packages/testing">
    Test utilities, reusable fixtures, and setup helpers that make writing integration tests faster.
  </Card>

  <Card title="@figentra/error" icon="triangle-exclamation" href="/packages/error">
    Standardized, typed error classes and handling utilities for consistent error propagation.
  </Card>

  <Card title="@figentra/config" icon="sliders" href="/packages/config">
    Environment variable parsing and validation so misconfigured services fail fast at startup.
  </Card>

  <Card title="@figentra/logger" icon="scroll" href="/packages/logger">
    Structured JSON logging with configurable log levels and context-aware child loggers.
  </Card>

  <Card title="@figentra/validation" icon="shield-check" href="/packages/validation">
    Input validation backed by typed schemas, returning structured error details on failure.
  </Card>
</CardGroup>

## Package Stability

Use this table to understand which packages are production-ready and which are still evolving.

| Package                | Stability | Description            |
| ---------------------- | --------- | ---------------------- |
| `@figentra/contracts`  | Stable    | Shared type contracts  |
| `@figentra/error`      | Stable    | Typed error classes    |
| `@figentra/health`     | Stable    | Health check endpoints |
| `@figentra/container`  | Stable    | DI container           |
| `@figentra/testing`    | Stable    | Test utilities         |
| `@figentra/config`     | Beta      | Config validation      |
| `@figentra/logger`     | Beta      | Structured logging     |
| `@figentra/validation` | Beta      | Input validation       |

**Stable** packages follow strict semver and will not introduce breaking changes in a minor or patch release. **Beta** packages may still have API surface changes in minor releases — pin these versions tightly until they graduate.

## Installation

Install the packages your service needs by adding them to its `package.json`. The example below installs the three most commonly used packages together.

<CodeGroup>
  ```bash npm theme={null}
  npm install @figentra/contracts @figentra/error @figentra/health
  ```

  ```bash pnpm theme={null}
  pnpm add @figentra/contracts @figentra/error @figentra/health
  ```

  ```bash yarn theme={null}
  yarn add @figentra/contracts @figentra/error @figentra/health
  ```
</CodeGroup>

<Note>
  Keep all `@figentra/*` packages at the **same version** across your monorepo. Mismatched versions can cause subtle type incompatibilities and runtime inconsistencies, particularly when shared contracts are involved. Use your package manager's workspace features or a tool like Syncpack to enforce version alignment.
</Note>
