Documentation

Docs

Introduction

What is rune

Philosophy

Why rune

Architecture

Getting Started

Installation

Quick start

Project structure

The dev loop

Tutorial: build an app

1. Create the app

2. Pages & routes

3. Layouts

4. State with Mimir

5. SSR & data

6. API routes

7. Styling

8. Build & deploy

Core Concepts

The application object

Rendering pipeline

Hydration

The build manifest

Configuration (ekko.json)

Permissions

Conventions

Routing

File-based routing

Dynamic routes

The router (useRouter)

Navigation & Link

Guards & redirects

Programmatic routes

Server-Side Rendering

Overview

The ssr() function

Strategies (eager/lazy)

SSR → hydration

Caching & invalidation

SEO

Mimir, state management

Overview

Atoms

Reading & writing

Selectors (derived state)

Subscriptions & the store

SSR & hydration

Persistence & sessions

Patterns & recipes

Pitfalls

Pages & Layouts

Pages

Layouts

Error & not-found

API Routes

Defining routes

Request & response

Middleware

helmet

cors

rateLimit

bodyLimit

validateContentType

csrf

requestId

timeout

errorHandler

httpsRedirect

secureCookies

ipFilter

safePath

Validation & options

Styling & Theming

SCSS

Theming (light/dark)

Asgard integration

No flash (no-FOUC)

Building & Deploying

The build

Static assets

Production deploy

API Reference

ekko:rune

ekko:rune/router

ekko:rune/mimir

ekko:rune/seo

ekko:ssr / css

ekko.json schema

CLI commands

Guides

Rune app from scratch

Recipes

Dark mode

Forms

Data fetching

Authentication

Pagination

FAQ (use cases)

Documentation

Docs

Introduction

What is rune

Philosophy

Why rune

Architecture

Getting Started

Installation

Quick start

Project structure

The dev loop

Tutorial: build an app

1. Create the app

2. Pages & routes

3. Layouts

4. State with Mimir

5. SSR & data

6. API routes

7. Styling

8. Build & deploy

Core Concepts

The application object

Rendering pipeline

Hydration

The build manifest

Configuration (ekko.json)

Permissions

Conventions

Routing

File-based routing

Dynamic routes

The router (useRouter)

Navigation & Link

Guards & redirects

Programmatic routes

Server-Side Rendering

Overview

The ssr() function

Strategies (eager/lazy)

SSR → hydration

Caching & invalidation

SEO

Mimir, state management

Overview

Atoms

Reading & writing

Selectors (derived state)

Subscriptions & the store

SSR & hydration

Persistence & sessions

Patterns & recipes

Pitfalls

Pages & Layouts

Pages

Layouts

Error & not-found

API Routes

Defining routes

Request & response

Middleware

helmet

cors

rateLimit

bodyLimit

validateContentType

csrf

requestId

timeout

errorHandler

httpsRedirect

secureCookies

ipFilter

safePath

Validation & options

Styling & Theming

SCSS

Theming (light/dark)

Asgard integration

No flash (no-FOUC)

Building & Deploying

The build

Static assets

Production deploy

API Reference

ekko:rune

ekko:rune/router

ekko:rune/mimir

ekko:rune/seo

ekko:ssr / css

ekko.json schema

CLI commands

Guides

Rune app from scratch

Recipes

Dark mode

Forms

Data fetching

Authentication

Pagination

FAQ (use cases)

Reference , CLI

The ekko commands you use to develop, build, and ship a rune app.

ekko run <entry> [--allow=...]

Starts your app. For a rune app, the entry is server.tsx.

1
ekko run server.tsx --allow=fs,net,env
  • --allow=<cats> , grant runtime capabilities (fs, net, env, sys, ffi, child_process, worker),

with optional scopes (--allow=fs:./data,net:localhost:*,env:PORT). Additive with ekko.json permissions. See Permissions.

  • The server reads PORT (if you wired it and granted env) and listens. It compiles your SCSS at start and

reads .ekko/build/manifest.json.

ekko build --client

Compiles the browser bundle and writes the manifest.

1
ekko build --client

Outputs .ekko/build/client/* (content-hashed chunks) and .ekko/build/manifest.json. Run whenever client-rendered code changes. Build it on your dev machine and ship .ekko/build; prod does not rebuild. See The build.

ekko build

Builds a workspace member (transpile + collect assets). For a lib, produces the transpiled output used when packing.

ekko pack

Packages a workspace member into a .ekl archive (under dist/). Used to publish or to depend on a local library via a file: source in ekko.lock.

ekko add <pkg> [<pkg>...]

Adds a dependency: resolves it into the store and records it in ekko.json/ekko.lock.

1
ekko add @ekko/react @ekko/react-dom

ekko remove <pkg> · ekko list

Remove a dependency; list installed dependencies.

ekko dev

Starts a dev server with file watching and auto-rebuild (a convenience over the manual build --client + run loop). For full control or production-shaped behaviour, use build --client + run.

ekko ekl

Manage .ekl packages and the package store:

  • ekko ekl inspect <file|pkg> , inspect an archive or installed package.
  • ekko ekl list , list packages in the store.
  • ekko ekl store , manage the store location.

ekko vendor

Copies store dependencies into ./vendor/ for offline/reproducible builds.

ekko x <bin>

Execute a binary from packages, the workspace, or .ekl archives.

ekko publish

Publish the current member to the registry (when you distribute a package).

A typical rune workflow

1
2
3
4
5
6
7
8
9
10
11
# develop
ekko build --client
ekko run server.tsx --allow=fs,net,env
 
# after editing markdown-driven content (if your app uses the docs pipeline)
node _build/convert-docs.mjs && ekko build --client # then restart
 
# ship (dev machine → host)
ekko build --client
tar czf app.tgz <project> && tar czf store.tgz -C "$HOME/.ekko" store
# ... scp + extract + systemctl restart on the host (see Production deploy)

That completes the API Reference. Next: practical Recipes.