ZIO * Laminar * Tapir
zio-Laminar-tapir is a library that leverages the power of ZIO, Laminar and Tapir to build web applications in Scala.
Under the hood, it uses Fetch client to handle HTTP requests and responses, allowing you to build reactive web applications with ease.
It provides a simple and powerful way, from a Tapir endpoints definition, to handle requests and responses, and manage client-side rendering.
// A single import
import dev.cheleb.ziotapir.laminar.*
AnEndpoints
.get(1) // (1) Build an ZIO effect from a tapir endpoint
.emit(eventBus) // (2) Run the effect and emit the response to an event bus
In two steps:
- Build a ZIO effect from a Tapir endpoint definition
- Run the effect and emit the response to an event bus
It will handle:
- request and response marshalling
- jwt token when needed
- client management
🚀 Click me for a live demo
Credits
Incredible thanks to incredible peoples who made this possible, authors and contributors of:
- librairies this project depends on !
- Strongly inspired by non less incredible <3 Daniel Ciocîrlan's blogs, videos and courses <3 from Rock the JVM ZIO Laminar course
In this article