Kyo-core preview

Scala handlers.
Nuxt applications.

Write Nuxt server routes as plain Scala.js functions. h34s runs them on a Kyo core, with a first-class ZIO adapter. Your services stay in your app.

Release 0.2.0-alpha.1 is an alpha on GitHub Packages. The repository demo is optional.

Handlers.scala

Your application handler

@JSExportTopLevel("default", "kyo-greeting-post")
val personalizedGreeting: EventHandler = AppHandler
  .define: request =>
      for
        input    <- request.body.json[GreetingRequest]
        greeting <- Env.use[Greetings](_.greet(input.name))
      yield greeting
  .at(Route.post("/api/kyo/greeting"))

Lines 1, 6 and 8 differ from the ZIO version. A bar at the left edge marks them.

Define AppHandler to provide your services
POST /api/kyo/greeting response shape
{ "data": { "message": "Hello, Scala!" } }

AppHandler, Greetings and GreetingRequest are your application code.
Tour the whole project
Pick what you need.Scala.jsKyo coreZIO adapterh3NuxtYour database

YOUR STARTING POINT

Start where you are.

One toolbox. Three ways in.
Choose the path that fits your application.

FROM REQUEST TO RESPONSE

Build the whole handler.

See the architecture

SMALL STEPS. CLEAR BOUNDARIES.

A working foundation.
A clear direction.

0.1.0-alpha.1 has the older API. 0.2.0-alpha.1 moves the core to Kyo, adds a ZIO adapter, Scala configuration, shared resources and one schema per model. Routes declared in Scala are on main for the next release; packaging remains planned.

What works today