v0.16.0

bknd-io/bkndv0.16.0Aug 1, 2025by dswbx

AI Summary

A significant update introducing a new import structure, migrating documentation to fumadocs, and replacing the JSON Schema library with `jsonv-ts` for better performance and MCP support.

Key Highlights

  • New import structure: direct imports from `bknd` root
  • Migrated documentation from Mintlify to fumadocs
  • Migration to `jsonv-ts` for JSON Schema handling
  • Dynamic OpenAPI generation for routes

Breaking Changes

  • Removed export paths: `bknd/core`, `bknd/data`, `bknd/auth`, `bknd/media`
  • Requires direct imports from `bknd` instead of sub-modules

New Features

  • New documentation site
  • jsonv-ts integration
  • OpenAPI generation
  • S3 integration documentation
  • Waku adapter support
  • Bun support

Full Release Notes

## ⚠️  Breaking: New export structure (https://github.com/bknd-io/bknd/pull/217)
This breaking change removes the following export paths:
* `bknd/core`
* `bknd/data`
* `bknd/auth`
* `bknd/media`

Other paths, like `bknd/adapter`, `bknd/adapter/*`, `bknd/utils`, `bknd/ui`, `bknd/elements`, `bknd/client`, `bknd/plugins`, etc. remain unchanged.

Instead, you can now directly import from `bknd`:

```diff
-import { libsql } from "bknd/data";
+import { libsql } from "bknd";
```

Initially I wanted to split the modules into separate, isolated packages. Since this is an artifact and caused several duplication issues, this change was required for stability.

## 🚀 NEW DOCS! (https://github.com/bknd-io/bknd/pull/185)
Huge thanks to @timseriakov who tirelessly worked on migrating bknd docs from Mintlify to fumadocs! [Check it out](https://docs.bknd.io)

<img width="1446" height="906" alt="CleanShot 2025-08-01 at 16 18 33" src="https://github.com/user-attachments/assets/485caee1-3bd3-42b6-93fa-de3347abe278" />

## New JSON Schema building and validating (https://github.com/bknd-io/bknd/pull/192)
bknd heavily depends on JSON Schema, and was using `@sinclair/typebox` for it. It served us well, but it was time to get into greater control for what's to come (e.g. MCP). All schema relevant parts were now migrated to [jsonv-ts](https://github.com/dswbx/jsonv-ts). This reduced the overall bundle size, improved performance, and already added neat features like integrated request validation, and dynamic OpenAPI generation. 

It also features built-in MCP capabilities, which is why it was required to migrate away. `jsonv-ts` allows to walk the schema and expose deeply nested MCP Tools and Resources, directly from the schema. This means instead of "adding" MCP capabilities as an API of an API (like others have to do), **the schema itself** will control the tools and resources. 

## Other changes
* docs: add documentation on S3 integration by @cameronapak in https://github.com/bknd-io/bknd/pull/206
* fix auth redirect on error and adapter app fn by @dswbx in https://github.com/bknd-io/bknd/pull/203
* feat: add ability to serve static by using dynamic imports by @dswbx in #197
* feat/waku by @dswbx in #204
* fix media api to respect options' init, improve types by @dswbx in #211
* added cookie option partitioned, as well as cors origin to be array, option to enable credentials by @dswbx in #214
* enhance cloudflare image optimization plugin with new options and explain endpoint by @dswbx in #215
* feat/deno by @dswbx in #219


**Full Changelog**: https://github.com/bknd-io/bknd/compare/v0.15.0...v0.16.0