Skip to main content

Define a service and error

users.ts

Create the router

router.ts

Call it!

Use .callable() when you want to invoke a procedure directly in tests, scripts, or local examples.
main.ts

What happened

1

`eos` wrapped an oRPC builder

eos exposes familiar oRPC builder methods and adds Effect-aware methods such as .provide(...), .effect(...), and .traced(...).
2

The service layer satisfied Effect requirements

UsersRepoLive was provided before the handler, so yield* UsersRepo is available at compile-time.
3

The tagged error became an oRPC error

UserNotFoundError is yieldable in Effect code and serializable as an oRPC error.

Next steps

Mental model

Learn how builders, layers, runtimes, and request boundaries fit together.

Effect procedures

Focus on .effect(...) handlers and their typed handler options.
Last modified on June 15, 2026