Getting Started
Build a production app with Start Labs in under 10 minutes.
Prerequisites
- Node.js 20+ — nodejs.org
- pnpm 10+ —
npm install -g pnpm - PostgreSQL running on port
5440 - Redis running on port
6400
Quick setup with Docker (recommended)
# Start PostgreSQL + Redis
docker run -d --name sl-postgres -p 5440:5432 -e POSTGRES_PASSWORD=postgres postgres:16-alpine
docker run -d --name sl-redis -p 6400:6379 redis:7-alpine 1. Create your app
npx create-startlabs my-app --template saas-starter
cd my-app
pnpm install This scaffolds a complete SaaS application with authentication (email + social login, MFA, organizations), billing (Stripe subscriptions, customer portal), admin panel (user management, feature flags, audit log), and settings (profile, security, team, billing, notifications).
2. Configure environment
cp .env.example .env Open .env and fill in the required values:
# Required
DATABASE_URL=postgresql://postgres:postgres@localhost:5440/my_app
BETTER_AUTH_SECRET=generate-a-random-32-char-string-here
# Optional
STRIPE_SECRET_KEY=sk_test_...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=... Create the database:
docker exec sl-postgres createdb -U postgres my_app 3. Set up the database
pnpm db:generate # Generate migration SQL from schemas
pnpm db:migrate # Apply migrations to your database This creates all the tables your app needs, namespaced by module:
sl_auth.*— users, sessions, accounts, organizations, rolessl_payments.*— subscriptions, invoices, customerssl_log.*— audit trailsl_notify.*— notifications, preferences, templates
4. Start development
pnpm dev Two servers start:
API server
http://localhost:3020 — Fastify backend with all module routes
Web frontend
http://localhost:3021 — React frontend with Vite HMR
5. Explore what you built
Sign up
Go to /signup, create an account. You'll land on the dashboard with an onboarding checklist.
Dashboard
Stats, recent activity, and quick actions. The sidebar has navigation to every section.
Settings
Six tabs: Profile, Security, Team, Billing, Notifications, Danger Zone. Each wired to real API endpoints.
Admin
User management, feature flags, and the audit log showing every action taken in the system.
6. Add a module
Want to add booking to your SaaS? One import, one line:
// src/server.ts
import { bookingModule } from '@startlabs/booking';
const { app } = await createServer({
modules: [
dbModule,
authModule,
paymentsModule,
bookingModule, // new
],
}); Restart the dev server. You now have booking services, providers, and appointments API routes with availability and conflict detection.
7. Seed test data
pnpm seed Creates test users, sample content, and demo data so you can see the app in action without manually creating everything.
8. Deploy
# Build for production
pnpm build
# Start production server
pnpm start
# Or deploy to Railway
git push railway main Templates ship with Docker and Railway configs. Push to your Railway project and it handles the rest.
Project structure
my-app/
src/
server.ts # API entry point — modules registered here
db.ts # Drizzle database client
env.ts # Typed environment variables
app/
app.tsx # React app root with providers
router.tsx # Client-side routing
pages/ # All page components
styles/ # Global CSS with design tokens
drizzle/
schema.ts # Unified schema (re-exports from all modules)
migrations/ # Generated SQL migrations
docker-compose.yml
drizzle.config.ts
vite.config.ts
theme.config.ts # App branding (colors, name, mode) Available templates
| Template | Ports | What's included |
|---|---|---|
saas-starter | 3020/3021 | Auth, billing, teams, admin, settings |
marketplace | 3010/3011 | Listings, orders, reviews, Stripe Connect |
booking | 3030/3031 | Calendar, services, availability, appointments |
ai-chat | 3040/3041 | Conversations, RAG, streaming, credit billing |
ecommerce | 3050/3051 | Products, cart, checkout, inventory |
course | 3060/3061 | Courses, lessons, quizzes, certificates |
crm-pipeline | 3070/3071 | Contacts, deals, pipeline, email |
directory | 3080/3081 | Profiles, search, reviews, featured |
support-portal | 3090/3091 | Tickets, live chat, knowledge base |
admin-panel | 3100/3101 | Data tables, RBAC, audit log |
newsletter | 3110/3111 | Subscribers, posts, paid tiers |
mobile-starter | 8081 | Expo app with native modules |
Next steps
Describe it. Build it. Ship it.
World-class apps in seconds. Not hours. Not days. Seconds.
Free to try · No signup required · Open source