bknd logo

Introduction

bknd is a lightweight batteries-included backend that embeds into your frontend app

We are in beta

We're making great progress towards v1, but don't recommend production use yet. Follow along for updates on GitHub Releases and in our Discord community

bknd includes full REST APIs, an admin dashboard, auth, media uploads, a type-safe SDK, React hooks, and plugins to extend it. Host it with your SSR app or as a standalone service. Built on Web Standards, it runs anywhere JavaScript runs.

Bring your favorite frontend and favorite SQL database, and we'll bring the backend bknd.

Quickstart

This demo bknd instance is for playing and learning

Don't worry about messing anything up in this stage since you're learning the ropes of bknd. If you want to start over, please delete the generated data.db database file and follow this tutorial again.

Spin up a bknd instance via the bknd CLI:

npx bknd run
bunx bknd run

This creates a local data.db SQLite database and starts the bknd web server at http://localhost:1337.

By default, the admin dashboard is open and not guarded. This is intentional — bknd uses an opt-in philosophy to allow quick prototyping. Let's enable authentication and guard the dashboard to secure it.

  1. Visit http://localhost:1337/auth/settings. Toggle "Authentication Enabled" to enable auth. Select "Update" to save.
  2. Visit http://localhost:1337/data/entity/users. Create a user by selecting "New User" and entering an email and password.
  3. Visit http://localhost:1337/auth/roles. Create an admin role by selecting "Create new". Name it "Admin" and select "Create". Then, scroll to the bottom of the page and enable "Implicit allow missing permissions?". Select "Update" to save.
  4. Visit http://localhost:1337/data/entity/users. Select on your newly created user, select the "Admin" role, and select "Update".
  5. It's time to guard your admin dashboard. Visit http://localhost:1337/settings/auth. Select "Edit". Scroll to "Guard" and enable it. Then, select "Save". (This should log you out!)
  6. Now, log in to your secured admin dashboard at http://localhost:1337/auth/login.

You did it! You've started the bknd server, created an admin user, and protected your app by enabling the guard.

Modes

What you just experienced is UI-only mode — bknd's data and configuration is managed entirely via the admin dashboard. But that's not the only way to use bknd:

Learn more about each mode and the underlying configuration in Setup & Modes.

Try bknd in the browser

If you’re having issues viewing it inline, try in a new tab.

Start with a Framework/Runtime

Pick your framework or runtime to get started.

Use your favorite SQL Database

The following databases are currently supported. Request a new integration if your favorite is missing.