A comprehensive, production-ready React template built with modern tools and best practices for scalable web applications.
- β‘ Vite 7.0 - Lightning fast build tool with HMR and enhanced optimization
- βοΈ React 19.1 - Latest React with concurrent features and improved performance
- π― TypeScript 5.8 - Full type safety with latest language features
- π¨ Panda CSS 0.54 - Zero-runtime CSS-in-JS with design tokens and atomic styles
- π§ React Router 7.6 - Enhanced routing with framework mode, data loading capabilities, and file-based routing
- π TanStack Query 5.83 - Powerful data fetching, caching, and synchronization
- π React Hook Form - Enhanced form management with custom field registration and scrolling
- π§Ή ESLint 9 - Modern linting with flat config and TypeScript support
- π§ Express 5.1 - SSR, API support, and production-ready middleware
- π SSL/HTTPS - Secure development environment with auto-generated certificates
- π¦ Modular Architecture - Clean, scalable project structure with separation of concerns
- π SWC Compiler - Fast TypeScript/JavaScript compilation via Vite plugin
- π οΈ Development Tools - Hot reload, TypeScript paths, and modern dev experience
- π― Git Hooks - Automated code quality checks with Husky
- π Conventional Commits - Enforced commit message standards with Commitlint
- π Package Initialization - Smart package.json initialization with environment-based naming
- π Multi-Environment Support - Comprehensive environment configuration for development, staging, UAT, and production
- React 19.1 - Latest UI library with concurrent features, automatic batching, and improved hydration
- TypeScript 5.8 - Type-safe JavaScript with latest language features
- Vite 7.0 - Next-generation build tool with instant HMR and optimized production builds
- Panda CSS 0.54 - Zero-runtime CSS-in-JS with design tokens, utility classes, and component variants
- PostCSS 8.5 - Modern CSS processing with autoprefixer and optimization
- React Router 7.6 - Declarative routing with framework mode, data loading and streaming capabilities
- TanStack Query 5.83 - Server state management with caching, background updates, and optimistic updates
- TanStack Query DevTools - Development tools for debugging queries
- React Hook Form - Performant forms with easy validation and enhanced field management
- Ky 1.8 - Modern, lightweight HTTP client with automatic retries
- ESLint 9 - Code linting with flat config and TypeScript rules
- TypeScript ESLint 8.34 - Advanced TypeScript-specific linting rules
- SWC 3.10 - Fast TypeScript/JavaScript compiler via Vite plugin
- TSX 4.20 - TypeScript execution for build scripts
- Husky 9.1 - Git hooks for automated code quality checks
- Commitlint 19.8 - Conventional commit message linting and enforcement
- Lint-staged 16.1 - Run linters on staged files only for faster commits
- Dependabot - Automated dependency updates via GitHub
- Express 5.1 - Node.js server framework with middleware support
- @react-router/express 7.7 - React Router Express integration for SSR
- @react-router/node 7.7 - React Router Node.js utilities and adapters
- Cookie Parser 1.4 - Secure cookie handling and parsing
- CORS 2.8 - Cross-Origin Resource Sharing middleware
- Compression 1.8 - Response compression for better performance
- Sirv 3.0 - Static file serving for production
- Dotenv 17.0 - Environment variable management
- Humps 2.0 - String case conversion utilities
- Query String 9.2 - URL query string parsing and stringifying
- Minimatch 10.0 - Glob pattern matching
- Isbot 5 - User agent bot detection for SSR optimization
- Node Fetch 3.3 - Fetch API implementation for Node.js environments
- Node.js 18+ (LTS recommended)
- Yarn (recommended) or npm or pnpm
-
Clone or download this template:
git clone <repository-url> cd react-vite-template
-
Set up environment variables:
# Copy the environment template cp .env.example .env # Edit .env file and set required variables VITE_APP_NAME=your-app-name DEV_HOST=localhost # ... other variables as needed
-
Install dependencies:
# Using Yarn (recommended) yarn install # Using npm npm install # Using pnpm pnpm install
Note: The
postinstallscript will automatically initialize your package.json with theVITE_APP_NAMEfrom your environment variables. -
Generate SSL certificates (optional for HTTPS):
yarn certs:generate
-
Start development server:
yarn dev
-
Open your browser: The app will be available via the custom development script (check console for URL)
Note: Panda CSS files are automatically generated when you run
yarn install(via thepostinstallscript) and during build processes. The package initialization script will also set up your package.json with the correct app name from environment variables, so no manual initialization is required!
yarn dev- Start development server with Panda CSS watch mode using custom prepare-app scriptyarn prepare- Setup Husky Git hooks (runs automatically on install)yarn postinstall- Initialize package.json with environment-based app nameyarn init-pkg- Force re-initialization of package.json (use with --force flag)
yarn build- Build for production (TypeScript compilation + Panda CSS generation + React Router build)
yarn preview- Preview production build using dev script with --preview flag
yarn lint- Run ESLint for code quality and style checking
yarn certs:generate- Generate SSL certificates for HTTPS developmentyarn init-pkg- Initialize package.json with app name from environment variables
react-vite-template/
βββ .github/ # GitHub configuration
β βββ dependabot.yml # Dependabot configuration for dependency updates
βββ .husky/ # Git hooks configuration
β βββ commit-msg # Commit message validation
β βββ pre-commit # Pre-commit linting
βββ public/ # Static assets
β βββ vite.svg # Vite logo
βββ src/ # Source code
β βββ @types/ # TypeScript type definitions
β β βββ abort-controller-polyfill.d.ts
β β βββ global.d.ts
β β βββ react-query.d.ts
β β βββ react-router.d.ts
β β βββ vite-env.d.ts
β βββ components/ # Reusable UI components
β β βββ elements/ # Basic UI elements
β β βββ layouts/ # Layout components
β β βββ modules/ # Feature-specific components
β β β βββ home/ # Home page components
β β βββ shapes/ # Shape/graphic components
β βββ constants/ # App constants and configuration
β β βββ config.ts # App configuration
β β βββ cookies.ts # Cookie constants
β β βββ routes.ts # Route constants
β βββ hooks/ # Custom React hooks
β β βββ react-hook-form/ # Enhanced React Hook Form hooks
β β β βββ components/ # Form provider components
β β β βββ use-form.tsx # Enhanced useForm hook
β β β βββ use-form-context.tsx # Enhanced form context hook
β β β βββ types.ts # Form hook type definitions
β β β βββ index.ts # Exports all form hooks
β β βββ react-query/ # TanStack Query hooks
β β βββ index.ts
β β βββ types.ts
β β βββ use-infinite-query.ts
β β βββ use-mutation.ts
β β βββ use-query.ts
β β βββ use-suspense-infinite-query.ts
β βββ models/ # TypeScript interfaces and types
β β βββ api.ts # API response types
β βββ react-query/ # TanStack Query configuration
β β βββ client.ts # Query client setup
β β βββ config.ts # Query configuration
β β βββ wrapper.tsx # Query provider wrapper
β βββ repositories/ # Data access layer
β β βββ auth/ # Authentication repositories
β β βββ common/ # Common repository patterns
β βββ routes/ # Route components
β β βββ layout.tsx # Root layout component
β β βββ home.tsx # Home page route
β βββ utils/ # Utility functions
β β βββ cookie/ # Cookie utilities
β β βββ react-query/ # Query utilities
β β βββ react-router/ # Router utilities
β β βββ string/ # String utilities
β β βββ url/ # URL utilities
β βββ entry-client.tsx # Client-side entry point
β βββ entry-server.tsx # Server-side entry point
β βββ root.tsx # Root application component
β βββ routes.tsx # Route configuration (RouteConfig)
β βββ main.tsx # Application entry point
βββ server/ # Express server code
β βββ api/ # API routes
β β βββ auth.ts # Authentication endpoints
β β βββ index.ts # API router
β βββ constants.ts # Server constants
β βββ index.tsx # Server entry point
β βββ utils.ts # Server utilities
βββ scripts/ # Build and development scripts
β βββ generate-ssl-certs.ts # SSL certificate generation
β βββ initialize-package.ts # Package.json initialization script
β βββ prepare-app/ # App preparation scripts
β βββ index.ts
β βββ utils.ts
βββ styled-system/ # Generated Panda CSS files
β βββ css/ # CSS utilities
β βββ patterns/ # Layout patterns
β βββ tokens/ # Design tokens
β βββ types/ # Type definitions
βββ certs/ # SSL certificates (generated)
βββ build/ # Build output (React Router framework mode)
β βββ client/ # Client-side assets and bundles
β βββ server/ # Server-side bundle for SSR
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ .package-initialized # Package initialization marker file
βββ .commitlintrc.json # Commitlint configuration
βββ eslint.config.js # ESLint configuration
βββ package.json # Dependencies and scripts
βββ panda.config.ts # Panda CSS configuration
βββ postcss.config.cjs # PostCSS configuration
βββ setup-host.sh # Host setup script
βββ tsconfig.json # Base TypeScript configuration
βββ tsconfig.app.json # App TypeScript config
βββ tsconfig.node.json # Node TypeScript config
βββ vite.config.ts # Vite configuration
βββ yarn.lock # Yarn lock file
This template uses Panda CSS for zero-runtime CSS-in-JS with design tokens and utility classes.
Panda CSS is automatically configured and initialized in this template:
- Installation: Panda CSS files are generated automatically when you run
yarn install(via thepreparescript) - Development:
yarn dev:ssrincludes automatic watch mode for style regeneration - Build: All build commands automatically regenerate Panda CSS files before building
No manual initialization is required! Just install dependencies and start developing.
import { css } from "@/styled-system/css";
import { Stack, HStack } from "@/styled-system/patterns";
function MyComponent() {
return (
<Stack gap="4" p="6">
<h1 className={css({ fontSize: "2xl", color: "blue.500" })}>
Hello World
</h1>
<HStack gap="2">
<button
className={css({ bg: "blue.500", color: "white", px: "4", py: "2" })}
>
Click me
</button>
</HStack>
</Stack>
);
}Customize Panda CSS in panda.config.ts:
import { defineConfig } from "@pandacss/dev";
export default defineConfig({
preflight: true,
include: ["./src/**/*.{js,jsx,ts,tsx}"],
exclude: [],
theme: {
extend: {
// Add your custom design tokens here
},
},
outdir: "styled-system",
});This template uses React Router v7 in framework mode with a type-safe route configuration system powered by @react-router/dev/routes.
React Router framework mode provides:
- File-based routing - Routes are automatically discovered from the file system
- Type-safe route configuration - Full TypeScript support with
RouteConfig - Built-in data loading - Server-side data fetching with loaders
- Streaming & SSR support - Enhanced performance with server-side rendering
- Automatic code splitting - Routes are automatically split for optimal loading
Routes are defined in src/routes.tsx using the RouteConfig type for full type safety:
import type { RouteConfig } from "@react-router/dev/routes";
export default [
{
file: "./routes/layout.tsx",
children: [
{
index: true,
file: "./routes/home.tsx",
},
{
path: "/about",
file: "./routes/about.tsx",
},
],
},
] satisfies RouteConfig;- Root Layout:
src/routes/layout.tsx- Main application layout wrapper usingDefaultLayoutcomponent- Home Page (
/):src/routes/home.tsx- Application home page (index route) with meta tags and loader function - About Page (
/about):src/routes/about.tsx- About page with data loading, caching headers, and lazy loading demo
- Home Page (
Each route file can export:
- Component (default export): The React component to render
- Meta function: For dynamic page metadata (title, description, etc.)
- Loader function: For server-side data fetching with caching support
- Headers function: For custom response headers and cache control
// src/routes/about.tsx
import { data, useLoaderData, type HeadersArgs } from "react-router";
export async function loader() {
// Server-side data fetching
await new Promise((resolve) => setTimeout(resolve, 1000));
return data({
date: new Date().toISOString(),
});
}
export function headers(_: HeadersArgs) {
// Custom response headers
return { "Cache-Control": "private, max-age=10" };
}
export default function AboutPage() {
const data = useLoaderData<{ date: string }>();
return <div>Page content with loaded data</div>;
}This configuration provides type safety, automatic route discovery, and powerful data loading capabilities through React Router v7's framework mode.
This template follows a repository pattern where data fetching logic is defined in repositories first, then consumed through repository hooks in components.
The template implements a clean separation of concerns:
repositories/
βββ auth/ # Authentication-related data operations
β βββ models/ # Type definitions and constants
β βββ mutations/ # Authentication mutations (login, logout)
β βββ index.ts # Exports all auth operations
βββ common/ # Shared/common data operations
β βββ models/ # Shared type definitions
β βββ queries/ # Common queries (profile, etc.)
β βββ mutations/ # Common mutations
β βββ index.ts # Exports all common operations
All data operations are encapsulated in repository hooks with the useR* naming convention:
// src/repositories/common/queries/use-r-get-profile.ts
import { type UseQueryOptions, useQuery } from "@/hooks/react-query";
import type { ApiError, ApiResult } from "@/models/api";
import { GET_PROFILE_KEY, type Profile } from "../models";
export function useRGetProfile(
options: UseQueryOptions<ApiResult<Profile>, ApiError> = {},
) {
const { meta, ...resOptions } = options;
return useQuery<ApiResult<Profile>, ApiError>({
queryKey: GET_PROFILE_KEY,
meta: { ...meta, apiVersion: "2" },
...resOptions,
});
}// src/repositories/auth/mutations/use-r-login.ts
import { useMutation, type UseMutationOptions } from "@/hooks/react-query";
import type { ApiError, ApiResult } from "@/models/api";
import { fetcherMutation } from "@/utils/react-query";
import type { LoginParam, LoginResponse } from "../models";
function useRLogin(
options: UseMutationOptions<
ApiResult<LoginResponse>,
ApiError,
LoginParam
> = {},
) {
return useMutation<ApiResult<LoginResponse>, ApiError, LoginParam>({
mutationFn: async ({ context, variables }) =>
await fetcherMutation({
context: { ...context, path: "login" },
variables,
}),
...options,
});
}Components consume repository hooks for clean separation:
import { useRGetProfile } from "@/repositories/common";
function UserProfile() {
const {
data: profileResult,
isLoading,
error,
} = useRGetProfile({
// Additional options can be passed here
retry: 3,
staleTime: 5 * 60 * 1000, // 5 minutes
});
if (isLoading) return <div>Loading profile...</div>;
if (error) return <div>Error: {error.message}</div>;
const profile = profileResult?.data;
if (!profile) return <div>No profile found</div>;
return (
<div>
<h1>Welcome, {profile.name}!</h1>
<p>Role: {profile.role}</p>
{profile.role === "partner_agent" && <p>Partner: {profile.partner}</p>}
</div>
);
}import { useRLogin } from "@/repositories/auth";
import { useQueryClient } from "@tanstack/react-query";
function LoginForm() {
const queryClient = useQueryClient();
const loginMutation = useRLogin({
onSuccess: (result) => {
// Handle successful login
queryClient.invalidateQueries({ queryKey: ["profile"] });
console.log("Login successful:", result.data);
},
onError: (error) => {
console.error("Login failed:", error.message);
},
});
const handleSubmit = (formData: { email: string; password: string }) => {
loginMutation.mutate({
variables: formData,
context: {
// Additional context if needed
},
});
};
return (
<form
onSubmit={(e) => {
e.preventDefault();
handleSubmit({ email: "[email protected]", password: "password" });
}}
>
{/* Form fields */}
<button type="submit" disabled={loginMutation.isPending}>
{loginMutation.isPending ? "Logging in..." : "Login"}
</button>
</form>
);
}- Separation of Concerns - Data fetching logic separated from UI components
- Reusability - Repository hooks can be used across multiple components
- Type Safety - Full TypeScript support with proper error handling
- Consistent API - All data operations follow the same pattern
- Centralized Configuration - Query keys, options, and metadata managed in repositories
- Easy Testing - Repository hooks can be tested independently
useRGetProfile- Fetch user profile datauseRLogin- Authenticate user loginuseRLogout- Handle user logout- Add more repository hooks as you build features
The template also includes enhanced React Query hooks in src/hooks/react-query/:
useQuery- Enhanced query hook with custom error handlinguseMutation- Enhanced mutation hook with custom contextuseInfiniteQuery- Enhanced infinite query hookuseSuspenseQuery- Enhanced suspense query hook for React 18+ Suspense
This template includes enhanced React Hook Form hooks with additional features for better form handling and user experience.
The template provides custom React Hook Form hooks located in src/hooks/react-hook-form/:
useForm- Enhanced version of React Hook Form's useForm with field reference managementuseFormContext- Enhanced form context hook for accessing form state across componentsFormProvider- Enhanced form provider with automatic field registration and scrolling
- Automatic Field Reference Management - Automatically tracks field DOM references
- Custom Scroll to Field - Enhanced error scrolling without using default scroll functionality
- Type Safety - Full TypeScript support with enhanced type definitions
- Field Registration - Automatic field registration for better form management
import { useForm, FormProvider } from "@/hooks/react-hook-form";
import { css } from "@/styled-system/css";
interface FormData {
email: string;
password: string;
confirmPassword: string;
}
function LoginForm() {
const form = useForm<FormData>({
defaultValues: {
email: "",
password: "",
confirmPassword: "",
},
});
const onSubmit = (data: FormData) => {
console.log("Form data:", data);
};
return (
<FormProvider {...form} scrollToFieldOnError={true}>
<form onSubmit={form.handleSubmit(onSubmit)}>
<div className={css({ mb: "4" })}>
<label htmlFor="email">Email</label>
<input
id="email"
type="email"
{...form.register("email", {
required: "Email is required",
pattern: {
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
message: "Invalid email address",
},
})}
ref={(el) => {
form.fieldsRef.current.email = el;
}}
className={css({
border: "1px solid",
borderColor: form.formState.errors.email ? "red.500" : "gray.300",
p: "2",
rounded: "md",
})}
/>
{form.formState.errors.email && (
<span className={css({ color: "red.500", fontSize: "sm" })}>
{form.formState.errors.email.message}
</span>
)}
</div>
<div className={css({ mb: "4" })}>
<label htmlFor="password">Password</label>
<input
id="password"
type="password"
{...form.register("password", {
required: "Password is required",
minLength: {
value: 6,
message: "Password must be at least 6 characters",
},
})}
ref={(el) => {
form.fieldsRef.current.password = el;
}}
className={css({
border: "1px solid",
borderColor: form.formState.errors.password
? "red.500"
: "gray.300",
p: "2",
rounded: "md",
})}
/>
{form.formState.errors.password && (
<span className={css({ color: "red.500", fontSize: "sm" })}>
{form.formState.errors.password.message}
</span>
)}
</div>
<button
type="submit"
disabled={form.formState.isSubmitting}
className={css({
bg: "blue.500",
color: "white",
px: "4",
py: "2",
rounded: "md",
_disabled: { opacity: 0.5 },
})}
>
{form.formState.isSubmitting ? "Submitting..." : "Submit"}
</button>
</form>
</FormProvider>
);
}Access form state in child components using the enhanced form context:
import { useFormContext } from "@/hooks/react-hook-form";
function FormField({ name, label, ...props }) {
const { register, formState, fieldsRef } = useFormContext();
return (
<div>
<label htmlFor={name}>{label}</label>
<input
id={name}
{...register(name, props.validation)}
ref={(el) => {
fieldsRef.current[name] = el;
}}
className={css({
border: "1px solid",
borderColor: formState.errors[name] ? "red.500" : "gray.300",
p: "2",
rounded: "md",
})}
/>
{formState.errors[name] && (
<span className={css({ color: "red.500", fontSize: "sm" })}>
{formState.errors[name]?.message}
</span>
)}
</div>
);
}The enhanced hooks automatically manage field references:
const form = useForm();
// fieldsRef is automatically available
console.log(form.fieldsRef.current); // { email: HTMLInputElement, password: HTMLInputElement }When scrollToFieldOnError is enabled, the form will automatically scroll to the first field with an error:
<FormProvider {...form} scrollToFieldOnError={true}>
{/* Form fields */}
</FormProvider>Full TypeScript support with enhanced type definitions:
interface FormData {
email: string;
password: string;
}
const form = useForm<FormData>(); // Fully typed
const { register, formState } = form; // All methods are typed- Enhanced UX - Automatic scrolling to error fields for better user experience
- Better Performance - Efficient field reference management
- Type Safety - Full TypeScript integration with enhanced types
- Flexibility - Works with existing React Hook Form patterns
- Customizable - Easy to extend and customize for specific needs
This template includes an intelligent package initialization system that automatically configures your package.json based on environment variables.
- Environment Detection: The script checks for
VITE_APP_NAMEin your environment variables - Smart Initialization: Only runs on fresh installs (no marker file present) or when explicitly requested
- Package Configuration: Updates
package.jsonwith your app name and resets version to0.0.0 - Marker Creation: Creates
.package-initializedfile to prevent repeated initialization
Automatic (Recommended):
# First, copy the environment template
cp .env.example .env
# Edit .env file and set your app name
# VITE_APP_NAME=my-awesome-app
# Install dependencies - initialization happens automatically
yarn installManual:
# Force re-initialization
yarn init-pkg --forceMake sure to set the required environment variable:
# .env (copy from .env.example first)
VITE_APP_NAME=your-app-nameIf VITE_APP_NAME is not set, the script will warn you and exit, requiring manual setup.
Important: Always copy from
.env.exampleto.envfirst, then edit the values as needed. The.envfile is not tracked in git for security reasons.
This template uses a custom development script (scripts/prepare-app) that handles:
- Environment setup
- SSL certificate management
- Host configuration
- Development server initialization
Generate SSL certificates for HTTPS development:
yarn certs:generateThe certificates will be stored in the certs/ directory.
The template includes comprehensive environment variable support with multi-environment configuration. Copy .env.example to .env and configure:
# App Configuration
VITE_APP_NAME=your-app-name # Required: Used for package.json initialization
VITE_API_ORIGIN=http://localhost:3000 # API origin URL
VITE_API_BASE_PATH=/api # API base path
VITE_API_TIMEOUT=3500 # API request timeout in ms
VITE_BASE_PATH=/ # App base path
VITE_BASE_REDIRECT_PATH=/login # Default redirect path
VITE_SSR_API_BASE_PATH=/api # SSR API base path
# Development Configuration
DEV_HOST=localhost # Development host (can be custom domain)
PORT=3000 # Server portThe template supports multiple environments with different configuration files:
- Development:
.envor.env.local - Staging:
.env.staging+ fallback to.envand.env.local - UAT:
.env.uat+ fallback to.envand.env.local - Production:
.env.production+ fallback to.envand.env.local
Environment is determined by the --mode flag when running the development server.
The template includes an intelligent package initialization system:
- Automatic: Runs via
postinstallscript when you first install dependencies - Environment-Based: Uses
VITE_APP_NAMEfrom your environment variables - Smart Detection: Only runs on fresh installs or when explicitly requested
- Manual Override: Use
yarn init-pkg --forceto reinitialize
Important: Make sure to set VITE_APP_NAME in your .env file before running yarn install for automatic package initialization.
This template enforces code quality and consistent commit messages through automated Git hooks.
The template includes pre-configured Git hooks that run automatically:
- Pre-commit - Runs ESLint on staged files only (via lint-staged) to check code quality before commits
- Commit-msg - Validates commit messages against conventional commit standards
The template uses lint-staged to run linters only on staged files, making commits faster:
{
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": ["eslint", "prettier --write"]
}
}This ensures that only the files you're committing are linted, improving performance for large codebases.
All commit messages must follow the Conventional Commits specification:
# Valid commit message examples
git commit -m "feat: add user authentication"
git commit -m "fix: resolve login validation issue"
git commit -m "docs: update installation instructions"
git commit -m "style: format code with prettier"
git commit -m "refactor: restructure auth components"
git commit -m "test: add unit tests for user service"
git commit -m "chore: update dependencies"<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat - A new feature
- fix - A bug fix
- docs - Documentation only changes
- style - Code style changes (formatting, semicolons, etc.)
- refactor - Code refactoring without feature changes
- test - Adding or updating tests
- chore - Maintenance tasks, dependency updates
- ci - CI/CD configuration changes
- perf - Performance improvements
- build - Build system changes
In rare cases, you can bypass hooks:
# Skip pre-commit hooks
git commit --no-verify -m "emergency fix"
# Skip commit message validation
git commit --no-verify -m "quick fix"The template includes automated dependency updates via GitHub Dependabot:
- Monthly npm package updates - Keeps dependencies current with security patches
- Monthly GitHub Actions updates - Maintains CI/CD workflow dependencies
- Automatic labeling - PRs are labeled for easy categorization
- Smart versioning - Follows semantic versioning strategies
- Scoped commits - Commit messages include scope and development prefixes
Configuration is located in .github/dependabot.yml:
version: 2
updates:
# Keep npm dependencies updated
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 10
versioning-strategy: auto
labels:
- "dependencies"
- "npm"
commit-message:
prefix: "npm"
prefix-development: "dev"
include: "scope"
# Keep GitHub Actions updated
- package-ecosystem: "github-actions"
directory: "/.github"
schedule:
interval: "monthly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"yarn buildThis runs a complete production build using React Router framework mode:
- TypeScript compilation - Compiles all TypeScript files
- Panda CSS generation - Generates optimized CSS files
- React Router build - Builds both client and server bundles with automatic code splitting
The build process generates the following structure in the /build directory (following @react-router/dev conventions):
build/
βββ client/ # Client-side assets and bundles
β βββ assets/ # Static assets (CSS, JS, images)
β βββ ... # Other client files
βββ server/ # Server-side bundle for SSR
βββ index.js # Server entry point
React Router framework mode automatically provides:
- Automatic code splitting - Routes are split into separate bundles
- Optimized asset loading - Smart preloading and resource prioritization
- SSR support - Server-side rendering built-in
- Progressive enhancement - Graceful degradation for JavaScript-disabled clients
panda.config.ts- Panda CSS configuration with design tokens and patternsvite.config.ts- Vite configuration with React SWC and TypeScript pathseslint.config.js- ESLint flat configuration with TypeScript rules.commitlintrc.json- Commitlint configuration for conventional commits.husky/- Git hooks configuration directorytsconfig.json- Base TypeScript configurationtsconfig.app.json- App-specific TypeScript settingstsconfig.node.json- Node.js TypeScript settingspostcss.config.cjs- PostCSS configuration for CSS processing.env.example- Environment variables template with all supported variablessetup-host.sh- Host setup script for development environmentscripts/initialize-package.ts- Package.json initialization script
The template implements a repository pattern for data access, separating business logic from data fetching.
Components are organized by feature modules for better scalability.
Full TypeScript integration ensures type safety across the entire application.
- SWC for fast compilation
- Vite for instant HMR
- TanStack Query for efficient data caching
- Code splitting with React Router
- Fork the repository
- Create a feature branch
- Make your changes
- Run linting:
yarn lint - Submit a pull request
This template is available as open source under the terms of the MIT License.
For questions and support:
- Check the documentation for each technology used
- Open an issue on GitHub
- Review the example implementations in the template
Built with β€οΈ using modern React ecosystem tools.