Skip to content

Introduction

Vue H5 Template is a Vue 3 mobile H5 development template Monorepo project based on Turborepo.

Features

  • Monorepo Management — Unified management of multiple apps and shared packages with Turborepo + pnpm workspace
  • Three UI Frameworks — NutUI, Vant, and Varlet versions available
  • TypeScript — Full TypeScript support with type-safe file-based routing (unplugin-vue-router)
  • Vite — Vite 8-based build with auto-import and component auto-registration
  • UnoCSS — Atomic CSS engine for utility-first styling, replacing traditional CSS class names
  • Pinia — State management with persistence (AES encryption in production)
  • Mock Backend — Nitro-based mock server with auth and product APIs
  • Eruda — Built-in mobile debugging console (non-production only)
  • Unified Standards — Shared ESLint / Prettier / Stylelint / Commitlint configs
  • Dynamic Title — Auto-update page title on route change
  • Mobile Adaptation — postcss-mobile-forever for responsive viewport adaptation with max-width limiting
  • Internationalization — Supports Simplified Chinese, Traditional Chinese, English, and Japanese

Tech Stack

TechnologyVersionDescription
Vue 33.5Frontend framework
TypeScript6.0Type safety
Vite8.0Build tool
UnoCSS66.xAtomic CSS engine
Turborepo2.9Monorepo management
pnpm10.27Package manager
Pinia3.0State management
Vue Router5.0Routing
unplugin-vue-router0.19Type-safe file routing
Vue I18n11.3Internationalization
Nitro2.xMock server
NutUI4.3UI component library
Vant4.9UI component library
Varlet3.12UI component library
VueUse14.xComposition utilities
Eruda3.xMobile debugging console

Project Structure

vue-h5-template/
├── apps/                 # Applications
│   ├── h5-nutui/         # NutUI H5 app (port 5777)
│   ├── h5-vant/          # Vant H5 app (port 5778)
│   ├── h5-varlet/        # Varlet H5 app (port 5779)
│   └── backend-mock/     # Nitro mock backend
├── packages/             # Shared packages
│   ├── @core/            # Core (design, composables, preferences)
│   ├── locales/          # i18n locale messages
│   ├── stores/           # Pinia state management
│   ├── styles/           # Global styles
│   └── utils/            # Utility functions
├── internal/             # Internal config packages
│   ├── vite-config/      # Shared Vite config
│   ├── tsconfig/         # Shared TypeScript config
│   └── lint-configs/     # Shared lint configs
├── scripts/              # Build scripts
└── docs/                 # Documentation (this site)

Released under the MIT License.