Home

Awesome

Vitesse Enterprise Starter

<div align='center'> <img src='https://user-images.githubusercontent.com/11247099/154486432-9f424d8a-088a-47ab-92c5-b24a0e7c147e.png' alt='Vitesse - Opinionated Vite starter template with rigorous linting' width='600' /> </div> <br> <div align='center'> <h3>Demonstrations</h3> <a href="https://vitesse-enterprise.netlify.app/">Live on Netlify</a> <br> <a href="https://vitesse-enterprise.vercel.app/">Live on Vercel</a> <br> <a href="https://stackblitz.com/fork/github/FranciscoKloganB/vitesse-enterprise?file=.stackblitzrc"> Playground on Stackblitz </a> </div> <br>

Features

*CLI only. VSCode plugin does not support configuration files.

Pre-packed

UI Frameworks

Icons

Plugins

Coding Style

Dev tools

Developer Experience

Variations

This template is strongly opinionated with my personal preferences and feature sets. It is a fork of the original template created by @antfu and also takes inspiration from vitesse-stackter made by @shamscorner.

For an up-to-date list of official and community contributions to the vitesse ecosystem, we recommend checking the official repository's variations section.

Try it now

GitHub Template

Create a repo from this template on GitHub.

Clone to local

If you prefer to do it manually with the cleaner git history

npx degit FranciscoKloganB/vitesse-enterprise my-vitesse-enterprise-app
cd my-vitesse-enterprise-app
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm

Checklist

When you use this template, try follow the checklist to update your info properly

Usage

Development

Run and visit http://localhost:4000

pnpm dev

Code formatting and linting

pnpm lint

Testing

pnpm run:test

Build for production

# Alias for "run-s prebuild 'build:prod:ssg'"
pnpm run:build
# Other builds
# Ouputs files to dist folder. Ready to be served in SPA mode.
pnpm build:prod
# Outputs files to dist folder which passed through the Vite SSG pipeline. Ready to be served.
pnpm build:prod:ssg

Previewing

# Runs project locally with files from dist folder
pnpm run:preview
# Can also run locally with HTTPS (may require sudo) - requires available dist/ folder
pnpm preview:https

Separation of Concerns

Deploy on Netlify

Go to Netlify and select your clone, OK along the way, and your App will be live in a minute.

Docker Production Build

First, build the vitesse image by opening the terminal in the project's root directory.

# One of either
DOCKER_BUILDKIT=1 docker build . -t vitesse:latest
# Docker Buildx is a CLI plugin to extend docker command and support BuildKit without the env var.
docker buildx build . -t vitesse:latest

Run the image and specify port mapping with the -p flag.

docker run --rm -it -p 8080:80 vitesse:latest

Deploy on Vercel

Vercel has some short-commings regarding pnpm based projects. After creating and importing the project on Vercel dashboard you will need to navigate to the project settings and override the Build Command and Install Command respectively, with the following bash commands:

  # Build Command
  npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run:build
  # Install Command
  npm i -g pnpm && pnpm -i

Alternatevely, for zero configuration on import you need to alter package.json scripts to have a build and install entries with the commands above.

Why

On top of what was mentioned by Anthony Fu in the original post, working in conjunction with others often requires strict styling rules. Creating a seamless developer experience across VSCode, CLI and CI/CD consumes time. Vue, Vite and, Vitesse, are amazing tools for web developmen and are now my go to choices for development. To avoid repeating myself over and over again for to get this configurations going, I decided to fork Vitesse repository and create a baseline project for my own (or other people) use, enabling us to be vite. Pun intended.

Feedback

If you notice any bug, inconsistency or change for improvement, feel free to either create an issue so that I may try to fix it later or to propose a pull request with the changes.