anolilab /lunora

Type-safe, real-time backend with Vite, Rsbuild and Rspack support, deployed on Cloudflare Workers and Durable Objects. Auth, storage, scheduling and an MCP server for AI agents. Convex-style DX.

★ 300⑂ 15👁 0⑃ 1,456● 150▤ 12,776
TypeScriptApache-2.0Created 2026-05-29lunora.sh
下载:@lunora/codegen v1.0.0-alpha.418@lunora/[email protected] ↓4182026-11-14
+0
日增长
300
stars
15
forks
0
watchers
1,456
prs
150
issues
12,776
releases

README

Type-safe, real-time backend on your own Cloudflare account. Vite-first.

Documentation · Website · Packages · Quick start



[![typescript-image][typescript-badge]][typescript-url]
[![Apache-2.0 licence][license-badge]][license]
[![Status][status-badge]][status]
[![Node][node-badge]][node]
[![pnpm][pnpm-badge]][pnpm]
[![CI][ci-badge]][ci]
[![npm version][npm-version-badge]][npm-version]
[![PRs Welcome][prs-welcome-badge]][prs-welcome]
[![OpenSSF Scorecard][scorecard-badge]][scorecard]



---


    
        
            Daniel Bannert's open source work is supported by the community on GitHub Sponsors
        
    


---

 What is Lunora?

Lunora gives you Convex-style DX on infrastructure you control. You write type-safe queries, mutations, and actions in TypeScript. In production, Lunora deploys them as Cloudflare Workers: Durable Objects hold real-time state, D1 handles SQL, R2 stores blobs, and Queues run jobs. Nothing runs on servers we operate; the production stack lives in the Cloudflare account you already pay for. See Where it runs for the other targets.

Lunora is Vite-first. The dev loop, codegen, and client bindings plug into a Vite project through @cloudflare/vite-plugin, so local dev runs on workerd, the same runtime as production. Rsbuild and Rspack projects get the same loop through @lunora/rspack, and a standalone CLI covers everything else.

 Quick start

bash
pnpm dlx lunorash@alpha init my-app
cd my-app
pnpm install
pnpm dev


 Alpha. The npm package is lunorash because the unscoped lunora name is taken; the CLI it installs is still called lunora. Install from the @alpha dist-tag and expect breaking changes until the first stable release (see Status).

 Prefer managed hosting, or just want one email when v1 is stable? Join the Lunora Cloud waitlist →

A fresh app has three files you edit:

ts
// lunora/schema.ts
import { defineSchema, defineTable, v } from "lunorash/server";

export default defineSchema({
    messages: defineTable({
        author: v.string(),
        body: v.string(),
        ts: v.number(),
    }),
});


ts
// lunora/messages.ts
import { mutation, query, v } from "./_generated/server";

export const list = query.query(async ({ ctx }) = ctx.db.query("messages").order("desc").take(50));

export const send = mutation.input({ author: v.string(), body: v.string() }).mutation(async ({ ctx, args }) = {
    await ctx.db.insert("messages", { ...args, ts: Date.now() });
});


tsx
// src/App.tsx
import { useQuery, useMutation } from "@lunora/react";
import { api } from "../lunora/_generated/api";

export default function App() {
    const messages = useQuery(api.messages.list, {}) ?? [];
    const { mutate: send } = useMutation(api.messages.send);
    return (
        <
             send({ author: "me", body: "hello" })}Send
            
                {messages.map((m) = (
                    
                        {m.author}: {m.body}
                    
                ))}
            
        
    );
}


pnpm d

Top issues

Latest release

@lunora/codegen v1.0.0-alpha.418 @lunora/[email protected] Pre-release 2026-11-14
Release of @lunora/[email protected].

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON