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
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
Theff-effect package provides Effect.ts wrappers for popular libraries.
Peer Dependencies
Depending on which features you use, install the corresponding peer dependencies:- AI SDK
- Drizzle ORM
- Inngest
- oRPC
For
ff-effect/for/ai wrappers:Installing ff-ai
Theff-ai package provides AI conversation management and message persistence.
Drizzle Provider
To use the Drizzle message storage provider:The Drizzle provider for ff-ai is exported from
ff-ai/providers/drizzle and requires Drizzle ORM and a PostgreSQL client.Installing ff-serv
Theff-serv package provides HTTP server utilities, logging, and caching.
Optional Dependencies
- oRPC Integration
- Redis Caching
- Bun Redis
For oRPC HTTP handlers:
Complete Installation
To install all three packages with their core dependencies:TypeScript Configuration
Ensure yourtsconfig.json has strict mode enabled for the best type safety:
tsconfig.json
Verify Installation
Create a simple test file to verify your installation:test.ts