Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: πŸ› Bug report
description: Something in one of the b10cks SDK packages does not work as documented.
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a report.

**Do not report security vulnerabilities here** – use
[private reporting](https://github.com/b10cks/sdk/security/advisories/new) instead.

- type: dropdown
id: package
attributes:
label: Package
description: Which package is affected?
multiple: true
options:
- '@b10cks/client'
- '@b10cks/richtext'
- '@b10cks/vue'
- '@b10cks/nuxt'
- '@b10cks/react'
- '@b10cks/next'
- '@b10cks/svelte'
- '@b10cks/mcp-server'
- '@b10cks/cli'
- '@b10cks/mgmt-client'
- Not sure
validations:
required: true

- type: input
id: version
attributes:
label: Package version
placeholder: e.g. 2.3.1
validations:
required: true

- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen, and what happened instead?
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: A minimal reproduction (repo, StackBlitz or code snippet) gets this fixed much faster.
value: |
1.
2.
3.
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: Node version, package manager, framework version, browser/runtime.
render: text
placeholder: |
Node: 24.7.0
Package manager: pnpm 11.17.0
Framework: Nuxt 4.x
validations:
required: true

- type: textarea
id: logs
attributes:
label: Relevant logs or errors
description: Paste any error output. **Redact access tokens before posting.**
render: shell
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: πŸ’¬ Question or idea
url: https://github.com/b10cks/sdk/discussions
about: Ask usage questions, propose ideas or share what you built.
- name: πŸ” Report a security vulnerability
url: https://github.com/b10cks/sdk/security/advisories/new
about: Please report vulnerabilities privately – never as a public issue.
- name: πŸ“– Documentation
url: https://www.b10cks.com/docs
about: Guides and API reference for b10cks.
- name: πŸ—¨οΈ Discord
url: https://discord.gg/mdcDktFFcp
about: Chat with the community.
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ✨ Feature request
description: Suggest a new capability for one of the b10cks SDK packages.
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Open-ended ideas are often a better fit for
[Discussions](https://github.com/b10cks/sdk/discussions). Use this form when you have a
concrete change in mind.

- type: dropdown
id: package
attributes:
label: Package
multiple: true
options:
- '@b10cks/client'
- '@b10cks/richtext'
- '@b10cks/vue'
- '@b10cks/nuxt'
- '@b10cks/react'
- '@b10cks/next'
- '@b10cks/svelte'
- '@b10cks/mcp-server'
- '@b10cks/cli'
- '@b10cks/mgmt-client'
- New package
validations:
required: true

- type: textarea
id: problem
attributes:
label: What problem does this solve?
description: Describe the use case you are stuck on, not just the solution you have in mind.
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed API or behaviour
description: Sketch the API you would like. Code samples welcome.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives you considered
description: Workarounds you tried, and why they fall short.
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ runs:
using: composite
steps:
# Version comes from the `packageManager` field in package.json.
- uses: pnpm/action-setup@v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6

- uses: actions/setup-node@v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Lint & format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup

- name: Lint
Expand All @@ -35,7 +35,7 @@ jobs:
matrix:
node: ['24', '26']
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node }}
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main' && !contains(github.event.pull_request.labels.*.name, 'skip-changeset')
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- uses: ./.github/actions/setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0

Expand All @@ -38,7 +38,7 @@ jobs:

- name: Create version PR or publish
id: changesets
uses: changesets/action@v1.9.0
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
with:
version: pnpm run changeset:version
publish: pnpm run release
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ from a developer machine.

If you have any questions or need support, feel free to reach out to the maintainers. We are here to help!

1. You can check the [b10cks documentation](https://docs.b10cks.com/).
1. You can check the [b10cks documentation](https://www.b10cks.com/docs).
2. Open an issue in this repository if you encounter any problems or have questions about the SDKs.
3. Join our [Discord community](https://discord.gg/coders_cantina) for community support.
97 changes: 87 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@

[![CI](https://github.com/b10cks/sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/b10cks/sdk/actions/workflows/ci.yml)
[![Release](https://github.com/b10cks/sdk/actions/workflows/release.yml/badge.svg)](https://github.com/b10cks/sdk/actions/workflows/release.yml)
[![npm](https://img.shields.io/npm/v/@b10cks/client?label=%40b10cks%2Fclient)](https://www.npmjs.com/package/@b10cks/client)
[![License](https://img.shields.io/npm/l/@b10cks/client)](./LICENSE)

Official JavaScript/TypeScript SDKs for [b10cks](https://b10cks.com) – a modern headless CMS and content management platform.
Official JavaScript/TypeScript SDKs for [b10cks](https://www.b10cks.com) – a modern headless CMS and content management platform.

This monorepo contains multiple packages that enable seamless integration of b10cks into your web applications.
Fully typed, framework-agnostic at the core, with first-party integrations for Vue, Nuxt, React,
Next.js and Svelte – plus a CLI and an [MCP server](./packages/mcp-server) that let you (and your AI
coding agent) drive the b10cks Management API directly.

## πŸ“¦ Packages

| Package | Version | What it does |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| [`@b10cks/client`](./packages/client) | [![npm](https://img.shields.io/npm/v/@b10cks/client)](https://www.npmjs.com/package/@b10cks/client) | Framework-agnostic Data API client |
| [`@b10cks/richtext`](./packages/richtext) | [![npm](https://img.shields.io/npm/v/@b10cks/richtext)](https://www.npmjs.com/package/@b10cks/richtext) | Rich text β†’ HTML renderer |
| [`@b10cks/vue`](./packages/vue) | [![npm](https://img.shields.io/npm/v/@b10cks/vue)](https://www.npmjs.com/package/@b10cks/vue) | Vue 3 plugin, composables and live-edit directives |
| [`@b10cks/nuxt`](./packages/nuxt) | [![npm](https://img.shields.io/npm/v/@b10cks/nuxt)](https://www.npmjs.com/package/@b10cks/nuxt) | Nuxt 4 module |
| [`@b10cks/react`](./packages/react) | [![npm](https://img.shields.io/npm/v/@b10cks/react)](https://www.npmjs.com/package/@b10cks/react) | React provider and hooks |
| [`@b10cks/next`](./packages/next) | [![npm](https://img.shields.io/npm/v/@b10cks/next)](https://www.npmjs.com/package/@b10cks/next) | Next.js integration layer |
| [`@b10cks/svelte`](./packages/svelte) | [![npm](https://img.shields.io/npm/v/@b10cks/svelte)](https://www.npmjs.com/package/@b10cks/svelte) | Svelte context, stores and actions |
| [`@b10cks/mcp-server`](./packages/mcp-server) | [![npm](https://img.shields.io/npm/v/@b10cks/mcp-server)](https://www.npmjs.com/package/@b10cks/mcp-server) | MCP server for the Management API |
| [`@b10cks/cli`](./packages/cli) | [![npm](https://img.shields.io/npm/v/@b10cks/cli)](https://www.npmjs.com/package/@b10cks/cli) | Scaffolding, schema sync and type generation |
| [`@b10cks/mgmt-client`](./packages/mgmt-client) | [![npm](https://img.shields.io/npm/v/@b10cks/mgmt-client)](https://www.npmjs.com/package/@b10cks/mgmt-client) | Typed Management API client |

### [@b10cks/client](./packages/client)

Framework-agnostic core for the [b10cks](https://www.b10cks.com) Data API.
Expand Down Expand Up @@ -86,6 +103,57 @@ Next.js integration layer for [b10cks](https://www.b10cks.com) on top of the Rea
npm install @b10cks/next @b10cks/react @b10cks/client
```

### [@b10cks/richtext](./packages/richtext)

Framework-agnostic rich text rendering for the [b10cks](https://www.b10cks.com) rich text field.

- Renders the editor document tree to HTML
- Escapes text and attributes, sanitizes `href`/`src` URL schemes
- Pluggable resolvers for internal links and custom nodes
- No framework or DOM dependency

```bash
npm install @b10cks/richtext
```

### [@b10cks/mcp-server](./packages/mcp-server)

Model Context Protocol server that exposes the [b10cks](https://www.b10cks.com) Management API to AI
coding agents such as Claude Code, Cursor and Claude Desktop.

- Block definitions, content, redirects, data sources, releases and automations as MCP tools
- Lets an agent read and evolve your content model without hand-written glue
- Built on `@b10cks/mgmt-client`

```bash
npx @b10cks/mcp-server
```

### [@b10cks/cli](./packages/cli)

Command line interface for the [b10cks](https://www.b10cks.com) Management API.

- Project scaffolding and framework wiring (`init`, `kickstart`)
- Schema `pull` / `diff` / `push` with a lockfile
- TypeScript type generation from your block schema
- Credentials stored in `~/.netrc` with `0600` permissions

```bash
npm install -D @b10cks/cli
```

### [@b10cks/mgmt-client](./packages/mgmt-client)

Typed client for the [b10cks](https://www.b10cks.com) Management API.

- Full CRUD across spaces, blocks, content, assets and more
- Shared foundation for `@b10cks/cli` and `@b10cks/mcp-server`
- Server-side only – Management API tokens must never reach the browser

```bash
npm install @b10cks/mgmt-client
```

## πŸš€ Quick Start

### For Nuxt Projects
Expand Down Expand Up @@ -140,11 +208,13 @@ const blocks = await dataApi.getBlocks()

## πŸ“– Documentation

- [b10cks Documentation](https://docs.b10cks.com/)
- Individual package READMEs:
- [Client Package](./packages/client/README.md)
- [Vue Package](./packages/vue/README.md)
- [Nuxt Package](./packages/nuxt/README.md)
- [b10cks Documentation](https://www.b10cks.com/docs)
- Individual package READMEs: [client](./packages/client/README.md) Β·
[richtext](./packages/richtext/README.md) Β· [vue](./packages/vue/README.md) Β·
[nuxt](./packages/nuxt/README.md) Β· [react](./packages/react/README.md) Β·
[next](./packages/next/README.md) Β· [svelte](./packages/svelte/README.md) Β·
[mcp-server](./packages/mcp-server/README.md) Β· [cli](./packages/cli/README.md) Β·
[mgmt-client](./packages/mgmt-client/README.md)

## πŸ› οΈ Development

Expand Down Expand Up @@ -257,14 +327,21 @@ We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for gu

MIT – see [LICENSE](./LICENSE) for details

## πŸ” Security

Please report security vulnerabilities privately – see [SECURITY.md](./SECURITY.md). Do not open a
public issue for them.

## πŸ’¬ Support & Community

- **Discord**: [Join our community](https://discord.gg/coders_cantina)
- **Issues**: [GitHub Issues](https://github.com/b10cks/sdk/issues)
- **Discussions**: [GitHub Discussions](https://github.com/b10cks/sdk/discussions) – questions, ideas and show & tell
- **Issues**: [GitHub Issues](https://github.com/b10cks/sdk/issues) – bugs and feature requests
- **Discord**: [Join our community](https://discord.gg/mdcDktFFcp)

## πŸ”— Links

- [b10cks Website](https://discord.gg/KYWFsctk)
- [b10cks Website](https://www.b10cks.com)
- [b10cks Documentation](https://www.b10cks.com/docs)
- [GitHub Repository](https://github.com/b10cks/sdk)
- [npm Organization](https://www.npmjs.com/org/b10cks)

Expand Down
Loading