Vue Starter

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

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

:octocat: Source Code: Web-side | Native-side | Server-side | Cloud-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/Barebones-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

$ pnpm lint

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

Container registry

Push the image to your registry.

$ docker build -f ./.github/registry/Dockerfile \
               --build-arg SITE_ADDRESS=$SITE_ADDRESS \
               -t $SITE_NAME .

$ docker tag $SITE_NAME $REGISTRY_URL

$ docker push $REGISTRY_URL

Directory Structure

The structure follows the LIFT Guidelines.

.
ā”œā”€ā”€ .github
ā”œā”€ā”€ 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
ā”œā”€ā”€ e2e -> End-to-end testing of web pages
│   ā”œā”€ā”€ src
│   ā”œā”€ā”€ package.json
│   ā”œā”€ā”€ playwright.config.ts
│   └── 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
ā”œā”€ā”€ .dockerignore
ā”œā”€ā”€ .editorconfig
ā”œā”€ā”€ .gitignore
ā”œā”€ā”€ Caddyfile
ā”œā”€ā”€ compose.yaml
ā”œā”€ā”€ Dockerfile
ā”œā”€ā”€ eslint.config.js
ā”œā”€ā”€ package.json
ā”œā”€ā”€ pnpm-lock.yaml
ā”œā”€ā”€ pnpm-workspace.yaml
ā”œā”€ā”€ prettier.config.js
ā”œā”€ā”€ README.md
└── render.yaml

Top categories

tailwind logo

Need a Tailwind website built?

Hire a professional TailwindCSS developer today.
Loading Svelte Themes