concile
v0.1.5
Published
The reactive backend you self-host — one package: server functions, typed client, React hooks, and the concile CLI.
Maintainers
Readme
concile
The open-source, self-hostable reactive backend.
Write TypeScript functions. Get a transactional database, live-updating queries, file storage, scheduling, durable workflows, and auth — on your own infrastructure, from a single package.
bun add concile # or: npm install concileHow it works
Queries are live subscriptions. Mutations are serializable transactions. When a mutation commits, every subscribed client whose query read the affected data is pushed a fresh result over WebSocket — no polling, no cache invalidation to manage.
// concile/schema.ts
import { defineSchema, defineTable, v } from "concile/values";
export default defineSchema({
messages: defineTable({
channel: v.string(),
body: v.string(),
}).index("by_channel", ["channel"]),
});// concile/messages.ts
import { query, mutation } from "./_generated/server";
import { v } from "concile/values";
export const list = query({
args: { channel: v.string() },
handler: (ctx, { channel }) =>
ctx.db.query("messages", "by_channel").eq("channel", channel).collect(),
});
export const send = mutation({
args: { channel: v.string(), body: v.string() },
handler: async (ctx, args) => {
await ctx.db.insert("messages", args);
},
});// React — updates in real time when anyone sends
import { useQuery, useMutation } from "concile/react";
import { api } from "../concile/_generated/api";
const messages = useQuery(api.messages.list, { channel: "general" });
const send = useMutation(api.messages.send);Run it:
npx concile dev # engine + typed codegen + dashboard + hot reload, SQLite, zero configWhat's in the package
| Import | Contents |
| --- | --- |
| concile | Client SDK (ConcileClient, auth client, offline outbox) |
| concile/react | useQuery, useMutation, optimistic updates |
| concile/server | query, mutation, action, httpAction, httpRouter (re-exported, fully typed, via your app's _generated/server) |
| concile/values | v validators, defineSchema, defineTable |
| concile/config | defineConfig — compose optional components |
| concile (CLI) | dev, serve, deploy, build, migrate |
Optional components
Installed separately, activated in concile.config.ts:
@concile/auth— email/OAuth sign-in, passkeys, TOTP MFA, sessions@concile/scheduler— scheduled functions and cron jobs@concile/workflow— durable multi-step workflows with compensation@concile/triggers— react to table changes with guaranteed delivery@concile/notifications— email/SMS/push/in-app messaging@concile/authz— role-based authorization
Deploy anywhere
concile serve— production server on SQLite or Postgres (--database-url)docker compose up— single-container self-hostconcile build— compile your app into one self-contained executableconcile deploy --target cloudflare|docker|railway|fly|aws— managed targets- Offline-capable clients: optimistic updates plus a durable outbox with exactly-once replay
Learn more
- Documentation: https://concile-six.vercel.app/docs
- Source: https://github.com/concile-dev/concile
- Examples: chat, auth, offline
License: FSL-1.1-Apache-2.0 — free to use and self-host; each release converts to Apache 2.0 after two years.
