使用 Vite 作为构建工具,搭配 React 与 TypeScript
react-starter-template — Vite 启动器模板
作者 truonghungit
基于 Vite 与 React + TypeScript 的启动器模板,内置测试、代码规范、路由与 TailwindCSS,并提供首页、登录注册和仪表盘示例页面。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
集成 ESLint、Prettier、Browserslist、Commitizen、Commitlint 与 Lint Staged
提供 Jest、Testing Library 与 Cypress 的测试配置及对应脚本
使用 React Router 实现 SPA 导航,并集成 TailwindCSS、Headless UI 与 heroicons
附带首页、登录、注册与仪表盘示例页面
包含 GitHub Action 的 Pull Request 检查与 Pull Request 模板
模板详细介绍
这是一个 React + TypeScript 启动器模板,构建工具使用 Vite,仓库采用 MIT 许可。模板把开发中常见的配置预先准备好,目标是让使用者直接进入业务开发,而不必先学习并配置构建工具。
在工程配置方面,模板集成了 ESLint 与 Prettier 用于代码检查与格式化,Browserslist 声明目标浏览器,Commitizen 与 Commitlint 约束提交信息格式,Lint Staged 在提交前检查暂存文件,并附带 GitHub Action 用于 Pull Request 检查以及 Pull Request 模板。测试方面提供 Jest 与 Testing Library 用于单元测试、Cypress 用于端到端测试,并给出对应的 yarn 脚本。
在应用层面,模板使用 React Router 实现单页应用导航,集成 TailwindCSS,并使用 Headless UI 与 heroicons。示例页面包括作为落地页的首页、登录与注册页、以及仪表盘页。仓库还说明了分支命名(feature/*、bugfix/*、release/*)、使用 Commitizen 提交、Squash 合并以及变基而非合并 master 的协作约定,并列出了推荐的 VS Code 扩展。
使用限制方面:资料未提供依赖清单,因此不在此列出具体框架版本;模板不包含后端、数据库或鉴权服务的实现,示例页面仅为界面示例。README 中的“production-ready”等表述属于项目自述,本介绍不对其生产就绪程度作判断。
适合你的项目吗?
适用场景
- 需要快速搭建 React + TypeScript 单页应用脚手架时
- 希望项目自带代码检查、格式化与提交信息规范时
- 需要同时配置单元测试与端到端测试的 React 项目
- 想参考 TailwindCSS 与 Headless UI 组织登录、注册、仪表盘等页面的写法
适合人群
- 使用 React 与 TypeScript 开发前端应用的开发者
- 需要现成工程规范与测试配置的前端团队
- 希望以示例页面为起点搭建后台或仪表盘类界面的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
可通过 git clone 仓库到本地,或在 GitHub 上点击 Use this template 创建新项目
- 2
使用 yarn install 安装依赖,使用 yarn start 在本地开发服务器启动并支持热更新
- 3
单元测试使用 yarn test:unit,覆盖率使用 yarn test:unit:coverage,端到端测试使用 yarn test:e2e
- 4
提交时建议使用 yarn commit 进入 Commitizen 交互界面以生成规范提交信息
- 5
改为自用项目时需更新 package.json 的 name 与版本、删除原有 CHANGELOG.md、更新 README、修改 index.html 的标题与 Open Graph 元数据、替换 /public/images 中的 logo,并按需调整 .github/workflows
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/truonghungit/react-starter-template/blob/master/LICENSEhttps://github.com/truonghungit/react-starter-template/blob/master/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 77 / 100
- 技术栈
- Vite · React
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2022-08-09
- 截图检查日期
- 2026-10-03
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 9d945e8776bb2682a174292b1c9d5dcc171265eed1f1956fb3b33e718ab2f097
2026-10-03T07:11:25.244Z
来源文件 / 仓库# <img src="./docs/assets/logo.png" alt="drawing" style="height:36px;"/> React Starter Template [](https://github.com/truonghungit/react-starter-template/actions/workflows/pull-request-checks.yml) [](https://sonarcloud.io/summary/new_code?id=truonghungit_react-starter-template)    [](https://github.com/truonghungit/react-starter-template/blob/master/LICENSE) [](https://github.com/prettier/prettier)  This is a [React](https://reactjs.org) + [TypeScript](https://www.typescriptlang.org/) starter template built with [Vite](https://vitejs.dev). We provide everything you'll need to get started building React Apps. #### [Live Demo](https://react-starter-template.vercel.app) #### [Changelog](https://github.com/truonghungit/react-starter-template/blob/master/CHANGELOG.md) ## 🎯 Goals ### Get started in seconds This starter allows you to focus on development rather than learn and configure build tools. We've prepared the fantastic below for you. - [Vite](https://vitejs.dev) Next Generation Frontend Tooling - [ReactJS](https://reactjs.org) with [TypeScript](https://www.typescriptlang.org) Always update to the latest version #### Testing - [Jest](https://jestjs.io/) Test runner - [Testing Library](https://testing-library.com/) Test UI from a users perspective (for React and Cypress) - [Cypress](https://www.cypress.io) #### Format and lint - [ESLint](https://eslint.org/) Enforce code standards & [Prettier](https://prettier.io/) Code formatting - [Browserslist](https://github.com/browserslist/browserslist) Supported browsers - [Commitizen](https://github.com/commitizen/cz-cli) - [Commitlint](https://commitlint.js.org) - [Lint Staged](https://github.com/okonet/lint-staged) 🚫💩 slip into your code base! #### Workflow - Github action for pull request checks - [Pull Request template](https://github.com/truonghungit/react-starter-template/blob/master/.github/pull_request_template.md) Consistent and helpful colabouration. #### Library - [React Router](https://reactrouter.com/) Single Page App **(SPA)** navigation - TailwindCSS Integrated - Headless ui & heroicons #### Example pages - Home page as landing page - Sign In, Sign Up pages, - Dashboard page ### Recent best practices This repository provide an up to date example of React application following all recent best practices in various areas ## 💻 Getting started #### Create project Clone the latest version ```bash git clone https://github.com/truonghungit/react-starter-template.git my-app cd my-app ``` [Previous versions](https://github.com/truonghungit/react-starter-template/tags) are also available for download. You can also click on **_Use this template_** on GitHub  #### Install dependencies. ```bash yarn install ``` #### Start Start your application in local development server with hot reload at http://localhost:3000. ```bash yarn start ``` ## 🤖 Testing ### Unit tests Execute all unit tests ```bash yarn test:unit ``` Execute all unit tests and collect coverage ```bash yarn test:unit:coverage ``` ### End to end testing Run e2e tests ```bash yarn test:e2e ``` ## 😎 Make It Your Own When using this starter project to build your own application you might consider some of the following steps: - rename project in `package.json` `name` property and set appropriate version (eg `0.0.1` or `1.0.0`) - delete pre-existing `CHANGELOG.md` (you will generate your own with future releases of your features) - update the `README.md` content with your context - edit the title and Open Graph metadata properties in `index.html` - replace logo in `/public/images` folder - update github workflow if you need in `.github/workflows` ## 🌲 Branching We use [Trunk Based Development](https://trunkbaseddevelopment.com/) to accommodate short-lived branches and a _**"trunk"**_ _(our `master` branch)_ as a source of truth. - **Feature: `feature/*`** Example: `feature/JIRA-123-my-new-feature` - **Bug: `bugfix/*`** Example: `bugfix/JIRA-123-fix-an-issue` - **Release: `release/*`** Example: `release/JIRA-123-brand-new-product` ## 🏆 Making Commits We format our commit messages using [Commitizen](https://github.com/commitizen/cz-cli). This provides the project a consistent, easy structure that allows for automation opportunities. - It is **important** that you use Commitizen when making commits - In your **terminal** run `yarn commit` when making a commit to enter the interactive GUI. ## 💾 Pull Requests This project has a template that sets the pull request structure that we expect from contributors. - It is **important** to _**give**_ as much context to _**get**_ the best review from your peers. _(write the pull request that you would love to encounter yourself)_ - You do not have to fill out each section if it is not applicable. ## 🗜️ Merging We always _**Squash**_ our _Pull Requests_. This makes a `cherry-pick` from `master` to a `release/*` branch when addressing a Bug Fix easy. Make sure to _**ALWAYS**_ rebase _(not merge)_ `master` into your local branch when developing. We strive for a flat Git commit history when possible. ## 🧰 Recommended VS Code extensions - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - [Gitlens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - [Tailwind CSS](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) - [VS Code Jest](https://marketplace.visualstudio.com/items?itemName=orta.vscode-jest) ## 📝 License Copyright © 2022 truonghungit. This source code is licensed under the MIT license found in the [LICENSE](https://github.com/truonghungit/react-starter-template/blob/master/LICENSE) file. --- <sup>Made with ♥ by truonghungit.</sup>
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

react-starter-kit
Modern React starter kit with Bun, TypeScript, Tailwind CSS, tRPC, Stripe, and Cloudflare Workers. Production-…
Vite · SaaS

cove
The Cove Stack: 🏝️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui
Vite · SaaS

vite-react-boilerplate
A production ready, scalable starter template for Vite + React
Vite · 启动器

react-vite-admin
This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite. 全新技术栈的后台管理系统
Vite · 后台

typescript-react_best_practices-vite_template
<⚡⚛️> Start your React project with Vite following code best practices (TypeScript, Linting, testing, CI/CD…)
Vite · 启动器

cloudflare-starter-kit
Template (boilerplate) repository for scaffolding Cloudflare Workers projects
Vite · 启动器
