Effect

A TypeScript library and ecosystem for building robust, type-safe, concurrent applications with a full functional effect system

Library
npm
v4.0.6
17,370 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
92 /100 Excellent
Development Activity 100
Maintenance 100
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 90
Code Quality 88
Innovation 90
Learning Curve 55

Effect is the core package of a large TypeScript ecosystem that models side effects, errors, and dependencies as typed values rather than exceptions or ad-hoc promises. An Effect<A, E, R> describes a computation that can succeed with A, fail with a typed error E, and requires a set of dependencies R, letting the compiler track error and dependency information the same way it tracks return types. Around this core, Effect provides structured concurrency primitives (fibers, Fiber, Deferred, structured cancellation), a Schema module for runtime validation and encoding/decoding, Layer-based dependency injection, retry/scheduling policies, and built-in OpenTelemetry-compatible tracing/metrics.

The wider monorepo extends the core package with @effect/platform (cross-runtime Node/Bun/browser APIs), @effect/sql and its per-driver implementations, @effect/cli, @effect/rpc, @effect/cluster for distributed computing, and AI-provider integrations, all built against the same Effect data type so cross-cutting concerns like retries, tracing, and cancellation compose uniformly across HTTP calls, database queries, and AI requests. This project is the same organization Anthropic and other companies reference in production TypeScript backends for its typed-error and structured-concurrency guarantees.

What You Get

  • The Effect<A, E, R> type for describing computations with typed success, typed failure, and typed dependency requirements
  • Structured concurrency primitives (fibers, Deferred, Fiber, scoped resource management) with safe cancellation semantics
  • A Schema module for runtime data validation, parsing, and encoding/decoding with static type inference
  • Layer-based dependency injection for composing and testing services without a separate DI framework
  • Built-in retry/scheduling policies and OpenTelemetry-compatible tracing and metrics
  • A wider package family (@effect/platform, @effect/sql, @effect/cli, @effect/rpc, @effect/cluster, AI provider modules) built on the same core primitives

Common Use Cases

  • Building backend services that need typed, exhaustively-handled error paths instead of thrown exceptions
  • Composing concurrent workflows (parallel requests, races, timeouts) with guaranteed resource cleanup
  • Validating and decoding external data (API payloads, config, database rows) via Schema
  • Wiring dependency injection for testable services (databases, HTTP clients, loggers) via Layer

Under The Hood

Architecture - The core effect package (packages/effect/src) is organized as one module per concept — Effect.ts (the ~14,800-line core computation type and its combinators), Fiber.ts/FiberRef.ts/FiberHandle.ts for structured concurrency, Layer.ts/Context.ts for dependency injection, Schema.ts/ParseResult.ts for validation, and Cause.ts/Exit.ts for typed failure representation. The monorepo (pnpm workspaces) layers over 30 additional packages (@effect/platform, @effect/sql-* per-driver adapters, @effect/cli, @effect/cluster, @effect/ai-*) on top of this shared core, so cross-cutting behavior like retries and tracing is implemented once and inherited everywhere. Tech Stack - Pure TypeScript, built and tested with pnpm workspaces, Vitest (via the project’s own @effect/vitest integration) and tstyche for type-level testing; the main branch currently tracks an in-development v4 while the published effect@latest npm package builds from the v3 branch. Code Quality - The core package alone carries 500+ test files spanning both runtime behavior and type-level assertions (tstyche.json), reflecting the project’s emphasis on both correctness and compile-time guarantees; a large, active contributor base and CI-enforced linting (eslint.config.mjs) back this up. API Design - The generator-based Effect.gen syntax lets code read close to async/await while still tracking typed errors and dependencies, which softens Effect’s famously steep initial learning curve, though the breadth of the ecosystem (dozens of modules, Layer/Context DI concepts, and the distinct v3/v4 branches) means new adopters face a real ramp-up period before the type-driven approach pays off.

Used by 57 apps in this directory

TypeScript
45%
Other

Convex Backend

Databases · Developer Tools

12,754

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
88
Repo Health
82
Technical
65
Dependency
Built with
TypeScript 45%
Rust 43%
Updated 6 days ago
Rust
68%
Other

GitButler

AI Development · Developer Tools · Devops

21,841

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
66
Dependency
Built with
Rust 68%
TypeScript 20%
Updated 6 days ago
TypeScript
78%
LGPL 3.0

Latitude

AI Agents · Monitoring

4,733

Open-source AI agent monitoring that catches what will break next before your users do.

View details
87
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 78%
Python 11%
Rust 11%
Updated 1 weeks ago
TypeScript
78%
LGPL 3.0

Latitude

AI Agents · Monitoring

4,733

Open-source AI agent monitoring that catches what will break next before your users do.

View details
87
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 78%
Python 11%
Rust 11%
Updated 1 weeks ago
Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 6 days ago
Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 6 days ago
Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 6 days ago
Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 6 days ago
Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers