https://github.com/rads/rain
🌧️ A Clojure/Script library for fast and flexible web apps.
https://github.com/rads/rain
babashka backend bbin biff clojure clojurescript frontend hydration incremental-static-regeneration isomorphic javascript jetty nextjs rain-clj re-frame react reagent server-side-rendering static-site-generator
Last synced: 4 months ago
JSON representation
🌧️ A Clojure/Script library for fast and flexible web apps.
- Host: GitHub
- URL: https://github.com/rads/rain
- Owner: rads
- License: mit
- Created: 2023-06-22T20:24:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-15T06:11:28.000Z (over 2 years ago)
- Last Synced: 2025-08-13T04:40:50.393Z (5 months ago)
- Topics: babashka, backend, bbin, biff, clojure, clojurescript, frontend, hydration, incremental-static-regeneration, isomorphic, javascript, jetty, nextjs, rain-clj, re-frame, react, reagent, server-side-rendering, static-site-generator
- Language: Clojure
- Homepage:
- Size: 95.7 KB
- Stars: 13
- Watchers: 4
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rain [](https://clojurians.slack.com/messages/rain/)
**A Clojure/Script library for fast and flexible web apps.**
> *When you start architecting a new web app, one of the foundational decisions you make is - "How and where do I want to render content?". Should it be rendered on the web server, build server, on the Edge, or directly on the client? Should it be rendered all at once, partially, or progressively?* ([patterns.dev](https://www.patterns.dev/posts/rendering-patterns))
Rain helps you answer these questions. Once you decide on an approach, you can use `rain new` to create an app from scratch and deploy it to a JAMstack host or cloud VPS provider in minutes. Check out the [Installation](#installation) and [Usage](#usage) sections to get started.
- Supports multiple rendering patterns in the same app:
- Static Site Generation (SSG)
- Incremental Static Generation (ISG)
- Server-Side Rendering (SSR)
- Client-Side Rendering (CSR)
- Hydration
- Supports reusable code between the server and browser
- Helpers for biff, reitit, reagent, and re-frame
- Fast
- Extensible
**Status:** alpha
## Table of Contents
- [Installation](#installation)
- [Docs](#docs)
- [Usage](#usage)
- [Additional Resources](#additional-resources)
## Installation
### Command-Line Tool (CLI)
First, install [`bbin`](https://github.com/babashka/bbin). Then run the following command:
```
bbin install io.github.rads/rain
```
Now you can run `rain` in your shell to see the docs for the CLI tool.
### Library
Add `io.github.rads/rain` to your `deps.edn`:
```clojure
io.github.rads/rain {:git/tag "v0.1.8" :git/sha "c490345"}
```
See the [Usage](#usage) section for examples on how to use the library to build an app.
## Docs
- [API Docs](docs/api.md)
## Usage
Rain supports multiple rendering patterns. See the table below to find an example based on your needs.
*Note:* This table is a work-in-progress and may change as Rain matures. For a more nuanced view of rendering patterns, see the [Additional Resources](#additional-resources) section.
SSG
ISG
CSR
SSR
Hydration
Example
rain.examples.ssg
bbin-site
TODO
TODO
rain.examples.todomvc
Command
rain new -t ssg
TODO
TODO
TODO
rain new -t hydration
Use Cases
Landing pages, blogs
Dashboards
Full-featured apps
Document-based sites
Supports both CSR and SSR use cases
Host as a static site (JAMstack)?
Yes
Yes
Yes
No
No
API required?
No
No
Yes
No
Yes
Custom server required?
No
No
No
Yes
Yes
JavaScript required for viewing?
No
No
Yes
No
No
JavaScript required for interaction?
No
No
Yes
No
Yes
Dynamic content on build?
Yes
Yes
Yes
Yes
Yes
Dynamic content after deploy?
No
Yes
Yes
Yes
Yes
Dynamic content based on request?
No
No
Yes
Yes
Yes
User login supported?
No
No
Yes
Yes
Yes
First Content Paint (FCP)?
Good
Good
Varies
Good
Good
Time-to-Interactive (TTI)?
Good
Good
Varies
Good
Varies
## Additional Resources
- [**"Rendering Patterns" on patterns.dev**](https://www.patterns.dev/posts/rendering-patterns)
- [**"Rendering on the Web" on web.dev**](https://web.dev/rendering-on-the-web/)