One binary. Real-time sync. Zero infrastructure.
Cosmictron replaces your app server, database, and pub/sub layer.
One $5/mo VPS runs everything.
Your SaaS margins just got a lot healthier.
Build Figma-style multiplayer editing. Incremental subscriptions mean every cursor move, every keystroke syncs instantly without hammering your server.
Game state lives in the database. Players subscribe to what they can see. Server-authoritative logic runs in reducers. No netcode headaches.
Typing indicators, read receipts, message history — all from SQL subscriptions. No WebSocket plumbing, no Redis pub/sub, no message queues.
Aggregate queries update incrementally. Your dashboard doesn't re-query on a timer — it reacts to every database change in real time.
#[table(name = "messages", public)]
pub struct Message {
#[primary_key] #[auto_inc]
pub id: u64,
pub sender: Identity,
pub text: String,
} #[reducer]
fn send(ctx: &ReducerContext, text: String) {
Message::insert(ctx.db, Message {
id: 0, sender: ctx.sender, text,
});
} const db = new Cosmictron({ module: "chat" });
db.subscribe("SELECT * FROM messages");
db.on("messages", (change) => {
change.inserts.forEach(m =>
console.log(`${m.sender}: ${m.text}`));
}); DBSP incremental computation means only changed data is sent over the wire. Not the whole result set — just the delta. Your app feels instant because it is.
Row-level security is built into every query, every subscription, every join. It's not a feature you enable — it's a guarantee you can't disable. Sleep well.
MIT and Apache 2.0. Self-hosted on your hardware. No egress fees, no vendor lock-in, no surprise bills at 3am. Your data never leaves your infrastructure.
Write backend logic in TypeScript with full npm access. Native V8 runtime — no WASM compilation step, no unfamiliar toolchain. Just the language you already think in.
Cosmictron Cloud is coming. Managed hosting, automatic backups, global edge deployment. Join the waitlist and we'll let you know when it's ready.
No spam. Just one email when we launch.