Skip to main content

Overview

FF is distributed as three separate npm packages that you can install independently based on your needs:
  • ff-effect: Effect.ts wrappers for AI SDK, Drizzle ORM, Inngest, and oRPC
  • ff-ai: AI conversation management and message persistence
  • ff-serv: HTTP server utilities, logging, and caching
All packages require Effect.ts as a peer dependency.

Prerequisites

Before installing FF, ensure you have:
  • Node.js 18+ or Bun 1.0+ (FF is built with Bun but works with Node.js)
  • TypeScript 5.0+ for full type safety
  • Effect.ts 3.19+ as the foundational library

Installing ff-effect

The ff-effect package provides Effect.ts wrappers for popular libraries.
npm install ff-effect effect

Peer Dependencies

Depending on which features you use, install the corresponding peer dependencies:
For ff-effect/for/ai wrappers:
npm install ai

Installing ff-ai

The ff-ai package provides AI conversation management and message persistence.
npm install ff-ai effect @effect/platform ai valibot

Drizzle Provider

To use the Drizzle message storage provider:
npm install drizzle-orm postgres
The Drizzle provider for ff-ai is exported from ff-ai/providers/drizzle and requires Drizzle ORM and a PostgreSQL client.

Installing ff-serv

The ff-serv package provides HTTP server utilities, logging, and caching.
npm install ff-serv effect @effect/opentelemetry get-port

Optional Dependencies

For oRPC HTTP handlers:
npm install @orpc/server

Complete Installation

To install all three packages with their core dependencies:
npm install ff-effect ff-ai ff-serv effect @effect/platform @effect/opentelemetry ai drizzle-orm valibot get-port

TypeScript Configuration

Ensure your tsconfig.json has strict mode enabled for the best type safety:
tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "moduleResolution": "bundler",
    "module": "ESNext",
    "target": "ES2022",
    "lib": ["ES2022"],
    "skipLibCheck": true,
    "esModuleInterop": true
  }
}

Verify Installation

Create a simple test file to verify your installation:
test.ts
import { Effect } from 'effect';
import { runPromiseUnwrapped } from 'ff-effect';

const program = Effect.gen(function* () {
  yield* Effect.log('FF is installed correctly!');
  return 'Success';
});

await runPromiseUnwrapped(program);
Run with:
npx tsx test.ts
You should see the log message and no errors.

Next Steps

Now that you have FF installed, check out the quickstart guide to build your first application, or explore the individual package documentation: