πŸš€ Welcome to TSStarter

🎯 TSStarter - Premium TypeScript Starter for Modern Web Applications

  • ⚑ Lightning Fast - Built with Vite and TanStack for optimal performance
  • πŸ”’ Type-Safe - End-to-end type safety from database to UI
  • πŸš€ Real-Time - Live updates and collaborative features out of the box
  • πŸ€– AI-Ready - Integrated AI capabilities with Vercel AI SDK v5
  • πŸ’³ Payment Ready - Complete subscription management with Polar
  • πŸ“± Modern UI - Beautiful, accessible components with shadcn/ui
  • πŸ” Secure - Enterprise-grade authentication and security practices

πŸ—οΈ Architecture Overview

TSStarter follows a modern full-stack architecture that prioritizes type safety, real-time capabilities, and exceptional developer experience.

Core Architecture Principles

TSStarter Architecture

Complete system architecture showing the flow from client to server, database, and external services

Technology Stack

Our carefully curated tech stack ensures you're building with the best tools available:

LayerTechnologyPurpose
🎨 FrontendReact 19 + TanStack RouterType-safe routing and state management
βš™οΈ BackendTanStack Start + TypeScriptServer Routes, Server Functions, SSR
πŸ—„οΈ DatabaseSQLite (dev) / Turso (prod) + Drizzle ORMType-safe database operations
πŸ”— RPCoRPCType-safe RPC services, client calls
πŸ” AuthBetter AuthModern authentication system
⚑ Real-timeServer-Sent EventsLive updates and notifications
πŸ€– AIAnthropic Claude / OpenAIAI features
🎨 StylingTailwind CSS + shadcn/uiBeautiful, accessible UI
πŸ“§ EmailPlunkTransactional emails
πŸ’³ PaymentsPolarSubscription management

🎯 Key Features & Capabilities

TSStarter comes packed with everything you need to build modern web applications:

πŸ”’ Type-Safe Full-Stack

  • End-to-end type safety with oRPC + TanStack
  • Docs and Blog with MDX Content Collections
  • Dashboard and Analytics realtime with oRPC SSE
  • AI integration with Vercel AI SDK v5

⚑ Real-Time Capabilities

  • Live task updates via Server-Sent Events
  • Real-time notifications for mentions and shares
  • Instant UI updates without page refreshes
  • Collaborative features with live data sync

πŸ‘₯ Advanced User Management

  • OAuth integration (GitHub, Google)
  • Email verification with secure tokens
  • Password reset functionality
  • User profiles and preferences

πŸ’³ Payment Integration

  • Subscription management with Polar
  • Secure payment processing
  • Webhook handling for payment events
  • Usage-based billing support

πŸ›οΈ Project Structure

tsstarter/
β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ 🧩 components/           # React components
β”‚   β”‚   β”œβ”€β”€ ui/                 # Reusable UI components (shadcn/ui)
β”‚   β”‚   └── app/                # All application components
β”‚   β”œβ”€β”€ πŸ—„οΈ db/                  # Database layer
β”‚   β”‚   β”œβ”€β”€ schema.ts           # Drizzle schema definitions
β”‚   β”‚   └── migrate.ts          # Database migrations
β”‚   β”œβ”€β”€ πŸ”§ lib/                 # Shared utilities
β”‚   β”‚   β”œβ”€β”€ auth/               # Authentication logic
β”‚   β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ orpc.ts             # oRPC client configuration
β”‚   β”‚   └── utils.ts            # Helper functions
β”‚   β”œβ”€β”€ πŸ›£οΈ routes/              # Application routes
β”‚   β”‚   β”œβ”€β”€ _authed/            # Protected routes
β”‚   β”‚   β”œβ”€β”€ api/                # API endpoints
β”‚   β”‚   └── __root.tsx          # Root layout
β”‚   β”œβ”€β”€ πŸ–₯️ server/              # Server-side code
β”‚   β”‚   β”œβ”€β”€ routes/             # oRPC procedures
β”‚   β”‚   β”œβ”€β”€ handler.ts          # Request handler
β”‚   β”‚   └── orpc.ts             # oRPC server setup
β”‚   └── 🎨 styles.css           # Global styles
β”œβ”€β”€ πŸ“ content/                 # MDX content
β”‚   β”œβ”€β”€ blog/                   # Blog posts
β”‚   └── docs/                   # Documentation
β”œβ”€β”€ πŸ“ drizzle/                 # Database migrations
β”œβ”€β”€ πŸ“ public/                  # Static assets
└── πŸ“„ Configuration files

πŸ”§ Development Experience

πŸš€ Hot Reload & Fast Refresh

  • Instant updates during development
  • Type checking in real-time
  • Error overlay with detailed messages
  • Fast build times with Vite

πŸ› οΈ Developer Tools

  • ESLint for code quality
  • Prettier for consistent formatting
  • TypeScript for type safety
  • Vitest for testing
  • Drizzle Studio for database management

🎨 UI/UX Design System

Modern Design Principles

  • Accessibility first with ARIA labels
  • Responsive design for all devices
  • Dark mode support with system preference
  • Smooth animations and transitions

Component Library

  • shadcn/ui for consistent components
  • Tailwind CSS for utility-first styling
  • Custom components for specific needs
  • Icon system with Lucide React

πŸ” Security Features

Authentication & Authorization

  • Better Auth with secure session management
  • OAuth providers (GitHub, Google) integration
  • Session-based authentication with secure cookies
  • Input validation with Zod schemas
  • Protected API routes with authentication middleware
  • CSRF (Cross-Site Request Forgery) protection

Data Protection

  • Environment variables for sensitive data with Zod validation
  • Type-safe configuration with @t3-oss/env-core
  • Secure session management with Better Auth
  • Database connection with authentication tokens (Turso)

πŸš€ Deployment Ready

Platform Support

  • Vercel - Zero-config deployment
  • Netlify - Zero-config deployment
  • Railway - Full-stack hosting

πŸ“š Getting Started

Ready to dive in? Check out our comprehensive getting started guide to set up your first TSStarter project.

Get Started β†’


TSStarter is designed to help developers build production-ready applications faster, with better type safety, and exceptional developer experience.