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
Welcome! bknd is the instant backend for your frontend with full REST API's, admin dashboard, auth and user management, file upload management, type-safe SDK, React hooks, and plugins to extend the bknd (like our resend plugin for sending emails). bknd can be hosted with your server-side rendered (SSR) web app or hosted as a standalone app.
bknd is incredibly lightweight and built upon Web Standards, so that you can bring bknd anywhere JavaScript runs.
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.
Enter the following command to spin up a bknd instance via the bknd CLI:
npx bknd run
bunx bknd run
This will create a local data.db SQLite database file in the folder you ran the command and start the bknd web server at http://localhost:1337.
By default, access to the admin dashboard is open and not guarded. This is intentional because bknd uses an opt-in philosophy model to allow for quick prototyping and intentional configuration. To restrict access and prevent unauthorized use, let's enable authentication and guard the dashboard.
We will create a user and an admin role. We will then apply the admin role to the user. Then, we can lock down the admin dashboard by enabling the guard, securing access to your bknd app. Let's begin.
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.
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!)
You did it! 🥳 You've successfully started the bknd server and admin dashboard, created an admin user, and protected your bknd app by enabling the guard.
What you've just experienced is called UI-only mode, where the bknd data and configuration is managed via the admin dashboard UI. Some may prefer the UI-only mode, while others may prefer the code-only mode.