vite-ts-react-template

by bartstcVerified

This project provides a basic dev setup intended for Single Page Application (SPA) development. It contains key tools, settings for seamless DX, and an demo app presenting good practices and used tooling in action.

119
Stars
12
Forks
TypeScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/bartstc/vite-ts-react-template

Getting Started

Guides for using skills like vite-ts-react-template.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

SPA Vite Template

An opinionated, production-ready starter for Single Page Application development with React. Pre-configured tooling, libraries, and a demo app so you can skip the boilerplate and focus on building.

What's included

Developer experience

  • Vite — fast dev server and build tooling
  • TypeScript — strict type safety
  • ESLint (with custom rules) + Prettier + Husky — consistent code style
  • madge — circular dependency check + module graph visualization
  • PNPM — fast, disk-efficient package manager
  • Devcontainer — reproducible VS Code dev environment
  • GitHub Actions CI — tests, build, coverage reports, deploy draft
  • Snyk — dependency (SCA) and source code (SAST) security scanning, with SARIF results in the GitHub Security tab
  • SonarCloud — code quality, maintainability, and coverage gating on pull requests
  • GitHub Copilot — instructions, skills, and custom prompts (.github/instructions/, .github/skills/, .github/prompts/)
  • Claude Code — project rules (CLAUDE.md), skills, subagents, and custom commands (.claude/)

Testing

  • Vitest — unit and integration tests
  • Storybook — component tests in a real browser
  • Playwright — E2E tests across Chromium, Firefox, and WebKit

Libraries

  • Chakra UI — accessible, modular component library
  • React Router 8 — routing with strong path typing
  • React Query — data fetching and server state synchronization
  • Zustand — lightweight state management
  • i18next — internationalization
  • XState — state orchestration (example usage)
  • React Hook Form - form state management with light and composable abstraction
  • MSW 2 — API mocking for development and tests

Architecture

src/        React SPA (features, pages, lib)
server/     Local Fastify API server (dev/demo)
e2e/        Playwright end-to-end tests
  • Feature slice architecture with clean architecture principles — each feature has four layers (components/, application/, providers/, models/) with strict dependency rules
  • Strict ESLint guardrails enforce the feature-slice layer boundaries. See eslint.config.mjs.
  • Circular dependency check and dependency graph visualization via madge (pnpm madge:circular / pnpm madge:graph)
  • Centralized API layer with endpoint-based organization and type consolidation
  • Spec-driven development for AI-assisted workflows — four-phase gated spec process, typed building block patterns, and a self-improvement loop
  • Formatting utilities for numbers, monetary values, and dates
  • File naming: PascalCase for React components/stories/page objects, kebab-case for everything else
  • A demo app with authentication showcasing the project structure and tooling in action (powered by a local Fastify server in server/)
  • Read more: docs/architecture.md

AI-assisted development

This project uses spec-driven development for non-trivial features. Instead of prompting an AI agent to "build X," you collaboratively write a short spec (80–150 lines) that constrains intent, design, and sequencing before any code is written.

  • Spec workflow — four-phase gated process: Goal & Scope → Design → Sequencing → Review. Each phase requires developer approval before proceeding.
  • Building blocks catalog — typed patterns (mutations, queries, stores, components, hooks, models) that specs reference by name. The agent reads the pattern before implementing.
  • Self-improvement loop — lessons from past implementations accumulate in specs/lessons.md and feed back into future sessions.
  • Read more: docs/spec-development-docs.md

Getting started

Clone the repo and set up your own remote:

git clone --depth 1 https://github.com/bartstc/spa-vite-template.git [project_name]
cd [project_name]
rm -rf .git && git init
git remote add origin git@github.com:username/project.git

Dev environment

It's recommended to run the dev server inside a container for consistent Node/PNPM versions. If you're using VS Code, the included devcontainer config handles this out of the box.

Commands

CommandDescription
pnpm devDev server with HMR on port 5173
pnpm dev:serverLocal API server only on port 3001
pnpm dev:allFrontend + API server together
pnpm typecheckType-check all sources without emitting
pnpm lintCheck for lint errors
pnpm madge:circularCheck for circular module dependencies
pnpm madge:graphGenerate dependency graph image (graph.png) — requires graphviz
pnpm buildProduction build
pnpm testRun all tests (unit + storybook)
pnpm test:unitUnit tests only
pnpm test:storybookStorybook component tests only
pnpm test:coverageTests with coverage report
pnpm test:e2eE2E tests (headless)
pnpm test:e2e:uiE2E in interactive web UI mode
pnpm test:e2e:headedE2E with visible browser
pnpm test:e2e:debugE2E in debug mode
pnpm test:e2e:reportOpen the HTML report from the last E2E run
pnpm storybookStorybook on port 6006

Testing strategy

Unit tests (*.test.ts, *.test.tsx)

  • Environment: jsdom
  • Location: Co-located with source files in src/
  • Run with: pnpm test:unit

Component tests (*.stories.tsx)

  • Environment: Real browser (Chromium) via @vitest/browser-playwright
  • Location: Co-located with components in src/
  • Run with: pnpm test:storybook

E2E tests (*.spec.ts)

  • Environment: Chromium, Firefox, and WebKit via @playwright/test
  • Location: e2e/
  • Run with: pnpm test:e2e

Removing libraries you don't need

This template is opinionated — it picks libraries so you don't have to. If something doesn't fit your project, here's how to strip it out:

LibraryWhat to remove
Chakra UIsrc/lib/components/, Chakra provider in src/app/, @chakra-ui/* deps
React Routersrc/pages/, route config in src/app/, react-router dep
React QueryQuery provider in src/app/, src/lib/api/ query hooks, @tanstack/react-query deps
i18nextsrc/lib/i18n/, i18n provider in src/app/, i18next + react-i18next deps
ZustandStore files in src/features/*/stores/, zustand dep
XStateState machine files (example usage), xstate + @xstate/react deps
React Hook Formsrc/lib/components/Form/, form components in src/features/*/components/, react-hook-form dep
MSWsrc/test-lib/handlers/, msw dep, browser/server setup files

After removing, run pnpm install to clean the lockfile and pnpm lint to catch broken imports.

Note for AI-assisted workflows: Several of these libraries are referenced by name in the building blocks catalog used during spec-driven development. The catalog includes typed patterns for React Query (query-options-factory, mutation-hook), Zustand (store), and React Hook Form (form). If you remove one of these libraries, also remove or replace its corresponding rule file in .agents/skills/building-blocks/rules/ so the agent doesn't generate code for a library that no longer exists in the project.

Contributing

Open for contributions — bugfixes, new features, and extra modules are welcome.

  • Code: Fork the repo, push your changes, and submit a pull request.
  • Bugs: Report issues via GitHub Issues.

License

MIT

Frequently Asked Questions

What is vite-ts-react-template?

vite-ts-react-template is an open-source testing skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by bartstc. This project provides a basic dev setup intended for Single Page Application (SPA) development. It contains key tools, settings for seamless DX, and an demo app presenting good practices and used tooling in action. It has 119 GitHub stars.

Is vite-ts-react-template safe to use?

Yes. vite-ts-react-template passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install vite-ts-react-template?

Clone the repository with "git clone https://github.com/bartstc/vite-ts-react-template" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is vite-ts-react-template written in?

vite-ts-react-template is primarily written in TypeScript. It is open-source under bartstc on GitHub, so you can review or fork the full source.

Are there alternatives to vite-ts-react-template?

Yes. SkillsLLM lists many other Testing skills you can browse and compare side by side. Open the Testing category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh vite-ts-react-template against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

Claude-BugHunter

by elementalsouls

A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.

3,740578Python
Testing
View details

Rapid-MLX

by raullenchai

The fastest local AI engine for Apple Silicon. 4.2x faster than Ollama, 0.08s cached TTFT, 100% tool calling. 17 tool parsers, prompt cache, reasoning separation, cloud routing. Drop-in OpenAI replacement. Works with Claude Code, Cursor, Aider.

3,530401Python
Testing
View details

playwright-skill

by lackeyjb

Claude Code Skill for browser automation with Playwright. Model-invoked - Claude autonomously writes and executes custom automation for testing and validation.

3,014229JavaScript
Testing
View details

src-hunter-skill

by MyuriKanao

实战 SRC / 众测 / Bug bounty 漏洞挖掘 Claude Code skill — 19 个攻击类 playbook、305 个结构化 payload、263 个 WAF/EDR 绕过、2887 份 HackerOne 真实案例、88,636 WooYun 案例统计

60187
Testing
View details

100 field-tested Claude Code recipes for knowledge workers — prompts, steps, and 6 installable graded skills.

38048
Testing
View details

Claude Code Skill that turns any idea into a cinematic, model-ready video prompt — Sora · Kling · Veo · Seedance. 21 genre templates, 5-stage structure, eval-tested. Distilled from the AI short Hollywood director PJ Ace called "one of the best short films I've seen in years."

36869Python
Testing
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details
vite-ts-react-template — AI Skill for Claude Code | SkillTip