← Back to Sporekit

Documentation

Start with working auth. Keep the code.

Every fresh starter gives you editable authentication UI, server logic, database setup, and selected social providers. Configure the generated environment values, run the database migration, and customize the project as your own.

Quick start

  1. Run npx create-sporekit@latest init in a parent folder or empty directory.
  2. On first use, run npx create-sporekit@latest login and approve the device in your browser. An active license supports up to three devices, with each device authorization valid for 30 days.
  3. Select a framework, starter type, and one or more social providers.
  4. Copy .env.example to .env and enter your database and provider credentials.
  5. Run the generated database command, then start the project with its dev script.

Framework starters

Next.js

Full Better Auth and Prisma starter with sign-up, sign-in, social providers, a protected dashboard, and sign-out.

Keeps your routes intact. Choose the optional demo to add it at /sporekit-demo.

npx create-sporekit@latest init --template next

Vite React

React client plus a contained Express, Better Auth, and Prisma server/ folder. pnpm dev starts both.

Adds only an opt-in client component in src/sporekit-auth and uses your existing auth-server URL.

npx create-sporekit@latest init --template vite

TanStack Start

Native Better Auth and Prisma server routes with a protected dashboard and account screens.

Adds only an opt-in client component in src/sporekit-auth and never replaces app routes.

npx create-sporekit@latest init --template tanstack-start

Laravel

Laravel session authentication with Blade screens, selected Socialite providers, dashboard, and sign-out.

Writes reviewable files under sporekit-auth/ for you to integrate; it does not overwrite routes or views.

npx create-sporekit@latest init --template laravel

Expo

Expo client with SecureStore sessions and a contained Express, Better Auth, and Prisma server.

Adds only an opt-in sporekit-auth client component connected to the auth URL you provide.

npx create-sporekit@latest init --template react-native

Astro

Astro SSR with the Node adapter, Better Auth API route, Prisma, protected dashboard, and sign-out.

Adds only an opt-in client helper in src/sporekit-auth and leaves routes and middleware alone.

npx create-sporekit@latest init --template astro

Database and provider setup

Fresh JavaScript starters include Prisma commands. Run pnpm db:generate, review the generated migration, and run pnpm db:migrate after settingDATABASE_URL. Laravel starters use php artisan migrate.

Add the generated Google and Apple client credentials to .env. Register the callback URLs displayed by your generated project with each provider before testing social sign-in. Expo projects must use an authentication server URL reachable from the device or emulator.

Workspaces and safe installs

Fresh Next.js and Vite projects can use --monorepo; Sporekit creates the app at <project-name>/apps/web. Other framework workspaces are intentionally not generated yet. Existing projects are always handled as safe integrations and are never replaced by the initializer.

Before you ship