diff --git a/README.md b/README.md index 1a4f7411..b5680a0d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -This is an independently maintained fork of [userbase](https://github.com/userbase-io/userbase) which is a drop in replacement for the original package. It is intended to be used in projects that require a more up-to-date version of userbase, or that need to use features that are not available in the original package. +This is an independently maintained fork of [bknd](https://github.com/bknd-io/bknd) which is a drop in replacement for the original package. It is intended to be used in projects that require a more up-to-date version of bknd, or that need to use features that are not available in the original package. -[![npm version](https://img.shields.io/npm/v/userbase.svg)](https://npmjs.org/package/userbase) +[![npm version](https://img.shields.io/npm/v/bknd.svg)](https://npmjs.org/package/bknd) -![userbase](https://raw.githubusercontent.com/userbase-io/userbase/refs/heads/main/docs/public/assets/poster.png) +![bknd](https://raw.githubusercontent.com/bknd-io/bknd/refs/heads/main/docs/public/assets/poster.png)

- + ⭐ Live Demo

-userbase simplifies app development by providing a fully functional visual backend for database management, authentication, media and workflows. Being lightweight and built on Web Standards, it can be deployed nearly anywhere, including running inside your framework of choice. No more deploying multiple separate services! +bknd simplifies app development by providing a fully functional visual backend for database management, authentication, media and workflows. Being lightweight and built on Web Standards, it can be deployed nearly anywhere, including running inside your framework of choice. No more deploying multiple separate services! It's designed to avoid vendor lock-in and architectural limitations. Built exclusively on [WinterTC Minimum Common Web Platform API](https://min-common-api.proposal.wintertc.org/) for universal compatibility, all functionality (data, auth, media, flows) is modular and opt-in, and infrastructure access is adapter-based with direct access to underlying drivers giving you full control without abstractions getting in your way. @@ -22,17 +22,17 @@ It's designed to avoid vendor lock-in and architectural limitations. Built exclu * **Storage**: AWS S3, S3-compatible (Tigris, R2, Minio, etc.), Cloudflare R2 (binding), Cloudinary, Filesystem, Origin Private File System (OPFS) * **Deployment**: Standalone, Docker, Cloudflare Workers, Vercel, Netlify, Deno Deploy, AWS Lambda, Valtown etc. -**For documentation and examples, please visit https://docs.userbase.io.** +**For documentation and examples, please visit https://docs.bknd.io.** > [!WARNING] > This project requires Node.js 22.13 or higher (because of `node:sqlite`). > -> Please keep in mind that **userbase** is still under active development +> Please keep in mind that **bknd** is still under active development > and therefore full backward compatibility is not guaranteed before reaching v1.0.0. ## Use Cases -userbase is a general purpose backend system that implements the primitives almost any backend needs. This way, you can use it for any backend use case, including but not limited to: +bknd is a general purpose backend system that implements the primitives almost any backend needs. This way, you can use it for any backend use case, including but not limited to: - **Content Management System (CMS)** as Wordpress alternative, hosted separately or embedded in your frontend - **AI Agent Backends** for managing agent state with built-in data persistence, regardless where it is hosted. Optionally communicate over the integrated MCP server. @@ -43,14 +43,14 @@ userbase is a general purpose backend system that implements the primitives almo ## Size -![gzipped size of userbase](https://img.shields.io/bundlejs/size/userbase?label=userbase) -![gzipped size of userbase/client](https://img.badgesize.io/https://unpkg.com/userbase@latest/dist/ui/client/index.js?compression=gzip&label=userbase/client) -![gzipped size of userbase/elements](https://img.badgesize.io/https://unpkg.com/userbase@latest/dist/ui/elements/index.js?compression=gzip&label=userbase/elements&t=1) -![gzipped size of userbase/ui](https://img.badgesize.io/https://unpkg.com/userbase@latest/dist/ui/index.js?compression=gzip&label=userbase/ui&t=1) +![gzipped size of bknd](https://img.shields.io/bundlejs/size/bknd?label=bknd) +![gzipped size of bknd/client](https://img.badgesize.io/https://unpkg.com/bknd@latest/dist/ui/client/index.js?compression=gzip&label=bknd/client) +![gzipped size of bknd/elements](https://img.badgesize.io/https://unpkg.com/bknd@latest/dist/ui/elements/index.js?compression=gzip&label=bknd/elements&t=1) +![gzipped size of bknd/ui](https://img.badgesize.io/https://unpkg.com/bknd@latest/dist/ui/index.js?compression=gzip&label=bknd/ui&t=1) -The size on npm is misleading, as the `userbase` package includes the backend, the ui components as well as the whole backend bundled into the cli including static assets. +The size on npm is misleading, as the `bknd` package includes the backend, the ui components as well as the whole backend bundled into the cli including static assets. -Depending on what you use, the size can be higher as additional dependencies are getting pulled in. The minimal size of a full `userbase` app as an API is around 300 kB gzipped (e.g. deployed as Cloudflare Worker). +Depending on what you use, the size can be higher as additional dependencies are getting pulled in. The minimal size of a full `bknd` app as an API is around 300 kB gzipped (e.g. deployed as Cloudflare Worker). ## Motivation Creating digital products always requires developing both the backend (the logic) and the frontend (the appearance). Building a backend from scratch demands deep knowledge in areas such as authentication and database management. Using a backend framework can speed up initial development, but it still requires ongoing effort to work within its constraints (e.g., *"how to do X with Y?"*), which can quickly slow you down. Choosing a backend system is a tough decision, as you might not be aware of its limitations until you encounter them. @@ -77,33 +77,33 @@ The package is mainly split into 4 parts, each serving a specific purpose: | Import | Purpose | |-----------------------------|------------------------------------------------------| -| `userbase`
`userbase/adapter/*` | Backend including APIs and adapters | -| `userbase/ui` | Admin UI components for react frameworks | -| `userbase/client` | TypeScript SDK and React hooks for the API endpoints | -| `userbase/elements` | React components for authentication and media | +| `bknd`
`bknd/adapter/*` | Backend including APIs and adapters | +| `bknd/ui` | Admin UI components for react frameworks | +| `bknd/client` | TypeScript SDK and React hooks for the API endpoints | +| `bknd/elements` | React components for authentication and media | -### The backend (`userbase`) +### The backend (`bknd`) Serve the backend as an API for any JS runtime or framework. The latter is especially handy, as it allows you to deploy your frontend and backend bundled together. Furthermore it allows adding additional logic in a way you're already familar with. Just add another route and you're good to go. Here is an example of serving the API using node: ```js index.js -import { serve } from "userbase/adapter/node" +import { serve } from "bknd/adapter/node" serve(); ``` -### Integrated admin UI (`userbase/ui`) +### Integrated admin UI (`bknd/ui`) The admin UI allows to manage your data including full configuration of your backend using a graphical user interface. Using `vite`, your admin route looks like this: ```tsx -import { Admin } from "userbase/ui" -import "userbase/dist/styles.css"; +import { Admin } from "bknd/ui" +import "bknd/dist/styles.css"; export default function AdminPage() { return } ``` -### Using the REST API or TypeScript SDK (`userbase/client`) +### Using the REST API or TypeScript SDK (`bknd/client`) If you're not using a JavaScript environment, you can still access any endpoint using the REST API: ```bash curl -XGET /api/data/entity/ @@ -118,7 +118,7 @@ curl -XGET /api/data/entity/ In a JavaScript environment, you can use the TypeScript SDK with type-safety. The above example would look like this: ```ts -import { Api } from "userbase/client"; +import { Api } from "bknd/client"; const api = new Api({ host: "" }); const { data } = await api.data.readMany(""); @@ -128,7 +128,7 @@ If you're using React, there are 2 hooks exposed (`useApi`, `useEntity`), as wel ```tsx import { useState } from "react"; -import { useEntityQuery } from "userbase/client"; +import { useEntityQuery } from "bknd/client"; export default function App() { const { data } = useEntityQuery("todos"); @@ -140,11 +140,11 @@ export default function App() { } ``` -### React elements (`userbase/elements`) +### React elements (`bknd/elements`) You don't have to figure out API details to include media uploads to your app. For an user avatar upload, this is all you need: ```tsx -import { Media } from "userbase/elements" -import "userbase/dist/main.css" +import { Media } from "bknd/elements" +import "bknd/dist/main.css" export function UserAvatar() { return } ``` -The import path also exports components for login and registration forms which are automatically pointed to the `userbase` defaults. +The import path also exports components for login and registration forms which are automatically pointed to the `bknd` defaults. ## 🚀 Quick start To quickly spin up an instance, run: ```bash -npx userbase run +npx bknd run ``` ### Installation ```bash -npm install userbase +npm install bknd ``` ## Contributing @@ -176,10 +176,10 @@ Before writing code, please open a GitHub Issue or start a conversation in [Disc ## Contributors -Thank you to everyone who has contributed to userbase. +Thank you to everyone who has contributed to bknd. - - + + Made with [contrib.rocks](https://contrib.rocks).