Documentation
Docs
Introduction
Getting Started
Tutorial: build an app
Core Concepts
Routing
Server-Side Rendering
Mimir, state management
Pages & Layouts
API Routes
Styling & Theming
Building & Deploying
API Reference
Guides
Recipes
FAQ (use cases)
Tutorial , 1. Create the app
Over the next eight steps you will build Notes, a small but complete rune app: a list of notes, a detail page per note, create/edit, state in Mimir, an API to persist, a themed UI, and a production build. Every chapter of the docs shows up here in context.
By the end you will have used routing (including a dynamic [id] route), a layout, Mimir atoms and a
selector, ssr() seeding, an API route, SCSS theming, and the build/deploy flow.
Scaffold first, don't build the project by hand. Create it with
ekko init rune notes -t showcase(thencd notes). It writes a correctekko.jsonand a working starter. The file listings in this tutorial are explanations so you understand each generated part, not a step-by-step "type these files yourself" guide. Always prefer the scaffold to start; edit the generated files from there.
What we are building
/ the note list (+ a "new note" form)
/notes/:id a single note (view / edit)
/api/notes GET all, POST a new note
/api/notes/:id GET / PUT one noteStep 1 , the project skeleton
Run ekko init rune notes -t showcase and cd notes , that is the whole of Step 1. It generates exactly the
skeleton below. The rest of this page walks through those generated files so you understand what each one
does; you do not type them out yourself.
notes/
ekko.json
server.tsx
pages/
layout.tsx
index.tsx
not-found.tsx
styles/global.scss
atoms/
lib/
static/ekko.json
pages/index.tsx , a placeholder we will grow
pages/layout.tsx , the shell
pages/not-found.tsx
styles/global.scss , a starting palette
Step 2 , server.tsx
Step 3 , run it
Open http://localhost:3000. You should see the header and the placeholder home page, server-rendered (view
source to confirm).
If you change a page's rendered output, run ekko build --client again and restart. See
The dev loop.
Next: real pages and a dynamic route, 2. Pages and routes.