Skip to content
Back to skills

Scaffold React Vite

ASecurity

React+Vite project scaffold decision guide: structure, tooling, config decisions, dependency baseline, anti-patterns.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 14, 2026
developmenttypescriptgobashreactapifrontendbackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 14, 2026

npx -y skills add SebastianLuser/claude-code-arcane --skill scaffold-react-vite --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scaffold React Vite?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Scaffold React Vite
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sebastianluser-scaffold-react-vite/badge)](https://www.skillsdirectory.com/skills/sebastianluser-scaffold-react-vite)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: scaffold-react-vite
description: "React+Vite project scaffold decision guide: structure, tooling, config decisions, dependency baseline, anti-patterns."
category: "frontend"
argument-hint: "[project-name]"
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, Write, Edit, Task
---
# scaffold-react-vite — Project Scaffold Decision Guide

React 18+ with Vite, TypeScript strict, client-side SPA consuming Go/TS backend.

## MANDATORY WORKFLOW

**Before generating any code, complete these steps in order.**

### Step 0: Gather Requirements

Clarify (or infer from context if already specified):

1. **Project name** (kebab-case)
2. **Backend:** Go / TS — API base URL
3. **Auth:** JWT / Session cookies / OAuth
4. **i18n:** react-i18next / none
5. **Design system:** shadcn/ui (default) / existing custom one

If the user already specified these values, skip straight to Step 1.

### Step 1: Implement

Follow: Project Structure → Dependency Baseline → Vite Config Decisions.

### Step 2: Verify

```bash
npm run build    # tsc + vite build with no errors
npm run test     # vitest passes
npm run lint     # ESLint with no warnings
```

## Project Structure

```
src/
├── main.tsx, App.tsx
├── routes/              # Router config, layouts, pages
├── components/ui/       # shadcn primitives
├── components/features/ # Domain components
├── hooks/queries/       # TanStack Query hooks (use-<resource>.ts)
├── hooks/use-*.ts       # Custom hooks
├── lib/api.ts           # Axios/ky with interceptors
├── lib/validations/     # Zod schemas
├── stores/              # Zustand (UI state only)
├── types/               # Shared TS types
├── styles/, assets/
tests/unit/, tests/e2e/
```

**Conventions:** Components PascalCase (one per file), hooks `use-*` kebab-case, query hooks return `useQuery`/`useMutation`, types co-located or in `types/` if shared, barrel exports only when helpful, path alias `@/` → `src/`.

## Vite Config Decisions

| Decision | Guidance |
|---|---|
| Dev proxy | `server.proxy` → forward `/api` to backend, avoids CORS |
| Env variables | `VITE_` prefix. `.env.example` required. Validate at startup |
| Build target | `esnext` default; `es2020` only for older browser support |
| Port | 5173, `host: true` for network access |
| Path alias | `"@"` → `src/` in vite.config.ts and tsconfig.json |

Env baseline: `VITE_API_URL`, `VITE_APP_ENV`
Scripts: `dev`, `build` (tsc + vite build), `preview`, `lint`, `test`, `test:e2e`, `format`

> → Read references/dependency-baseline.md for full dependency list (runtime, dev, UI) and tooling checklist

> → Read references/anti-patterns.md for common anti-patterns to avoid

Files in this skill

  • SKILL.md2.7 KB
  • references/anti-patterns.md389 B
  • references/dependency-baseline.md1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.