Skip to content

Installation

Clone the repository and install dependencies:

Terminal window
git clone https://github.com/nauvalazhar/tskit.git my-app
cd my-app
bun install

Copy the example environment file:

Terminal window
cp .env.example .env

Open .env and fill in the required values. At minimum you need:

  • DATABASE_URL: your PostgreSQL connection string
  • BETTER_AUTH_SECRET: a random secret for auth sessions (generate one with openssl rand -base64 32)

See the environment variables reference for the full list, including OAuth (GitHub, Google), billing (Stripe / Polar), email (Resend / SendGrid), and storage (S3 / R2) settings.

Run database migrations to set up the schema:

Terminal window
bun run db:migrate

Optionally, seed the database with sample data for development:

Terminal window
bun run db:seed

Start the dev server:

Terminal window
bun dev

The app runs at http://localhost:3000.

The packages/ folder ships alongside the app but isn’t part of your product. None of it is required for the dev server or production build:

  • packages/docs/ — this documentation site (Astro Starlight). Delete unless you plan to host TSKit docs alongside your app.
  • packages/cli/ — the create-tskit CLI. Delete unless you’re maintaining a fork of it.
  • packages/skill/SKILL.md, a project guide that AI coding assistants (Claude Code, Cursor, etc.) read for conventions. Keep this if you use AI tools.

Workspaces use a packages/* glob, so removing individual sub-folders doesn’t require any other config changes.

The app boots without any external services. To turn specific features on, see the relevant guide:

CommandWhat it does
bun devStart dev server on port 3000
bun run buildProduction build
bun run previewPreview production build
bun testRun tests (Vitest)
bun run db:generateGenerate Drizzle migrations from schema changes
bun run db:migrateApply pending database migrations
bun run db:seedSeed database with development data
bun run auth:generateRegenerate Better Auth schema
bun run email:devStart React Email preview on port 3001
bun run uiRun Selia UI CLI to add or update components