πŸš€ Getting Started

Documentation
Guide

πŸš€ Getting Started

Complete guide to set up and run TSStarter locally with core features configured

Documentation
Guide
0 Pages
Available

Quick Start

1. Access Your Repository

After purchasing TSStarter, you'll get access to the starter.

git clone https://github.com/tsstarter/tsstarter your-project-name
cd your-project-name

2. Install Dependencies

bun install

3. Set Up Environment Variables

Copy the example environment file and configure it:

cp env.example .env

Edit .env and configure the following variables:

Required Variables

# Use this command to generate (openssl rand -base64 32)
BETTER_AUTH_SECRET=your-secret-key-here
CSRF_SECRET=your-csrf-secret-key-here

# Database - Use SQLite for local development
DATABASE_URL=file:./local.db

# Development Servers
BASE_URL=http://localhost:3000
VITE_BASE_URL=http://localhost:3000

# Google OAuth
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

4. Configure Local Database

For local development, the database is already configured to use SQLite. Check the drizzle.config.ts for details:

5. Set Up the Database

# Generate migration files
bun run db:generate

# Push schema to database
bun run db:push

6. Start the Development Server

bun run dev

Your application will be available at http://localhost:3000.

Optional Configuration

1. AI Integration

# AI Providers
ANTHROPIC_API_KEY=your-anthropic-api-key

2. Payment Integration (Polar)

# Polar Payments
VITE_POLAR_SUCCESS_URL=http://localhost:3000/payment/success
POLAR_WEBHOOK_SECRET=your-polar-webhook-secret

# Tier 1 (High PPP) - No discount
VITE_POLAR_TIER1_YEARLY_CHECKOUT_URL=https://sandbox.polar.sh/checkout/your-tier1-yearly-link
VITE_POLAR_TIER1_LIFETIME_CHECKOUT_URL=https://sandbox.polar.sh/checkout/your-tier1-lifetime-link

# Tier 2 (Medium PPP) - 30% discount
VITE_POLAR_TIER2_YEARLY_CHECKOUT_URL=https://sandbox.polar.sh/checkout/your-tier2-yearly-link
VITE_POLAR_TIER2_LIFETIME_CHECKOUT_URL=https://sandbox.polar.sh/checkout/your-tier2-lifetime-link

# Tier 3 (Lower PPP) - 50% discount
VITE_POLAR_TIER3_YEARLY_CHECKOUT_URL=https://sandbox.polar.sh/checkout/your-tier3-yearly-link
VITE_POLAR_TIER3_LIFETIME_CHECKOUT_URL=https://sandbox.polar.sh/checkout/your-tier3-lifetime-link

Getting Help

Happy coding! πŸš€