fp-ts-backend
fp-ts Backend Patterns
Functional programming patterns for building type-safe, testable backend services using fp-ts.
Core Concepts
ReaderTaskEither (RTE)
The ReaderTaskEither<R, E, A> type is the backbone of functional backend development:
- R (Reader): Dependencies/environment (database, config, logger)
- E (Either left): Error type
- A (Either right): Success value
import * as RTE from 'fp-ts/ReaderTaskEither'
import * as TE from 'fp-ts/TaskEither'
import { pipe } from 'fp-ts/function'
// Define your dependencies
More from whatiskadudoing/fp-ts-skills
functional programming fundamentals
Core FP concepts including pure functions, currying, composition, and pointfree style - the foundation for mastering functional TypeScript
81pragmatic functional programming
A practical, jargon-free guide to functional programming - the 80/20 approach that gets results without the academic overhead
40functional programming in react
Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Works with React 18/19, Next.js 14/15.
40fp-immutable
Practical immutability patterns in TypeScript - spread operators, nested updates, readonly types, and when mutation is actually fine
39fp-ts-validation
Validation patterns using fp-ts with error accumulation, form validation, and API input validation
39fp-ts-async-practical
Practical async patterns using TaskEither - clean pipelines instead of try/catch hell, with real API examples
38