Quickstarts
Every starting point Lunora scaffolds — pick your framework, run one command, and get a live backend wired to it.
Last updated:
lunora init scaffolds a complete project: a Lunora worker, a schema, a working
query and mutation, and the client wiring for your framework. Run it with no
flags to pick interactively, or pass -t to go straight to one.
npx lunorash@alpha init my-app # interactive picker
npx lunorash@alpha init my-app -t next # straight to a templateThen:
cd my-app
pnpm install
pnpm devPick a starting point
Single-page apps
Scaffolded from the official create-vite base with the Lunora layer applied on top, so you get the standard Vite project you would have created yourself, plus the plugin, codegen, and Studio.
| Framework | Command | Guide |
|---|---|---|
| React | lunora init app -t react | React |
| Vue | lunora init app -t vue | Vue |
| Solid | lunora init app -t solid | Solid |
| Svelte | lunora init app -t svelte | Svelte |
React is the default when you do not choose.
Server-rendered apps
These pair SSR with live subscriptions — the server render resolves data, and the client hydrates it into a live query rather than refetching.
| Framework | Command | Topology |
|---|---|---|
| Next.js (App Router) | lunora init app -t next | Two workers — OpenNext + a Lunora worker |
| TanStack Start (React) | lunora init app -t tanstack-start-react | Single worker |
| TanStack Start (Solid) | lunora init app -t tanstack-start-solid | Single worker |
| React Router v7 | lunora init app -t react-router | SSR composed into the Lunora worker |
| SvelteKit | lunora init app -t sveltekit | Standalone Lunora worker |
| Astro | lunora init app -t astro | Standalone Lunora worker |
| Nuxt | lunora init app -t nuxt | Single worker — Lunora mounted in Nitro |
| AnalogJS (Angular) | lunora init app -t analog | Single worker — Lunora mounted in Nitro |
The topology column matters for deployment. Single worker means one
wrangler deploy. Two workers means the framework's worker and the Lunora
worker deploy separately — see Next.js for why and
how.
Mobile
| Target | Command | Guide |
|---|---|---|
| React Native (Expo) | lunora init app -t expo | React Native |
Scaffolds an iOS / Android / web app plus a Lunora worker backend.
Backend only
| Target | Command | Use for |
|---|---|---|
| Standalone | lunora init api -t standalone | A worker with no frontend — an API, a job runner |
Pair it with any client through the REST API or a server-side client.
Adding Lunora to an app you already have
Scaffolding a new project is not the only path. --here detects the framework
in the current directory, patches its config, scaffolds lunora/, and prints the
wiring steps:
npx lunorash@alpha init --hereFor a considered walkthrough — including how to run Lunora next to an existing database — see Adopt in an existing app.
What you get either way
Whichever starting point you choose, the scaffold includes:
lunora/schema.ts— a schema with one table- a query and a mutation, already wired to the UI
lunora/_generated/— the typed API surface, regenerated on savewrangler.jsonc— theSHARDDurable Object binding and migration- the Studio, served alongside the dev server
Add authentication and transactional email at any point with lunora add auth
and lunora add email, and scaffold a CI deploy pipeline with
--ci github or --ci gitlab.
Next steps
- Getting started — the guided first run
- Realtime chat tutorial — build something end to end
- Schema — model your data
- Deployment — ship it