# BaseHub
## Documentation
- [Introduction](https://docs.basehub.com/introduction): BaseHub is a fast and collaborative Headless CMS.
- [Platform Overview](https://docs.basehub.com/platform-overview): Understand the basics of the BaseHub Platform.
### Next.js Integration
- [Start Here](https://docs.basehub.com/start-here): Learn how to integrate your Next.js App with BaseHub in a couple of steps.
- [Querying Basics](https://docs.basehub.com/querying-basics): Learn how to build GraphQL queries with the generated client.
- [Rendering Rich Text](https://docs.basehub.com/rendering-rich-text): Fragments let you construct sets of fields, and then include them in queries where you need to.
- [Environments & Caching](https://docs.basehub.com/environments-and-caching): Understand the different environments and caching strategies you can leverage to improve your content editing experience.
### Extras
- [Search](https://docs.basehub.com/search): Learn how to add instant-search into your website.
- [Analytics](https://docs.basehub.com/analytics): Learn how to send analytics events from your website.
- [Webhooks](https://docs.basehub.com/webhooks): Learn how to use Webhooks to subscribe to changes that happen within BaseHub.
### Other Frameworks
- [Astro](https://docs.basehub.com/astro): Get started with Astro and BaseHub.
- [SvelteKit](https://docs.basehub.com/sveltekit): Get started with SvelteKit and BaseHub.
### External Contributions
- [Inviting Guests](https://docs.basehub.com/inviting-guests)
## API Reference
### JavaScript SDK
- [CLI](https://docs.basehub.com/cli): Generates a type-safe client based on your Repo's schema.
#### `basehub` Client
- [query](https://docs.basehub.com/query): The main method to consume data from your BaseHub repositories.
##### mutation
- [transaction](https://docs.basehub.com/transaction): The main mutation method, covers most of the modifications that can be done to the BaseHub’s schema with three different transaction types: create, update and delete.
- [transactionAwaitable](https://docs.basehub.com/transactionawaitable): Same as `transaction`, but waits until it's resolved.
- [getUploadSignedURL](https://docs.basehub.com/getuploadsignedurl): A helper to upload assets to our database.
- [transactionStatus](https://docs.basehub.com/transactionstatus): Gets the current transaction status based on its ID.
#### React
- [](https://docs.basehub.com/pump-component): A React Server Component that queries BaseHub and can subcribe to real time changes seamlessly.
- [](https://docs.basehub.com/rich-text-component): Our official rich text renderer. Supports passing custom handlers for native html elements and BaseHub components.
- [](https://docs.basehub.com/code-block-component): Easy-to-use component for rendering great code snippets.
##### Search
- [useSearch](https://docs.basehub.com/usesearch): A React hook that instantiates your Search Client.
- [](https://docs.basehub.com/search-box-component): The Search wrapper works as a provider and comes with some optional props that can come in handy.
- [](https://docs.basehub.com/search-box-input-component): Extends the native HTML Input and consumes the search context in order to fetch hits from the indexed data.
- [Hit Components](https://docs.basehub.com/hit-components): Use cases and APIReference for HitList, HitItem, HitSnippet
#### Analytics
- [sendEvent](https://docs.basehub.com/sendevent): The analytics method to send any event through BaseHub. Flexible, scoped by block.
- [getEventCount](https://docs.basehub.com/geteventcount): Analytics method to retrieve the total count of a specific event.
#### Search (core)
- [search](https://docs.basehub.com/search): Core method to perform a search query.
- [getClientRaw](https://docs.basehub.com/getclientraw): Get the raw search client.
#### Next
- [](https://docs.basehub.com/toolbar-component): The official BaseHub toolbar to manage draft mode and switch branches in your site previews.
### GraphQL API
- [Explorer](https://docs.basehub.com/explorer): Explore the GraphQL API interactively, thanks to the power of GraphiQL.
## Blocks Reference
- [Anatomy of a Block](https://docs.basehub.com/anatomy-of-a-block): You can think of your Repository as a tree of Blocks. Let's explore how this works.
### Layout Blocks
- [Root](https://docs.basehub.com/root): The root of the Tree.
- [Document](https://docs.basehub.com/document): The most common layout block in BaseHub. Think of them as directories in a file system.
- [Component](https://docs.basehub.com/component): The Component block functions as a modular structure within your repository, that can be reused across your schema.
- [Instance](https://docs.basehub.com/instance): A modular block that reuses the structure from your Components.
- [Collection](https://docs.basehub.com/collection): A powerful list of blocks that can be fully customizable.
- [Union](https://docs.basehub.com/union): Gives you the option choose between different component structures within a single block.
### Primitive Blocks
- [Text](https://docs.basehub.com/text): The default plain text input in BaseHub. Cannot contain rich text formatting.
- [Number](https://docs.basehub.com/number): The most primitive number input in BaseHub. Allows integer, float, negative and positive numbers.
- [Boolean](https://docs.basehub.com/boolean): A primitive flag input. True or false.
- [Date](https://docs.basehub.com/date): A primitive date input, with optional time.
- [Rich Text](https://docs.basehub.com/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.
- [Image](https://docs.basehub.com/image): Comes with some constraints that can make your image uploads more reliable.
- [Video](https://docs.basehub.com/video): Comes with some constraints that can make your video uploads more reliable.
- [Audio](https://docs.basehub.com/audio): Comes with some constraints that can make your audio uploads more reliable.
- [File](https://docs.basehub.com/file): Comes with some constraints that can make your file uploads more reliable.
- [Select](https://docs.basehub.com/select): Choose from a pre-defined selection of text options.
- [Reference](https://docs.basehub.com/reference): Choose from a constrained list of component types.
- [Color](https://docs.basehub.com/color): A primitive color input. Opens a palette, and lets you select every color format.
- [OG Image](https://docs.basehub.com/og-image): A lightweight OG Image editor used for social cards. Accepts variables and is fully customizable.
## Templates & Examples
### Templates
- [Introduction](https://docs.basehub.com/introduction): Know more about how templates work in the platform.
- [Marketing Website Template](https://docs.basehub.com/marketing-website-template): The perfect way to start your next marketing website.
- [Documentation Template](https://docs.basehub.com/documentation-template): The template that powers this documentation website.
- [Help Center Template](https://docs.basehub.com/help-center-template): The template that powers our own Help Center. Full-text search included.
## OpenAPI Example
OpenAPI Spec: https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml