Skip to content

🐩 A boilerplate for web applications with Vue and Tailwind using TypeScript on Vite.

Notifications You must be signed in to change notification settings

Shyam-Chen/Vue-Starter

Repository files navigation

Vue Starter

🐩 A boilerplate for SPA Client with HTML5, Vue, and Tailwind on Vite.

🌈 View Demo: Live | Windows | macOS | Android | iOS

:octocat: Source Code: Web-side | Native-side | Server-side

Table of Contents

Getting Started

Prerequisites:

  • Node.js v20
  • PNPM v9

Get started with Vue Starter.

# install dependencies
$ pnpm install

# dev server (in one terminal)
$ pnpm dev

# mock server (in another terminal)
$ pnpm mock

Or use barebones scaffolding for your new Vue app

$ pnpm dlx degit Shyam-Chen/Starter-Templates/vue my-vue-app

Project Setup

Follow steps to execute this boilerplate.

Install dependencies

$ pnpm install

Compiles and hot-reloads for development

$ pnpm dev

Mock APIs during development

$ pnpm mock

Compiles and minifies for production

$ pnpm build

Locally preview the production build

$ pnpm preview

Lints and fixes files

Biome CLI

$ pnpm biome check --apply ./app ./ui ./mock ./e2e

Check types

$ pnpm check

Runs unit tests

$ pnpm test

Runs end-to-end tests

$ pnpm e2e

Key Features

This seed repository provides the following features:

Configuration

Control the environment.

Default environments

Set your local environment variables.

// vite.config.ts
  define: envify({
    API_URL: process.env.API_URL || '',
  }),

Continuous integration environments

Add environment secrets to the GitHub Actions workflow.

DEPLOY_HOOK=xxx

Continuous delivery environments

Add environment variables to the Render build.

API_URL=xxx

Directory Structure

The structure follows the LIFT Guidelines.

.
β”œβ”€β”€ .github/workflows/ci.yml
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ public
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ assets
β”‚   β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ composables
β”‚   β”‚   β”œβ”€β”€ layouts
β”‚   β”‚   β”œβ”€β”€ locales
β”‚   β”‚   β”œβ”€β”€ middleware
β”‚   β”‚   β”œβ”€β”€ plugins
β”‚   β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”œβ”€β”€ utilities
β”‚   β”‚   β”œβ”€β”€ workers
β”‚   β”‚   β”œβ”€β”€ App.vue
β”‚   β”‚   β”œβ”€β”€ main.ts
β”‚   β”‚   └── shims.d.ts
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── vite.config.ts
β”œβ”€β”€ docs -> Write documentation with VitePress
β”‚   β”œβ”€β”€ .vitepress
β”‚   β”œβ”€β”€ index.md
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
β”œβ”€β”€ e2e -> End-to-end testing of web pages
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ playwright.config.ts
β”‚   └── tsconfig.json
β”œβ”€β”€ infra -> Infrastructure as code
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ Pulumi.yaml
β”‚   └── tsconfig.json
β”œβ”€β”€ mock -> Mock backend API
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── vite.config.ts
β”œβ”€β”€ ui -> Design system
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── vite.config.ts
β”œβ”€β”€ .editorconfig
β”œβ”€β”€ .eslintrc
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .prettierrc
β”œβ”€β”€ biome.json
β”œβ”€β”€ Caddyfile
β”œβ”€β”€ compose.yaml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ package.json
β”œβ”€β”€ pnpm-lock.yaml
β”œβ”€β”€ pnpm-workspace.yaml
β”œβ”€β”€ README.md
└── render.yaml