Skip to content

Your backend. Your code. Your infrastructure.

Build, deploy and scale production-ready backends with TypeScript. Develop locally, deploy to managed cloud or run your infrastructure yourself.

backend/functions/createInvoice.tsTypeScript
import { defineFunction } from "baclet";

// Illustrative example
export default defineFunction({
  name: "createInvoice",
  auth: "required",
  async handler(ctx, input: { customerId: string; amount: number }) {
    const invoice = await ctx.db.invoices.create({
      customerId: input.customerId,
      amount: input.amount,
      status: "draft",
    });
    await ctx.email.send("invoice-created", { to: ctx.user.email });
    return invoice;
  },
});

Platform

One integrated backend, not nine products.

Auth, data, functions, APIs, docs, email, storage and realtime share one type system and one runtime.

01

Authentication & authorization

Sessions, providers and role-based access rules, enforced where your data lives.

02

Database models

Typed models, queries and mutations on PostgreSQL. Bring your own database.

03

Custom backend functions

Plain TypeScript functions that run next to your frontend code.

04

Generated APIs

Every model and function gets a typed endpoint, with no hand-written routes.

05

OpenAPI & Swagger

Specs and interactive docs generated from the same types you ship.

06

Email & templates

Transactional email with versioned templates in your repository.

07

File storage

Uploads, signed URLs and access policies behind one interface.

08

Realtime

WebSocket channels that share the auth and data model of the rest of the backend.

09

CLI & dashboard

Develop from the terminal, inspect and operate from the web.

Developers

Code-first, from the first command.

All snippets below are illustrative. Final package names and SDK methods may differ.

1. Initialize

terminalShell
# Illustrative commands
npx create-baclet@latest my-app
cd my-app
baclet dev

2. Define a function

backend/functions/listPosts.tsTypeScript
// backend/functions/listPosts.ts
import { defineFunction } from "baclet";

export default defineFunction({
  name: "listPosts",
  async handler(ctx) {
    return ctx.db.posts.findMany({ orderBy: { createdAt: "desc" } });
  },
});

3. Connect your frontend

app/page.tsxTSX
// app/page.tsx
import { baclet } from "@/lib/baclet";

export default async function Page() {
  const posts = await baclet.listPosts();
  return <ul>{posts.map((p) => <li key={p.id}>{p.title}</li>)}</ul>;
}

4. Call the generated API

terminalHTTP
# Generated endpoint and spec (illustrative)
curl https://api.example.com/functions/listPosts
open https://api.example.com/openapi.json

Infrastructure

Run it where it makes sense.

The same code runs locally, on managed cloud or on your own infrastructure. Your database and hosting stay your choice.

01

Local development

Run the full backend on your machine with the same runtime you ship.

02

BACLET managed cloud

Push to a global, managed environment with no servers to operate.

03

Self-hosted

Run BACLET on your own infrastructure with the same code and configuration.

Your frontendBACLET runtimeYour databaseControl planeLocal · Cloud · Self-hosted

Workflow

From first line to production.

  1. 01

    Write

    Define models and functions in TypeScript, in the same repository as your frontend.

  2. 02

    Run

    Develop locally with the CLI. Types, APIs and docs update as you type.

  3. 03

    Deploy

    Ship to managed cloud or your own infrastructure when you are ready.

  4. 04

    Operate

    Inspect data, logs and usage from the dashboard.

Security & ownership

Built so you are never locked in.

You own the data

Connect your own PostgreSQL database. BACLET never requires you to move it.

You own the infrastructure

Self-host whenever you need to. Your code is portable.

Isolated control plane

Management and runtime are separated by design.

Read the documentation

Guides, concepts and references for every part of the platform.

Documentation

Start building with BACLET.

Create your first backend in minutes. Early access is opening soon.

Get started