alidogu / Vue-Starter-main

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue Starter

🐩 A boilerplate for HTML5, Vue, TypeScript, Vite, Vitest, and Render.

🌈 Live Demo - The server application is here.

Table of Contents

Getting Started

Prerequisites:

  • Node.js v20
  • PNPM v8

Get started with Vue Starter.

$ pnpm install

# dev server
$ pnpm dev

# mock server
$ pnpm mock

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

Directory Structure

The structure follows the LIFT Guidelines.

.
β”œβ”€β”€ .github/workflows/ci.yml
β”œβ”€β”€ api
β”œβ”€β”€ e2e
β”œβ”€β”€ public
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ assets
β”‚   β”œβ”€β”€ components
β”‚   β”œβ”€β”€ composables
β”‚   β”œβ”€β”€ layouts
β”‚   β”œβ”€β”€ locales
β”‚   β”œβ”€β”€ middleware
β”‚   β”œβ”€β”€ plugins
β”‚   β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ utilities
β”‚   β”œβ”€β”€ App.vue
β”‚   β”œβ”€β”€ main.ts
β”‚   └── shims.d.ts
β”œβ”€β”€ ui
β”œβ”€β”€ .editorconfig
β”œβ”€β”€ .eslintrc
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .prettierrc
β”œβ”€β”€ Caddyfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
β”œβ”€β”€ pnpm-lock.yaml
β”œβ”€β”€ pnpm-workspace.yaml
β”œβ”€β”€ README.md
β”œβ”€β”€ render.yaml
β”œβ”€β”€ tsconfig.json
└── vite.config.ts

About


Languages

Language:Vue 87.8%Language:TypeScript 12.1%Language:HTML 0.1%Language:Dockerfile 0.1%