Architecture
How It Works

How React Kickstart Works

A comprehensive look at React Kickstart's architecture, execution flow, and internal mechanisms.

🎯 React Kickstart in a Nutshell

React Kickstart is a fast, opinionated CLI that scaffolds React applications with your preferred framework and stackβ€”then installs dependencies, configures everything, and optionally starts the development server.

Philosophy: Zero configuration, maximum productivity. Get from idea to running application in under 30 seconds.


⚑ What It Does

Interactive Configuration

Prompts you for framework and technology choices through a beautiful CLI interface.

Project Generation

Generates a complete, ready-to-run project with files, configurations, and scripts.

Dependency Management

Installs all necessary dependencies and can auto-start the development server.

Summary & Next Steps

Provides a clear summary with next steps and documentation links.


πŸ—οΈ Architecture Overview

React Kickstart follows a modular, extensible architecture with clear separation of concerns:


πŸ”„ Execution Flow

1. CLI Entry Point
   ↓
2. Prompt Flow (Interactive/Non-Interactive)
   ↓
3. Generator Selection (Vite/Next.js)
   ↓
4. Project Generation
   ↓
5. Dependency Installation
   ↓
6. Post-Processing & Summary

πŸ› οΈ Key Components

Generators

Framework-specific generators that handle project creation:

  • ViteGenerator - Fast development with instant HMR
  • NextjsGenerator - Full-stack React framework
  • BaseGenerator - Shared functionality and interface

Builders

Utility classes that create configuration files:

  • ConfigurationBuilder - Framework configs (vite.config.js, next.config.js)
  • PackageJsonBuilder - Dependencies and scripts
  • DependencyResolver - Smart dependency management

Features

Modular feature integrations:

  • StylingFeature - Tailwind, styled-components, CSS
  • RoutingFeature - React Router, Next.js routing
  • StateFeature - Redux Toolkit, Zustand
  • APIFeature - Axios, Fetch, React Query
  • TestingFeature - Vitest, Jest

Templates

Code generation templates:

  • Framework Templates - App.tsx, main.tsx variations
  • Feature Templates - Component examples, store setup
  • Configuration Templates - Config file templates

πŸŽ›οΈ Supported Technology Stack

πŸ—οΈ Frameworks

  • β€’ Vite - Lightning-fast development
  • β€’ Next.js - Full-stack React framework

πŸ“ Languages

  • β€’ TypeScript - Type-safe development
  • β€’ JavaScript - Traditional approach

🎨 Styling

  • β€’ Tailwind CSS - Utility-first framework
  • β€’ styled-components - CSS-in-JS
  • β€’ CSS - Plain CSS files

🧭 Routing

  • β€’ React Router - Client-side routing (Vite)
  • β€’ Next.js App Router - File-based routing
  • β€’ Next.js Pages Router - Traditional routing

πŸ—ƒοΈ State Management

  • β€’ Redux Toolkit - Powerful state management
  • β€’ Zustand - Lightweight state management
  • β€’ None - React built-in state

🌐 API Integration

  • β€’ Axios + React Query - HTTP + caching
  • β€’ Fetch + React Query - Native + caching
  • β€’ Axios only - HTTP client only
  • β€’ Fetch only - Native fetch only

πŸ§ͺ Testing

  • β€’ Vitest - Fast, modern testing
  • β€’ Jest - Traditional, mature testing
  • β€’ None - No testing setup

πŸš€ Deployment

  • β€’ Vercel - Optimized for React/Next.js
  • β€’ Netlify - Great for static sites
  • β€’ None - Manual deployment

πŸ”§ Extending React Kickstart

Want to add a new framework? See the Adding a New Framework guide for a complete checklist.

Quick Extension Overview

  1. Implement Generator - Create *-generator.js extending BaseGenerator
  2. Register Framework - Add case in src/generators/index.js
  3. Add to Prompts - Include in src/prompts/steps/framework-step.js
  4. Wire Dependencies - Update src/builders/* for deps and scripts
  5. Update QA Matrix - Include in automated testing

πŸ§ͺ Quality Assurance

React Kickstart includes comprehensive QA automation to ensure reliability across all combinations:

# Generate test matrix
node qa-automation/test-matrix-generator.js
 
# Run critical tests (most important combinations)
node qa-automation/test-runner.js critical 10
 
# Run standard tests (common combinations)
node qa-automation/test-runner.js standard 25
 
# Run edge case tests (unusual combinations)
node qa-automation/test-runner.js edge 15

QA Coverage: Every framework/feature combination is automatically tested to ensure compatibility and prevent regressions.


πŸ“š Next Steps

Dive Deeper:

Get Involved: