Live example: https://todomvc.rads.dev/
This is an example full-stack app built with Rain, allowing for server-side rendering in a Reagent/Re-frame application.
Start the dev server:
bb dev
- Everything runs in a single JVM process
- Can be deployed to a generic Linux machine (currently using Ubuntu 22.04 on Hetzner Cloud)
- Uses Biff for overall architecture and deployment
- Uses Babashka for running project tasks with minimal startup time
- Uses Ring, Reitit, and Jetty on the backend to implement the HTTP server
- Uses Reagent and Re-frame for state management
- Uses Rain to render Reagent and Re-frame components on the server without a Node.js runtime
- Todos are persisted to Postgres using the existing todo-backend-reitit project as a library (props to @prestancedesign)
- A Swagger UI for the backend is available at https://todomvc.rads.dev/swagger-ui
- The initial Re-frame DB is serialized into a
<script>
tag on the server and hydrated withhydrateRoot
on the client - If JavaScript is disabled, the site can still be used in read-only mode
- All UI updates are optimistic (no interaction delay even on "Slow 3G")
- SSR allows the page to load all content quickly while JavaScript is being loaded in the background, optimizing for First Content Paint (FCP)