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 template

Then:

cd my-app
pnpm install
pnpm dev

Pick 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.

FrameworkCommandGuide
Reactlunora init app -t reactReact
Vuelunora init app -t vueVue
Solidlunora init app -t solidSolid
Sveltelunora init app -t svelteSvelte

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.

FrameworkCommandTopology
Next.js (App Router)lunora init app -t nextTwo workers — OpenNext + a Lunora worker
TanStack Start (React)lunora init app -t tanstack-start-reactSingle worker
TanStack Start (Solid)lunora init app -t tanstack-start-solidSingle worker
React Router v7lunora init app -t react-routerSSR composed into the Lunora worker
SvelteKitlunora init app -t sveltekitStandalone Lunora worker
Astrolunora init app -t astroStandalone Lunora worker
Nuxtlunora init app -t nuxtSingle worker — Lunora mounted in Nitro
AnalogJS (Angular)lunora init app -t analogSingle 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

TargetCommandGuide
React Native (Expo)lunora init app -t expoReact Native

Scaffolds an iOS / Android / web app plus a Lunora worker backend.

Backend only

TargetCommandUse for
Standalonelunora init api -t standaloneA 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 --here

For 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 save
  • wrangler.jsonc — the SHARD Durable 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

See also