react-folder-structure

Opinionated React + Vite + TypeScript + shadcn/ui project structure, conventions, and setup guide. Use this skill when bootstrapping a new project, creating a new feature, wiring up API calls with TanStack Query + Axios, or managing state with Zustand. Enforces self-contained features, a typed API layer, and theme-aware Tailwind v4 styling via CSS variables.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react-folder-structure" with this command: npx skills add philipp-luchsinger/react-folder-structure/philipp-luchsinger-react-folder-structure-react-folder-structure

React Folder Structure & Conventions

Opinionated setup guide and coding conventions for React + Vite + TypeScript + shadcn/ui projects.

When to Apply

Reference these guidelines when:

  • Bootstrapping a new project from scratch
  • Creating a new feature inside components/features/
  • Adding a new API domain (TanStack Query + Axios)
  • Creating or scoping a Zustand store
  • Adding a shadcn/ui component
  • Deciding where a file or hook belongs in the project

Rule Categories

CategoryAreaPrefix
Project SetupBootstrapping Vite + Tailwind + shadcnsetup-
Folder StructureTop-level src/ layoutstructure-
FeaturesSelf-contained feature architecturefeature-
API LayerAxios + TanStack Query conventionsapi-
State ManagementZustand (global & scoped)store-
StylingTailwind v4 + CSS design tokensstyle-
NamingFile, component & hook naming conventionsnaming-

Quick Reference

Setup

  • setup-vite — Scaffold Vite + React + TypeScript + Tailwind v4 + path aliases
  • setup-shadcn — Initialize shadcn/ui and never edit generated ui components

Features

  • feature-structure — Self-contained feature directory layout
  • feature-components — What goes in components/ vs shared/
  • feature-boundaries — Features may only import each other's root export

API

  • api-client — Single Axios instance in api/client.ts
  • api-endpoints — Centralized endpoint constants, never hardcode URLs
  • api-query-hooks — Query key factories + TanStack Query hook patterns
  • api-domain-folder — One folder per domain with use<Domain>Api.ts + types.ts

State

  • store-globalsrc/stores/ for app-wide state only
  • store-scoped — Context-scoped createStore() pattern for feature-local state

Styling

  • style-tokens — Always use CSS variable tokens, never raw Tailwind color utilities
  • style-dark-mode — Dark mode via .dark class + @custom-variant

Full Reference

For detailed explanations and Incorrect/Correct code examples for every rule: AGENTS.md

Individual rule files are in rules/.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Agent Dev Workflow

Orchestrate coding agents (Claude Code, Codex, etc.) to implement coding tasks through a structured workflow. Use when the user gives a coding requirement, f...

Registry SourceRecently Updated
Coding

Cortex Engine

Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and...

Registry SourceRecently Updated
Coding

Skill Blocker - 安全守卫

Blocks execution of dangerous commands and risky operations like destructive deletions, credential theft, code injection, and unauthorized system changes to...

Registry SourceRecently Updated
014
Profile unavailable