The NextKit SDK
The NextKit SDK is a simple API for your NextKit projects. It allows you to easily interact with the NextKit core entities
The NextKit SDK is a simple API for your NextKit projects. It allows you to easily interact with the NextKit core entities, such as: Users, Organizations, Subscriptions and Memberships.
As you build your application, you will need to interact with the core entities. The SDK provides a simple way to do that.
This is a Preview
The NextKit SDK is still unreleased. It is currently in preview and is subject to change. We are working hard to make it available as soon as possible.
Usage
Initializing the SDK is simple. You will need to provide any of the Supabase Server clients - depending on where you are using the SDK (route, server component or server action).
Server Components
In the example below, we initialize the SDK in a Server Component
Server Actions
In the example below, we initialize the SDK in a Server Action
Route Handlers
In the example below, we initialize the SDK in a Route Handler
Client Side
You may also initialize the SDK on the client side - but bear in mind some API are not going to work in non-server environments. This is useful if you need to interact with the core entities on the client side.