Skip to content
Public template

About

A Vue 3 starter on Vite 8 with TypeScript, Tailwind CSS 4, shadcn-vue, Pinia, vue-i18n and PWA.

Topics

Resources

Code of conduct

Contributing

Stars

275 stars

Watchers

3 watching

Forks

Latest commit

 

History

201 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boot Vue

Boot Vue

A Vue 3 starter on Vite 8, with Tailwind CSS 4 and shadcn-vue.

English · 简体中文 · Live demo · Feedback

Vue 3.5 Vite 8 TypeScript 6 Tailwind CSS 4
CI GitHub stars License

Table of contents

✨ Features

Components you own

Components you own

shadcn-vue copies accessible components built on Reka UI into src/components/ui. They are styled with Tailwind CSS 4 and the theme variables in src/styles/main.css, and the code is yours to change. The template comes with button, card, dropdown menu, tooltip, avatar, switch, slider and label, and the CLI adds the rest, see Add components.

Back to top

Ready in a blink

Ready in a blink

Vite 8 builds with Rolldown. pnpm dev opens the app on http://localhost:8888, with Vue DevTools at /__devtools__/, Inspect at /__inspect/ to see how each module is transformed, and an MCP server at /__mcp/sse for AI assistants.

Back to top

Light by day, dark by night

Light by day, dark by night

The site bar switches between light, dark and the system theme. VueUse's useColorMode stores the choice, a short script in index.html applies it before the first paint so a dark page never flashes white, and the new theme spreads from the click with a view transition (src/composables/theme.ts).

Back to top

State that stays

State that stays

Pinia stores live in src/store and are imported automatically. The tile on the home page and the counter page both call counter(), so they share one count.

// src/store/counter.ts
export const counter = defineStore("counter", () => {
  const count = ref<number>(1);
  function increment() {
    count.value++;
  }

  return { count, increment };
});

Back to top

Every language, one codebase

Every language, one codebase

Messages live in src/locales/<language>.json and are compiled at build time by @intlify/unplugin-vue-i18n. To add a language, add a file: the language menu lists every file in the folder, remembers the visitor's choice and sets the lang of the page.

Back to top

No import lines

No import lines

unplugin-auto-import brings in the APIs of Vue, Vue Router, vue-i18n and VueUse, and everything exported from src/composables and src/store. unplugin-vue-components registers the components in src/components, and unplugin-icons turns names such as <IMdiGithub /> into icons from Iconify. The type declarations are generated into types/.

Back to top

Punctuation, set right

Punctuation, set right

Chinese and Latin text share the code points of quotation marks, dashes and ellipses, so a Latin font in front draws them narrow and in Latin style. The font stack in src/styles/main.css puts a Punctuation Chinese face first. It covers only these marks and takes them from PingFang SC, Noto Sans CJK SC or Microsoft YaHei, while Latin text keeps the system UI font.

Back to top

Installs like an app

Installs like an app

vite-plugin-pwa generates the web app manifest and a Workbox service worker that updates itself. After the first visit, a production build keeps working offline. The service worker is only registered in production builds.

Back to top

Ship it anywhere

Ship it anywhere

Deploy to Netlify Deploy with Vercel

netlify.toml sets the build command and Node 24 for Netlify. Vercel finds the Vite settings by itself. The router uses hash history, so the app needs no rewrite rules on any static host. For a container, see Docker production build.

Back to top

🚀 Getting started

Note

Boot Vue needs Node.js ^22.22.2, ^24.15.0 or >=26.0.0. The packageManager field pins pnpm 12.11.2, and pnpm 10.34.5 or later switches to it by itself; with an older pnpm, update it first with npm i -g pnpm.

Create a repository from this template, or copy it with degit:

npx degit kirklin/boot-vue my-app
cd my-app
pnpm i
pnpm dev

Back to top

🛠️ Usage

Command What it does
pnpm dev Starts the dev server on http://localhost:8888
pnpm build Builds the app into dist
pnpm preview Serves the build locally
pnpm test Runs the tests with Vitest
pnpm lint Lints with @kirklin/eslint-config
pnpm lint:fix Lints and fixes what can be fixed
pnpm typecheck Checks the types with vue-tsc

Each commit runs ESLint on the staged files and checks the message against Conventional Commits.

Add components

Add shadcn-vue components with the CLI the template installs, then format the new files in the project's style:

pnpm shadcn-vue add dialog
pnpm lint:fix

When a component builds on one you already have, such as dialog on button, the CLI asks before it overwrites your copy.

Docker production build

Build the image from the project root:

docker buildx build . -t boot-vue:latest

Run it and map a port with -p:

docker run --rm -it -p 8080:80 boot-vue:latest

The app is then served by nginx on http://localhost:8080.

Back to top

📁 Project structure

Path What it holds
src/components/ui shadcn-vue components, added by its CLI
src/components/landing The tiles of the home page
src/composables Composables, imported automatically
src/layouts The site bar with its menu, and the footer
src/locales One JSON file of messages for each language
src/pages Pages, routed in src/router/routes/modules
src/store Pinia stores, imported automatically
src/styles/main.css Tailwind CSS entry, theme variables and the font stack
types Generated declarations of the auto imports and components
public Files served as they are, such as the icons of the PWA

For the editor, WebStorm works out of the box, and VS Code needs the Vue - Official extension.

Back to top

🤝 Feedback

If you have any questions or issues, please report them on GitHub Issues.


MIT License © 2023-PRESENT Kirk Lin

About

A Vue 3 starter on Vite 8 with TypeScript, Tailwind CSS 4, shadcn-vue, Pinia, vue-i18n and PWA.

Topics

Resources

Code of conduct

Contributing

Stars

275 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages