---
name: vitesse-uni-app
description: Vite-powered opinionated uni-app starter template with best practices
---
# vitesse-uni-app
Opinionated uni-app starter template powered by Vite. Includes best practices, pre-configured tooling, and modern development experience.
## Features
- ⚡️ **Vite** - Fast development and building
- 🌍 **uni-app** - Cross-platform development
- 🖖 **Vue 3** - Composition API, `
```
### Vue APIs
Vue APIs are auto-imported:
```vue
```
## Routing
File-based routing with pages in `src/pages/`:
```
pages/
├── index.vue # /pages/index/index
├── about.vue # /pages/about/index
└── user/
├── index.vue # /pages/user/index
└── [id].vue # /pages/user/:id
```
### Page Configuration
```vue
```
## Layouts
Create layouts in `src/layouts/`:
```vue
```
Apply in pages:
```vue
Content
```
## Styling with UnoCSS
```vue
Styled with UnoCSS
```
## State Management with Pinia
```ts
// src/stores/user.ts
import { defineStore } from 'pinia'
export const useUserStore = defineStore('user', () => {
const name = ref('')
const isLoggedIn = computed(() => !!name.value)
function login(userName: string) {
name.value = userName
}
return { name, isLoggedIn, login }
})
```
```vue
```
## Data Fetching
```vue
Loading...
Error: {{ error.message }}
{{ user.name }}
```
## Deployment
### Build for production
```bash
npm run build
```
### Platform-specific builds
```bash
# H5
npm run build:h5
# WeChat Mini Program
npm run build:mp-weixin
# App
npm run build:app
```