๐Ÿš€ 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.