bknd is dead long live userbase
Run Tests / test (pull_request) Successful in 4m57s

This commit is contained in:
2026-09-27 19:34:06 +05:30
parent 05e0086fcd
commit 0bfcb5ad71
529 changed files with 2385 additions and 2924 deletions
+1 -1
View File
@@ -1 +1 @@
# local bknd POC (WIP)
# local userbase POC (WIP)
+1 -1
View File
@@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"bknd": "file:../../app",
"userbase": "file:../../app",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sqlocal": "^0.16.0",
+8 -8
View File
@@ -1,7 +1,7 @@
import { boolean, em, entity, text } from "bknd";
import { boolean, em, entity, text } from "userbase";
import { Route } from "wouter";
import IndexPage from "~/routes/_index";
import { BkndBrowserApp, type BrowserBkndConfig, useApp } from "bknd/adapter/browser";
import { UserbaseBrowserApp, type BrowserUserbaseConfig, useApp } from "userbase/adapter/browser";
import { type ReactNode, useEffect } from "react";
const schema = em({
@@ -13,7 +13,7 @@ const schema = em({
// register your schema to get automatic type completion
type Database = (typeof schema)["DB"];
declare module "bknd" {
declare module "userbase" {
interface DB extends Database {}
}
@@ -35,24 +35,24 @@ const config = {
// the seed option is only executed if the database was empty
seed: async (ctx) => {
await ctx.em.mutator("todos").insertMany([
{ title: "Learn bknd", done: true },
{ title: "Learn userbase", done: true },
{ title: "Build something cool", done: false },
]);
// @todo: auth is currently not working due to POST request
await ctx.app.module.auth.createUser({
email: "test@bknd.io",
email: "test@userbase.io",
password: "12345678",
});
},
},
} satisfies BrowserBkndConfig;
} satisfies BrowserUserbaseConfig;
export default function App() {
return (
<BkndBrowserApp {...config} header={<Debug />}>
<UserbaseBrowserApp {...config} header={<Debug />}>
<Route path="/" component={IndexPage} />
</BkndBrowserApp>
</UserbaseBrowserApp>
);
}
+4 -4
View File
@@ -1,7 +1,7 @@
import { Center } from "~/components/Center";
import { useEntityQuery } from "bknd/client";
import type { SQLocalConnection } from "bknd";
import { useApp } from "bknd/adapter/browser";
import { useEntityQuery } from "userbase/client";
import type { SQLocalConnection } from "userbase";
import { useApp } from "userbase/adapter/browser";
import { useEffect, useState } from "react";
import { Link } from "wouter";
@@ -18,7 +18,7 @@ export default function IndexPage() {
return (
<Center className="flex-col gap-10 max-w-96 mx-auto">
<div className="flex flex-col gap-2 items-center">
<img src="/bknd.svg" alt="bknd" className="w-48 dark:invert" />
<img src="/userbase.svg" alt="userbase" className="w-48 dark:invert" />
<p className="font-mono">local</p>
</div>
+3 -3
View File
@@ -1,6 +1,6 @@
import { Admin, type BkndAdminProps } from "bknd/ui";
import "bknd/dist/styles.css";
import { Admin, type UserbaseAdminProps } from "userbase/ui";
import "userbase/dist/styles.css";
export default function AdminPage(props: BkndAdminProps) {
export default function AdminPage(props: UserbaseAdminProps) {
return <Admin {...props} />;
}