Skip to content

notrab/turso-platforms-starter

Repository files navigation

turso-platforms-starter

WIP

Demo

https://turso-platforms-starter.vercel.app

Quickstart

Create a parent schema database

turso db create [database-name] --type schema

Shell into the parent schema database

turso db shell [database-name]

Add a todos table to the parent schema database

CREATE TABLE todos (id INTEGER PRIMARY KEY AUTOINCREMENT, description);

Create a .env.local file in the root of the project with the following content:

# Sign up to Clerk

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=

# Create a new Clerk webhook (user.created event) with your app URL and append /webhooks/clerk

# Set the webhook secret below provided by Clerk

CLERK_WEBHOOK_SECRET=

# turso auth api-tokens mint clerk

TURSO_USER_API_TOKEN=

# your personal or organization name

TURSO_ORG_NAME=

# turso db create [database-name] --type schema

TURSO_SCHEMA_DATABASE_NAME=

# turso group tokens create <group-name>

TURSO_DATABASE_GROUP_AUTH_TOKEN=