@effect/platform provides unified, platform-independent abstractions for Node.js, Bun, and browsers. It enables you to write code once and run it across different environments.
Installation
Platform-Specific Packages
Install the appropriate runtime package for your environment:Node.js
Bun
Browser
Core Services
HttpClient
Make HTTP requests with full type safety and composability.FileSystem
Platform-independent file system operations.Command
Execute system commands safely.HTTP API
Define declarative, type-safe HTTP APIs with automatic client generation and Swagger documentation.Key Features
- Platform Independence: Write once, run on Node.js, Bun, or browsers
- Type Safety: Full TypeScript support with schema validation
- Composability: Combine services using Effect’s powerful composition
- Error Handling: Built-in error types and recovery mechanisms
- Testability: Easy to mock and test with dependency injection
Related Packages
@effect/platform-node
Node.js runtime implementation
@effect/platform-bun
Bun runtime implementation
@effect/platform-browser
Browser runtime implementation
API Reference
Complete API documentation