[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73707":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},73707,"bknd","bknd-io\u002Fbknd","bknd-io","Lightweight Firebase\u002FSupabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.","https:\u002F\u002Fbknd.io",null,"TypeScript",3726,143,16,18,0,4,28.48,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:03:17","[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fbknd.svg)](https:\u002F\u002Fnpmjs.org\u002Fpackage\u002Fbknd)\n\n![bknd](https:\u002F\u002Fraw.githubusercontent.com\u002Fbknd-io\u002Fbknd\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fpublic\u002Fassets\u002Fposter.png)\n\n\u003Cp align=\"center\" width=\"100%\">\n\u003Ca href=\"https:\u002F\u002Fstackblitz.com\u002Fgithub\u002Fbknd-io\u002Fbknd-demo?hideExplorer=1&embed=1&view=preview&initialPath=%2Fdata%2Fschema\" target=\"_blank\">\n\u003Cstrong>⭐ Live Demo\u003C\u002Fstrong>\n\u003C\u002Fa>\n\u003C\u002Fp>\n\nbknd 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!\n\nIt's designed to avoid vendor lock-in and architectural limitations. Built exclusively on [WinterTC Minimum Common Web Platform API](https:\u002F\u002Fmin-common-api.proposal.wintertc.org\u002F) 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.\n\n* **Runtimes**: Node.js 22+, Bun 1.0+, Deno, Browser, Cloudflare Workers\u002FPages, Vercel, Netlify, AWS Lambda, etc.\n* **Databases**:\n  * SQLite: LibSQL, Node SQLite, Bun SQLite, Cloudflare D1, Cloudflare Durable Objects SQLite, SQLocal\n  * Postgres: Vanilla Postgres, Supabase, Neon, Xata\n* **Frameworks**: React, Next.js, React Router, Astro, Vite, Waku\n* **Storage**: AWS S3, S3-compatible (Tigris, R2, Minio, etc.), Cloudflare R2 (binding), Cloudinary, Filesystem, Origin Private File System (OPFS)\n* **Deployment**: Standalone, Docker, Cloudflare Workers, Vercel, Netlify, Deno Deploy, AWS Lambda, Valtown etc.\n\n**For documentation and examples, please visit https:\u002F\u002Fdocs.bknd.io.**\n\n> [!WARNING]\n> This project requires Node.js 22.13 or higher (because of `node:sqlite`).\n>\n> Please keep in mind that **bknd** is still under active development\n> and therefore full backward compatibility is not guaranteed before reaching v1.0.0.\n\n## Use Cases\n\nbknd 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:\n\n- **Content Management System (CMS)** as Wordpress alternative, hosted separately or embedded in your frontend\n- **AI Agent Backends** for managing agent state with built-in data persistence, regardless where it is hosted. Optionally communicate over the integrated MCP server.\n- **SaaS Products** with multi-tenant data isolation (RLS) and user management, with freedom to choose your own database and storage provider\n- **Prototypes & MVPs** to validate ideas quickly without infrastructure overhead\n- **API-First Applications** where you need a reliable, type-safe backend without vendor lock-in either with the integrated TypeScript SDK or REST API using OpenAPI\n- **IoT & Embedded Devices** where minimal footprint matters\n\n\n## Size\n![gzipped size of bknd](https:\u002F\u002Fimg.shields.io\u002Fbundlejs\u002Fsize\u002Fbknd?label=bknd)\n![gzipped size of bknd\u002Fclient](https:\u002F\u002Fimg.badgesize.io\u002Fhttps:\u002F\u002Funpkg.com\u002Fbknd@latest\u002Fdist\u002Fui\u002Fclient\u002Findex.js?compression=gzip&label=bknd\u002Fclient)\n![gzipped size of bknd\u002Felements](https:\u002F\u002Fimg.badgesize.io\u002Fhttps:\u002F\u002Funpkg.com\u002Fbknd@latest\u002Fdist\u002Fui\u002Felements\u002Findex.js?compression=gzip&label=bknd\u002Felements&t=1)\n![gzipped size of bknd\u002Fui](https:\u002F\u002Fimg.badgesize.io\u002Fhttps:\u002F\u002Funpkg.com\u002Fbknd@latest\u002Fdist\u002Fui\u002Findex.js?compression=gzip&label=bknd\u002Fui&t=1)\n\nThe 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. \n\nDepending 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).\n\n## Motivation\nCreating 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.\n\n**The solution:** A backend system that only assumes and implements primitive details, integrates into multiple environments, and adheres to industry standards.\n\n## Features\n* ⚡ Instant backend with full REST API:\n  * **Data**: Define, query, and control your data with ease.\n  * **Auth**: Easily implement reliable authentication strategies.\n  * **Media**: Effortlessly manage and serve all your media files.\n  * **Flows**: Design and run workflows with seamless automation. (UI integration coming soon!)\n* 🌐 Built on Web Standards for maximum compatibility\n* 🛠️ MCP server, client and UI built-in to control your backend\n* 🏃‍♂️ Multiple run modes\n  * standalone using the CLI\n  * using a JavaScript runtime (Node, Bun, workerd)\n  * using a React framework (Next.js, React Router, Astro)\n* 📦 Official API and React SDK with type-safety\n* ⚛️ React elements for auto-configured authentication and media components\n\n## Structure\nThe package is mainly split into 4 parts, each serving a specific purpose:\n\n| Import                      | Purpose                                              |\n|-----------------------------|------------------------------------------------------|\n| `bknd`\u003Cbr\u002F>`bknd\u002Fadapter\u002F*` | Backend including APIs and adapters                  |\n| `bknd\u002Fui`                   | Admin UI components for react frameworks             |\n| `bknd\u002Fclient`               | TypeScript SDK and React hooks for the API endpoints |\n| `bknd\u002Felements`             | React components for authentication and media        |\n\n\n### The backend (`bknd`)\nServe 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.\n\nHere is an example of serving the API using node:\n```js index.js\nimport { serve } from \"bknd\u002Fadapter\u002Fnode\"\nserve();\n```\n\n### Integrated admin UI (`bknd\u002Fui`)\nThe 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:\n```tsx\nimport { Admin } from \"bknd\u002Fui\"\nimport \"bknd\u002Fdist\u002Fstyles.css\";\n\nexport default function AdminPage() {\n   return \u003CAdmin \u002F>\n}\n```\n\n### Using the REST API or TypeScript SDK (`bknd\u002Fclient`)\nIf you're not using a JavaScript environment, you can still access any endpoint using the REST API:\n```bash\ncurl -XGET \u003Cyour-endpoint>\u002Fapi\u002Fdata\u002Fentity\u002F\u003Centity>\n{\n  \"data\": [\n    { \"id\": 1, ... },\n    { \"id\": 2, ... }\n  ],\n  \"meta\": { \u002F* ... *\u002F }\n}\n```\n\nIn a JavaScript environment, you can use the TypeScript SDK with type-safety. The above example would look like this:\n```ts\nimport { Api } from \"bknd\u002Fclient\";\n\nconst api = new Api({ host: \"\u003Cendpoint>\" });\nconst { data } = await api.data.readMany(\"\u003Centity>\");\n```\n\nIf you're using React, there are 2 hooks exposed (`useApi`, `useEntity`), as well as an `swr` wrapper around each (`useApiQuery`, `useEntityQuery`). The `swr` wrapped hooks automatically handled query invalidation:\n\n```tsx\nimport { useState } from \"react\";\nimport { useEntityQuery } from \"bknd\u002Fclient\";\n\nexport default function App() {\n   const { data } = useEntityQuery(\"todos\");   \n   return \u003Cul>\n      {data?.map(todo => (\n         \u003Cli key={todo.id}>{todo.name}\u003C\u002Fli>\n      ))}\n   \u003C\u002Ful>\n}\n```\n\n### React elements (`bknd\u002Felements`)\nYou 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:\n```tsx\nimport { Media } from \"bknd\u002Felements\"\nimport \"bknd\u002Fdist\u002Fmain.css\"\n\nexport function UserAvatar() {\n   return \u003CMedia.Dropzone\n     entity={{ name: \"users\", id: 1, field: \"avatar\" }}\n     maxItems={1}\n     overwrite\n   \u002F>\n}\n```\nThe import path also exports components for login and registration forms which are automatically pointed to the `bknd` defaults.\n\n\n## 🚀 Quick start\nTo quickly spin up an instance, run:\n```bash\nnpx bknd run\n```\n\n### Installation  \n```bash\nnpm install bknd\n```\n\n## Contributing\n\nWe welcome contributions! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) before getting started. It covers dev setup, project structure, testing, code style, and how to submit changes.\n\nBefore writing code, please open a GitHub Issue or start a conversation in [Discord](https:\u002F\u002Fdiscord.com\u002Finvite\u002F952SFk8Tb8) so we can align on the approach.\n\n## Contributors\n\nThank you to everyone who has contributed to bknd.\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbknd-io\u002Fbknd\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=bknd-io\u002Fbknd\" \u002F>\n\u003C\u002Fa>\n\nMade with [contrib.rocks](https:\u002F\u002Fcontrib.rocks).\n","bknd 是一个轻量级的后端解决方案，旨在替代 Firebase 和 Supabase，并且可以在多种环境中运行，包括 Next.js、React Router、Astro、Cloudflare、Bun、Node 以及 AWS Lambda 等。该项目使用 TypeScript 编写，核心功能包括数据库管理、认证、媒体处理和工作流支持，所有这些功能都是模块化且可选的。通过基于 Web 标准的设计，bknd 避免了供应商锁定和架构限制，同时提供了对底层驱动程序的直接访问，确保用户在不牺牲控制权的情况下获得最大灵活性。它适用于需要快速原型设计、构建 API-优先应用、内容管理系统（CMS）、SaaS 产品、AI 代理后端等多种场景，尤其适合那些希望避免复杂基础设施配置并追求跨平台兼容性的开发者。",2,"2026-06-11 03:47:02","high_star"]