Ship your backend in minutes, not months.

One binary. Real-time sync. Zero infrastructure.
Cosmictron replaces your app server, database, and pub/sub layer.

terminal
$ cosmictron init my-app
  Created module.rs, client.ts
$ cosmictron deploy
Deployed in 4.2s. Live at my-app.cosmictron.dev
  3 files · 0 config · real-time ready

Stop overpaying

What you'll stop paying for

App Server Express / Fastify / Hono
Your business logic runs inside the database. No separate server process, no deployment headaches, no cold starts.
Pub/Sub Layer Redis / Kafka / Pusher
Every query is a live subscription. Changes propagate to every connected client in milliseconds. No message broker needed.
Database Hosting Supabase / PlanetScale / Neon
Cosmictron IS the database. Embedded storage, SQL queries, row-level security. One process does it all.

One $5/mo VPS runs everything.
Your SaaS margins just got a lot healthier.

Use cases

What you can build

Real-time collaboration

Build Figma-style multiplayer editing. Incremental subscriptions mean every cursor move, every keystroke syncs instantly without hammering your server.

🎮

Multiplayer games

Game state lives in the database. Players subscribe to what they can see. Server-authoritative logic runs in reducers. No netcode headaches.

💬

Chat & messaging

Typing indicators, read receipts, message history — all from SQL subscriptions. No WebSocket plumbing, no Redis pub/sub, no message queues.

📈

Live dashboards

Aggregate queries update incrementally. Your dashboard doesn't re-query on a timer — it reacts to every database change in real time.

How it works

Three files. Zero config.

1

Define your data

module.rs
#[table(name = "messages", public)]
pub struct Message {
    #[primary_key] #[auto_inc]
    pub id: u64,
    pub sender: Identity,
    pub text: String,
}
2

Write your logic

module.rs
#[reducer]
fn send(ctx: &ReducerContext, text: String) {
    Message::insert(ctx.db, Message {
        id: 0, sender: ctx.sender, text,
    });
}
3

Subscribe from anywhere

client.ts
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}`));
});

Why Cosmictron

Built for developers who ship

Performance

10-100x faster real-time sync

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.

Security

Security on autopilot

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.

Freedom

Your data, your server

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.

DX

TypeScript all the way

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.

Compare

Already using something else?

Switching from Firebase?

  • Your data lives on your server, not Google's. No vendor lock-in, no egress fees, no pricing surprises.
  • Real-time subscriptions that actually scale — DBSP computes deltas, not full re-evaluations.
  • Row-level security built into SQL, not a proprietary rules DSL you have to learn from scratch.

Switching from Supabase?

  • Your application logic runs inside the database — no separate Edge Functions service to deploy and monitor.
  • Incremental subscriptions across joins and aggregations, not just single-table row changes.
  • True self-hosted with MIT/Apache 2.0. No open-core gotchas, no features locked behind a cloud plan.

Building from scratch?

  • You don't need Express + Postgres + Redis + WebSocket server + auth service. One binary does all of it.
  • Skip months of glue code. Spend your time on the product, not the plumbing.
  • Start on a $5 VPS. Scale when you have revenue, not when your architecture demands it.

Coming soon

Don't want to self-host?

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.