BaseHub

docs.basehub.com
Developer Tools

BaseHub is the fastest and most flexible Headless CMS. Develop with end-to-end typesafety, write with the help of AI, and collaborate in real time with your team.

llms.txt

BaseHub

Documentation

Next.js Integration

  • Start Here: Learn how to integrate your Next.js App with BaseHub in a couple of steps.
  • Querying Basics: Learn how to build GraphQL queries with the generated client.
  • Rendering Rich Text: Fragments let you construct sets of fields, and then include them in queries where you need to.
  • Environments & Caching: Understand the different environments and caching strategies you can leverage to improve your content editing experience.

AI

  • MCP: You can use your agent tools provided by our MCP server and connect it to your favorite apps, like Claude and Cursor.
  • Agents: BaseHub Agents are AI assistants that help with content management, automated workflows, and team collaboration.
  • Workflows: Automate content generation across your repository with AI-powered workflows.

Extras

  • Search: Learn how to add instant-search into your website.
  • Analytics: Learn how to send analytics events from your website.
  • Forms: The powerful Event block lets you build a form schema from the dashboard, and consume it in code to build complex forms.
  • Webhooks: Learn how to use Webhooks to subscribe to changes that happen within BaseHub.
  • Localization: Learn how to add localization, or i18n, by using the Variants Block.

Other Frameworks

  • Astro: Get started with Astro and BaseHub.
  • SvelteKit: Get started with SvelteKit and BaseHub.

API Reference

JavaScript SDK

  • Tokens: Learn which tokens exist in BaseHub and what they are for.
  • CLI: Generates a type-safe client based on your Repo's schema.

basehub Client

  • query: The main method to consume data from your BaseHub repositories.
mutation
  • transaction: The main mutation method, covers most of the modifications that can be done to the schema with three different transaction types: create, update and delete.
  • transactionAsync: Same as transaction, but runs async—as a background job.
  • getUploadSignedURL: A helper to upload assets to our database.
  • transactionStatus: Gets the current transaction status based on its ID.

React

  • : A React Server Component that queries BaseHub and can subcribe to real time changes seamlessly.
  • : Our official rich text renderer. Supports passing custom handlers for native html elements and BaseHub components.
  • : Easy-to-use component for rendering great code snippets.
Search
  • useSearch: A React hook that instantiates your Search Client.

  • <SearchBox.Root />: The Search wrapper works as a provider and comes with some optional props that can come in handy.

  • <SearchBox.Input />: Extends the native HTML Input and consumes the search context in order to fetch hits from the indexed data.

  • Hit Components: Use cases and APIReference for HitList, HitItem, HitSnippet

  • : A vector renderer for our icon block. Supports passing custom handlers for native svg elements.

Events

  • sendEvent: The events method to send data through BaseHub. Flexible, type-safe and scoped by block.
  • getEvents: A query method to retrieve your events stored in BaseHub.
  • updateEvent: Method that allows modifying existing events by their ID.
  • deleteEvent: Method that removes one or more events by their IDs.

Search (core)

Next

  • : The official BaseHub toolbar to manage draft mode and switch branches in your site previews.

Release Notes

  • Version 9: Learn how to upgrade from v8 to v9.
  • Version 8: Learn how to upgrade from v7 to v8.

GraphQL API

  • Explorer: Explore the GraphQL API interactively, thanks to the power of GraphiQL.
  • Mutation API Guidelines: Learn how to create, update, and delete content in BaseHub using the Mutation API with detailed examples and best practices.
  • Query API Guidelines: Master GraphQL querying in BaseHub with comprehensive examples for layout and primitive blocks, filtering, ordering, and variants.

Blocks Reference

  • Anatomy of a Block: You can think of your Repository as a tree of Blocks. Let's explore how this works.

Layout Blocks

  • Root: The root of the Tree.
  • Document: The most common layout block in BaseHub. Think of them as directories in a file system.
  • Component: The Component block functions as a modular structure within your repository, that can be reused across your schema.
  • Instance: A modular block that reuses the structure from your Components.
  • Collection: A powerful list of blocks that can be fully customizable.
  • Variants: Lets you create variations of a piece of content. Useful for i18n and A/B testing.

Primitive Blocks

  • Text: The default plain text input in BaseHub. Cannot contain rich text formatting.
  • Number: The most primitive number input in BaseHub. Allows integer, float, negative and positive numbers.
  • Boolean: A primitive flag input. True or false.
  • Date: A primitive date input, with optional time.
  • Rich Text: A powerful text input that not only supports markdown syntax but also it has the possibility to have many custom components made in BaseHub.
  • Media: All kind of assets in one block. Comes with some constraints that can make your media uploads more reliable.
  • Select: Choose from a pre-defined selection of text options.
  • Reference: Choose from a constrained list of component types.
  • Color: A primitive color input. Opens a palette, and lets you select every color format.
  • OG Image: A lightweight OG Image editor used for social cards. Accepts variables and is fully customizable.
  • Event: A unique block that enables type-safe data submissions
  • Workflow: A unique block to automate actions, webhooks and notifications.
  • Icon: Provides seamless rendering of SVG elements in your application.

Templates & Examples

Templates

Examples & Guides

OpenAPI Example

OpenAPI Spec: https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml

Related

The AI Toolkit for TypeScript, from the creators of Next.js.

/llms.txt
136,985 tokens
Developer Tools

Meet the modern standard for public facing documentation. Beautiful out of the box, easy to maintain, and optimized for user engagement.

/llms.txt
5,436 tokens
/llms-full.txt
181,290 tokens
Developer Tools

Web development for the rest of us.

/llms.txt
602 tokens
/llms-full.txt
453,623 tokens
Developer Tools

Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.

/llms.txt
15,715 tokens
/llms-full.txt
588,629 tokens
Developer Tools

Build and deploy reliable background jobs with no timeouts and no infrastructure to manage.

/llms.txt
12,202 tokens
/llms-full.txt
387,586 tokens
Developer Tools

Get the simple developer experience of SQLite in production, and scale your multi-tenant backend with unlimited databases.

/llms.txt
10,006 tokens
/llms-full.txt
163,317 tokens
Developer Tools

Upstash is a serverless data platform providing low latency and high scalability for real-time applications.

/llms.txt
52,307 tokens
/llms-full.txt
1,200,134 tokens
Developer Tools

One-click deployments built for teams, tuned for Laravel, loaded with tools and goodies you're going to love.

/llms.txt
565 tokens
/llms-full.txt
11,330 tokens
Developer Tools