| 1 | # effect |
| 2 | |
| 3 | Effect is a library for building robust, maintainable, type-safe, and production grade applications in TypeScript. |
| 4 | |
| 5 | The `effect` package is the core of the framework. It provides primitives for managing side effects, errors, concurrency, resources, and structured data, alongside a rich standard library. |
| 6 | |
| 7 | > **Effect 4.x is a long-term support (LTS) release**, with at least three years of bug and security fixes. If you are upgrading from Effect 3.x, follow the [migration guide](https://github.com/Effect-TS/effect/blob/main/MIGRATION.md). |
| 8 | |
| 9 | ## Installation |
| 10 | |
| 11 | ```sh |
| 12 | npm install effect |
| 13 | ``` |
| 14 | |
| 15 | ## Requirements |
| 16 | |
| 17 | - **TypeScript 5.9 or newer.** TypeScript 7 is recommended for the best performance and compatibility with [Effect's TypeScript tooling](https://github.com/Effect-TS/tsgo#installation). |
| 18 | - **Node.js 18 or newer** when running Effect on Node.js. |
| 19 | - **Strict type-checking:** the `strict` flag must be enabled in your `tsconfig.json`: |
| 20 | |
| 21 | ```json |
| 22 | { |
| 23 | "compilerOptions": { |
| 24 | "strict": true |
| 25 | } |
| 26 | } |
| 27 | ``` |
| 28 | |
| 29 | ## Links |
| 30 | |
| 31 | - [Website](https://effect.website): documentation, guides, and news. |
| 32 | - [Reference](https://effect.website/docs/v4/api/effect): API documentation for this package. |
| 33 | - [Discord](https://discord.gg/effect-ts): ask questions, share what you're building, and talk to the core team. |
| 34 | - [Community](https://effect.website/community-hub): meetups and events, or bring Effect to your own. |
| 35 | - [Issues](https://github.com/Effect-TS/effect/issues): bug reports and feature requests. |
| 36 | |
| 37 | ## Let's talk |
| 38 | |
| 39 | Whether your team is considering Effect, rolling it out, or already running it in production, we'd love to hear from you: what you're building, what works, and what you need from Effect next. |
| 40 | |
| 41 | - **Talk to the maintainers.** Introduce your team on [Discord](https://discord.gg/effect-ts) or email [contact@effectful.co](mailto:contact@effectful.co). We're happy to connect privately on Slack or Discord for feedback and help with adoption. |
| 42 | - **Production support.** We're exploring how to better support teams running Effect in production. If your organization has specific support needs, let's discuss them. |
| 43 | - **Adoption help.** Our [adoption partners](https://effect.website/adoption-partners) offer implementation, consulting, team extension, training, and commercial support. |
| 44 | |
| 45 | ## Overview |
| 46 | |
| 47 | The `effect` package is a collection of modules. Some of the core ones: |
| 48 | |
| 49 | | Module | Description | |
| 50 | | -------- | -------------------------------------------------------------------------------------------------------------------------- | |
| 51 | | Effect | The core abstraction for managing side effects, concurrency, and error handling in a structured way. | |
| 52 | | Context | A lightweight dependency injection mechanism that enables passing services through computations without direct references. | |
| 53 | | Layer | A system for managing dependencies, allowing for modular and composable resource allocation. | |
| 54 | | Fiber | Lightweight virtual threads with resource-safe cancellation capabilities, enabling many features in Effect. | |
| 55 | | Stream | A powerful abstraction for handling asynchronous, event-driven data processing. | |
| 56 | | Schedule | A module for defining retry and repeat policies with composable schedules. | |
| 57 | | Scope | Manages the lifecycle of resources, ensuring proper acquisition and release. | |
| 58 | | Schema | A powerful library for defining, validating, and transforming structured data with type-safe encoding and decoding. | |
| 59 | |
| 60 | In v4, functionality that previously lived in separate packages ships inside `effect` under the `effect/*` namespaces, including `http`, `http-api`, `rpc`, `cluster`, `workflow`, `cli`, `ai`, `sql`, and `reactivity`. |