vite-project-structure

Create feature-first Vite + React SPA structures with centralized routing and path aliases.

3|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill vite-project-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vite-project-structure
Source: https://github.com/mauriciodelrio/delriodev-skills/tree/main/es-skills/software/frontend/vite-project-structure
Command: npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill vite-project-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often waste time configuring Vite + React projects from scratch, leading to inconsistent folder layouts, tangled imports, and missing validation for environment variables.

Core Features & Use Cases

  • Feature‑first architecture: Organizes code by business domain, not by file type.
  • Centralized router: Single router.tsx entry point with createBrowserRouter.
  • Barrel files and path aliases: Simplify imports using vite-tsconfig-paths and alias definitions like @features/*.
  • Shared utilities: Common components, hooks, and lib code live under shared/.
  • Environment validation: Uses Zod to validate VITE_* variables at build time.
  • Use case: Quickly spin up a new admin dashboard or e‑commerce frontend with a clean, scalable structure.

Quick Start

Ask the agent to generate a Vite + React SPA scaffold following the feature‑first layout with configured path aliases.

Frequently Asked Questions about vite-project-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Vite + React project using a feature-first architecture?

A feature-first Vite + React project organizes code by business domain rather than file type, creating feature modules with barrel exports. This layout places shared utilities, hooks, and components under a shared/ directory to ensure scalable imports.

What is the best way to configure path aliases in a Vite React application?

Configuring path aliases in a Vite React app requires the vite-tsconfig-paths plugin and TypeScript path mappings. This setup lets you define aliases like @features/* to simplify imports across feature modules and shared utilities.

How do I validate Vite environment variables at build time with Zod?

To validate Vite environment variables with Zod, define a schema checking your VITE_* variables during the build process. This ensures invalid or missing configurations fail early before the single-page application initializes.

Does this Vite React scaffolding use a centralized router setup?

Yes, the Vite React scaffolding uses a centralized router setup. It provides a single router.tsx entry point utilizing createBrowserRouter to manage all route definitions instead of scattering them across individual feature modules.

Can I use this feature-first structure for a large admin dashboard?

Yes, you can use this feature-first structure for a large admin dashboard or e-commerce frontend. The centralized routing and domain-organized feature modules prevent tangled imports and maintain a scalable SPA structure as the project grows.