Installation
Prerequisites
Section titled “Prerequisites”- Bun v1.0 or later
- PostgreSQL database
Clone the repository and install dependencies:
git clone https://github.com/nauvalazhar/tskit.git my-appcd my-appbun installCopy the example environment file:
cp .env.example .envOpen .env and fill in the required values. At minimum you need:
DATABASE_URL: your PostgreSQL connection stringBETTER_AUTH_SECRET: a random secret for auth sessions (generate one withopenssl 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:
bun run db:migrateOptionally, seed the database with sample data for development:
bun run db:seedStart the dev server:
bun devThe app runs at http://localhost:3000.
Cleaning up
Section titled “Cleaning up”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/— thecreate-tskitCLI. 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.
Configuring services
Section titled “Configuring services”The app boots without any external services. To turn specific features on, see the relevant guide:
- Billing: Stripe or Polar
- Email: Resend or SendGrid
- Storage: S3 or Cloudflare R2
- Authentication: GitHub and Google OAuth
Scripts
Section titled “Scripts”| Command | What it does |
|---|---|
bun dev | Start dev server on port 3000 |
bun run build | Production build |
bun run preview | Preview production build |
bun test | Run tests (Vitest) |
bun run db:generate | Generate Drizzle migrations from schema changes |
bun run db:migrate | Apply pending database migrations |
bun run db:seed | Seed database with development data |
bun run auth:generate | Regenerate Better Auth schema |
bun run email:dev | Start React Email preview on port 3001 |
bun run ui | Run Selia UI CLI to add or update components |