@figentra scope on the npm registry. They are designed to be installed together inside a monorepo workspace — each package is independently versioned but built to work as a cohesive suite. This guide covers system requirements, workspace configuration, installing the core packages, and verifying that everything compiles correctly.
System Requirements
Make sure your environment satisfies the following before installing any@figentra/* packages:
Figentra packages are authored in TypeScript and ship both CommonJS and ESM builds. You do not need any extra bundler plugins to consume them — import them directly in
.ts source files.Workspace Setup
Figentra expects a monorepo structure where packages share a singlenode_modules hoist at the workspace root. The examples below use pnpm workspaces, but the same principle applies to Yarn workspaces and Turborepo.
Create a pnpm-workspace.yaml file at the root of your repository:
pnpm-workspace.yaml
package.json if you have not done so already:
Installing Packages
Install one or more@figentra/* packages using your preferred package manager. Add the -w flag (pnpm) or -W flag (npm/Yarn) to hoist the packages to the workspace root so every app and service can import them without repeating the install.
Keep all
@figentra/* packages on the same version across your workspace. Running mismatched versions causes subtle type incompatibilities that are difficult to diagnose. Use a tool like syncpack or a Turborepo generator to enforce version consistency in CI.TypeScript Configuration
Figentra packages require TypeScript 5+ withstrict mode enabled. The recommended approach is to define a shared base config at the repository root and extend it in each package.
Create tsconfig.base.json at the workspace root:
tsconfig.base.json
packages/core/tsconfig.json
- Turborepo
- pnpm workspaces only
If you are using Turborepo, add a
build task to turbo.json so TypeScript compilation is cached and only re-runs when source files change:turbo.json
Verifying the Install
After installing the packages and configuring TypeScript, create a small smoke-test file to confirm that imports resolve and the compiler is satisfied:src/verify.ts
0 and no output, the installation is complete and your workspace is ready.
Your workspace is now fully configured to use
@figentra/* packages. Continue with the guides below:
Quickstart
Follow a step-by-step walkthrough to define your first contract and handle typed errors in under five minutes.
Packages Overview
Explore every
@figentra/* package in depth, including full API references and usage patterns.