Skip to main content
The BoxpressdProvider is the foundation of every Boxpressd Sites SDK application. It establishes authentication, resolves the business context associated with your API key, provides theme configuration, and enables all Boxpressd components and data APIs throughout your application. Every application using the SDK should wrap its component tree with a single provider instance.

Basic Usage

At minimum, provide your Boxpressd API key:
The provider will automatically:
  • Authenticate with Boxpressd
  • Resolve the business context
  • Determine the business type
  • Configure data access
  • Enable SDK components and hooks

Environment Variables

Store your API key in an environment variable rather than hardcoding it in your application.

How Business Context Resolution Works

When the provider initializes, the SDK automatically determines which business should be loaded. For example:
or
This process happens automatically and does not require any additional configuration. Because the business context is derived from the API key, developers do not need to manually specify:
  • Venue IDs
  • Brand IDs
  • Business IDs
  • Custom API endpoints

Provider Placement

The provider should typically be mounted once near the root of your application.

Next.js App Router

React

Custom API Endpoint

By default, the SDK connects to the production Boxpressd API.
In development or testing environments, you may provide a custom API base URL.

Theme Configuration

The provider supports global theme customization.
Theme values are merged with the SDK defaults. This allows you to customize Boxpressd components while maintaining a consistent user experience.

Theme Example

CSS Variable Overrides

In addition to provider-level theme options, all Boxpressd components expose CSS variables prefixed with:
Example:
This allows SDK components to seamlessly match your site’s existing design system.

Using SDK Components

Once the provider is configured, all Boxpressd components can access the resolved business context automatically.
No business identifiers are required. The component automatically loads data for the business associated with the configured API key.

Best Practices

Use a Single Provider

Most websites should only use one provider instance.

Store Keys in Environment Variables

Avoid hardcoding API keys directly into source code.

Configure Theme Globally

Apply theme settings at the provider level instead of styling individual components whenever possible.

Troubleshooting

Components Show No Data

Verify:
  • The API key is valid
  • The provider is mounted correctly
  • The business contains published content
  • The environment variable is available at runtime

Authentication Errors

Verify:
  • The API key has not been revoked
  • The API key belongs to the expected business
  • The correct environment variable is being used

Theme Changes Not Appearing

Verify:
  • The provider is wrapping the component tree
  • CSS variable overrides are loaded after SDK styles
  • Theme values are valid CSS values

Next Steps

Now that the provider is configured, continue to:
  • Business Context
  • Business Types
  • Theming
  • Components Overview
These guides explain how business data is resolved and how to build rich Boxpressd-powered experiences.