A Scala 3 web framework

Your data model is the source of truth.

Declare a model, and Eezo derives tables, forms, HTTP routes and a JSON API. Server-side rendering with functional, direct-style Scala. Fast dev feedback, deploys with one command.

Install the command line

curl -fsSL https://eezo.io/install | bash

Needs JDK 25 and sbt. Read the script first if you like.

  • Scala 3
  • JDK 25
  • Postgres
  • MIT
case class Book(
    id: Id[Book],
    title: String,
    author: String,
    pages: Int
) derives Table, Form, Resource, Api
  • GET/books
  • GET/books/new
  • POST/books
  • GET/books/:id
  • GET/books/:id/edit
  • PUT/books/:id
  • DELETE/books/:id
  • GET/api/books
  • POST/api/books
  • GET/api/books/:id
  • PUT/api/books/:id
  • DELETE/api/books/:id

0 clicks

This box is a live component: Component[State] on the server, events up and patches down over websocket, with no JS needed.

From Scala Days

Shopping for a Scala framework

Riccardo and Daniel demonstrate a non-trivial full-stack web application from scratch.

Watch the talk, 27 minutes

Four kinds of docs

How it works

  1. 1
    eezo new myUnicorn

    Scaffold

    A Main, one route, plus build files. Nothing to configure.

  2. 2
    eezo dev

    Serve

    Restarts on save. A broken compile keeps the old code serving.

  3. 3
    eezo deploy

    Ship

    Stages the jars, builds the image, migrates, waits for health.

Check out a full dev cycle in the deploy walkthrough.

What you get

  • One declaration

    derives Table, Form, Resource, Api

    Declare your model, and Eezo derives its tables & database API, its HTML form, all CRUD HTTP routes and a JSON API from one case class.

  • The filename is the route

    app/Health.scala mounts GET /health

    Your own routes come from the file layout. You can override a derived route on the same path.

  • Direct style

    Request => Response

    A handler is a function. Eezo runs on virtual threads, so feel free to block on the database, call an API, or return a page.

  • Migrations from the model

    eezo db freeze, then eezo db migrate

    Eezo detects schema diffs as you change your data model. Commit them to fingerprinted SQL migrations. On deploy they run before the new code takes traffic.

  • Live pages

    Component[State]

    Write UIs with a Scala functional DSL. State lives on the server, and the browser gets a thin client. UI sends events, server renders UI. No need for JavaScript.

  • Guarded by declaration

    given Owned[Post, User] = ...

    Control route protection, and get your owner type if successful (e.g. a user). In an application with a guard, a route that says nothing is a compile error.

Take the layers you need

An application has a database layer, an http layer, or both. Import the right artifact for your app.

Roadmap

What's coming

Roughly in this order. We have big plans for Eezo.

  1. Observability and OTel

    Get structured logs with request ids, an access log, health checks, metrics, plus Open Telemetry on requests, queries and live (UI) events.

  2. Testkit and Testcontainers

    Should be able to test Eezo applications with built-in request builders, signed-in sessions, rollbacks, and Postgres containers.

  3. Security policy and login throttling

    A SECURITY.md with a disclosure process, and sign-in attempts throttled so a password guard can't be brute forced.

  4. Database joins

    Case classes can use Ref to other case classes, but in a 1-1 relationship. We want to add hasMany and belongsTo over Ref and joins with eager loading so a list page doesn't run N+1 queries.

  5. OAuth integration

    Sign in with Google or any OIDC provider, with the same user model used by the password guard.

  6. Uploads, multipart and storage

    Allow multipart forms with size limits, and files kept on disk or in S3.

  7. HTTP streaming and SSE

    Stream responses and push server-sent events using a similar API as the simple HTTP endpoints.

  8. Validation rules

    For `derives Form`, validation on fields (e.g. length, range, format, cross-field rules) should come for (nearly) free, and be enforced in the the JSON API and the database.

  9. JSON outputs

    This is for agents. Every eezo command should answer in JSON, so agents read structured results instead of scraping text.

  10. Agentic tools

    Skills and tools that let a coding agent read your routes, models, drift and logs from a running eezo dev.

  11. Admin

    A Django-like admin interface derived from every Table, mounted on Route.under("/admin").

  12. i18n

    Translated messages and derived pages: form labels, validation errors and CRUD screens in the user's language.

  13. Maybe 1.0 here
  14. Pagination

    Pages, sorting and filters on the derived index and the JSON API, so a table with 10k rows doesn't load all of them.

  15. OpenAPI from the data model

    An OpenAPI document derived from `derives Api` at compile time, maybe also checked in dev and in CI like we do for schema drift.

  16. Email

    Mail written as Html values, with a dev inbox and preview pages.

  17. Background jobs

    Jobs on the Postgres you already have, with retries and scheduling.

  18. Local caching

    An in-process cache for reads that rarely change, no Redis required.

  19. Horizontal scale

    Several machines behind a load balancer, with a shared live state.

  20. Distributed topics

    A Topic that talks across machines over Postgres LISTEN/NOTIFY, so live pages see every update even if hosted on different nodes.

  21. Magic link sign-in

    Sign in from a link in an email rather than user/password.

  22. Dev Services

    eezo dev should start a throwaway Postgres when none is reachable, so you don't need any setup to run a fresh repo clone.

  23. A test tab in the TUI

    A tab in the eezo dev console that shows the affected tests on save.

  24. The dev console in the browser

    Basically the `eezo dev` we currently have as TUI, but in a browser tab.

  25. Attachments on the model

    Like Rails' Active Storage.

  26. Deploy check and built-in CSP

    eezo check before a deploy: secret set, debug off, headers on, etc

Ready when you are.

Eezo is pre-release: dev is ongoing, and the source is open.