Skip to content

palaogluserdest/gsp-create-react-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Create GSP React Template

πŸš€ The Ultimate React Project Generator

A comprehensive CLI tool that creates production-ready React applications with intelligent 4-step template selection. Choose your language, routing & forms, state management, and styling approach through an interactive guided experience.

Built by: Serdest PALAOGLU
Assisted by: GitHub Copilot & Claude Sonnet 3.5 for quality control and testing

πŸš€ Quick Start

# Using npx (recommended)
npx create-gsp-react my-app

# Install to current directory
npx create-gsp-react .

# Or install globally
npm install -g create-gsp-react
create-gsp-react my-app

🎯 4-Step Interactive Template Selection

🌐 Step 1: Choose Language

  • JavaScript - Modern ES2024+ with React 19 and Vite
  • TypeScript - Full type safety with advanced TypeScript features

🧭 Step 2: Choose Router + Forms

  • React Router + Formik + Yup - Battle-tested routing and form validation
  • React Router + React Hook Form + Zod - Modern forms with TypeScript-first validation (v1.3.0)

πŸ—‚οΈ Step 3: Choose State Management

  • No State Management - Pure React with useState/useEffect
  • Context API - Built-in React Context for global state
  • Zustand - Lightweight state management with minimal boilerplate (v1.2.0)
  • React Query (TanStack) - Server state management with caching (v1.2.0)

🎨 Step 4: Choose Styling

  • Vanilla CSS - Modern CSS with Sass preprocessing
  • Tailwind CSS - Utility-first CSS framework
  • Tailwind CSS + ShadcnUI - Beautiful, accessible UI components

πŸ“Š Template Matrix

Version Templates Available Combinations
v1.1.1 (Current) 6 templates 2 languages Γ— 3 styling options
v1.2.0 (Coming Soon) 24 templates 2 languages Γ— 4 state management Γ— 3 styling
v1.3.0 (Planned) 48+ templates + React Hook Form + Husky/Commitlint

πŸ› οΈ What's Included

Core Features (All Templates)

  • βš›οΈ React 19 - Latest React with concurrent features
  • ⚑ Vite - Lightning fast development and build tool
  • 🧭 React Router 7 - Modern declarative routing with data API
  • 🎨 Sass - CSS preprocessing with organized architecture
  • πŸ” ESLint - Code quality and consistency
  • πŸ“± Responsive Design - Mobile-first approach
  • πŸ—οΈ Component Architecture - Well-organized folder structure

Form Handling Options

Current (v1.1.0):

  • πŸ“ Formik + Yup - Traditional, battle-tested form handling with schema validation

Coming (v1.2.0):

  • 🎯 React Hook Form + Zod - Modern, performant forms with TypeScript-first validation

State Management Options

Available (v1.2.1):

  • 🚫 None - Use React's built-in state (useState, useEffect, useContext)
  • πŸ”„ Context API - React's built-in state management with useReducer pattern
  • 🐻 Zustand - Lightweight, modern state management with minimal boilerplate
  • πŸ” React Query (TanStack Query) - Server state management with intelligent caching, background updates, and data synchronization

TypeScript Templates Include

  • πŸ“˜ TypeScript 5.2+ - Type safety and better DX
  • πŸ”§ Proper TypeScript configs - Optimized for React & Vite

Tailwind Templates Include

  • 🎨 Tailwind CSS - Utility-first CSS framework
  • πŸ“¦ PostCSS - CSS processing pipeline
  • 🎯 Custom Tailwind config - Pre-configured with design tokens

ShadcnUI Templates Include

  • 🎯 ShadcnUI - Beautiful, accessible components
  • 🧩 Pre-built components - Button, Input, and more
  • πŸ”§ Component utilities - cn() helper function
  • πŸ“‹ components.json - ShadcnUI configuration

πŸ“ Project Structure

my-app/
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   β”œβ”€β”€ admin/         # Admin-specific components
β”‚   β”‚   β”œβ”€β”€ main/          # Main app components
β”‚   β”‚   └── ui/            # Reusable UI components (ShadcnUI templates)
β”‚   β”œβ”€β”€ Layouts/           # Page layouts
β”‚   β”œβ”€β”€ hooks/             # Custom React hooks
β”‚   β”œβ”€β”€ libs/              # Utility functions
β”‚   β”œβ”€β”€ styles/            # Global styles and SCSS
β”‚   └── utils/             # Router and utilities
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.{js|ts}
β”œβ”€β”€ tailwind.config.js     # (Tailwind templates)
β”œβ”€β”€ components.json        # (ShadcnUI templates)
└── tsconfig.json          # (TypeScript templates)

🎯 Usage Examples

Interactive Mode (Recommended) ✨

npx create-gsp-react my-app
# Follow the 4-step guided selection:
# 1. 🌐 Language: JavaScript or TypeScript
# 2. 🧭 Router + Forms: Formik+Yup or React Hook Form+Zod
# 3. πŸ—‚οΈ State Management: None, Context API, Zustand, or React Query
# 4. 🎨 Styling: Vanilla CSS, Tailwind CSS, or ShadcnUI

Direct Template Selection

# Current templates (v1.1.1)
npx create-gsp-react my-app --template javascript-tailwind
npx create-gsp-react my-app --template typescript-shadcn

# Future templates (v1.2.0)
npx create-gsp-react my-app --template javascript-zustand-tailwind
npx create-gsp-react my-app --template typescript-query-shadcn

πŸ—ΊοΈ Development Roadmap

🎯 v1.2.0 - State Management Integration

  • βœ… Zustand Templates - Lightweight state with TypeScript support
  • βœ… React Query Templates - Server state management with caching
  • βœ… Context API Templates - Built-in React global state
  • βœ… Store Examples - Pre-built store patterns and utilities
  • βœ… Documentation - State management guides and best practices

🎯 v1.3.0 - Advanced Developer Experience

  • πŸ”„ React Hook Form + Zod - Modern form handling templates
  • πŸ”„ Husky + Commitlint - Git hooks and commit message linting
  • πŸ”„ Advanced TypeScript - Strict mode and advanced type patterns
  • πŸ”„ Testing Setup - Vitest + React Testing Library
  • πŸ”„ GitHub Actions - CI/CD workflow templates

🎯 v1.4.0 - Enterprise Features

  • πŸ”„ Monorepo Support - Nx/Turbo integration
  • πŸ”„ Docker Support - Production-ready containerization
  • πŸ”„ Storybook Integration - Component documentation
  • πŸ”„ Internationalization - i18n setup and examples

Coming in v1.2.0:

  • javascript-rhf - JS + React Router + React Hook Form+Zod + Vanilla CSS
  • typescript-rhf - TS + React Router + React Hook Form+Zod + Vanilla CSS
  • javascript-rhf-tailwind - JS + React Router + React Hook Form+Zod + Tailwind CSS
  • typescript-rhf-tailwind - TS + React Router + React Hook Form+Zod + Tailwind CSS
  • javascript-rhf-shadcn - JS + React Router + React Hook Form+Zod + ShadcnUI
  • typescript-rhf-shadcn - TS + React Router + React Hook Form+Zod + ShadcnUI

πŸš€ After Project Creation

cd my-app
npm install
npm run dev

Your app will be running at http://localhost:5173

🌍 What You Get

  • Main Layout - Available at / with navigation
  • Admin Layout - Available at /admin with admin panel
  • Responsive Design - Works on all devices
  • Development Server - Hot reload and fast refresh
  • Production Ready - Optimized build with Vite

πŸ“œ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

πŸ”§ Customization

Adding ShadcnUI Components (ShadcnUI templates)

npx shadcn-ui@latest add button
npx shadcn-ui@latest add input
npx shadcn-ui@latest add card

Tailwind Configuration (Tailwind/ShadcnUI templates)

Edit tailwind.config.js to customize your design system:

module.exports = {
  theme: {
    extend: {
      colors: {
        primary: {
          500: "#3b82f6",
          600: "#2563eb",
        },
      },
    },
  },
};

πŸ‘¨β€πŸ’» Project Credits

Primary Developer & Architect: Serdest PALAOGLU

  • πŸ—οΈ Project Architecture - Complete system design and implementation
  • πŸ› οΈ Core Development - CLI tool, template system, and nested menu logic
  • πŸ“¦ Template Creation - All React template variants and configurations
  • 🎯 Product Vision - Feature planning and roadmap development

AI Development Assistance:

  • οΏ½ GitHub Copilot - Code completion and development acceleration
  • 🧠 Claude Sonnet 3.5 - Quality control, testing assistance, and code review

This project showcases the powerful combination of human creativity and AI assistance in modern software development.

�🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

MIT Β© GSP Team

πŸ™ Acknowledgments

About

Basic template to start React.js development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published