Coder Social home page Coder Social logo

morellexf13 / vite-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 3.13 MB

⚡️ A Vue 3 Starter Boilerplate with Vue Router 4, Pinia 2, Vite 5, Sass, Axios, Jest 29 and More

License: MIT License

HTML 1.96% JavaScript 70.07% Vue 26.15% CSS 1.82%
boilerplate-template starter-template vue3 vuejs without-vue-cli in-portfolio vite5

vite-boilerplate's Introduction


⚡️

Vite Boilerplate


A Vue 3 Starter Boilerplate with Vue Router 4, Pinia 2, Vite 5, Sass, Axios, Jest 29 and More.

Version


Create a cutting-edge website using the latest technologies available. Vite Boilerplate, an all-inclusive solution, will provide you with essential features such as framework integration, state management, routing, API communication, unit testing, and much more.

👨🏻‍🏫 Learn More


🌈 Features

  • Basic login/logout state definition using Pinia.
  • Basic Store configured using Pinia and Persist Plugin (stores/index.js).
  • Basic "Home" and "Login" pages defined (src/pages/).
  • Basic "Title" and "Button" components defined using slots and custom properties.
  • Basic router configuration defined (/router.js).
  • Basic GET request using Axios (Spotify Tracker API). This request needs an Authorization Bearer Token . For security purposes you can just set this token on environment files.
  • Environment file example.
  • Jest configuration defined.
  • Unit test suite per each defined page, API test included.
  • Path alias defined (vite.config.js).
  • GitHub actions workflow example defined.

🏛 Folder Structure

vite-boilerplate
├─ .gitignore
├─ LICENSE
├─ README.md
├─ babel.config.json
├─ index.html
├─ jest.config.js // 🃏 Unit tests configuration
├─ jsconfig.json
├─ package-lock.json
├─ package.json
├─ public
│  └─ favicon.ico
├─ router.js // 🧭 Handle page routes
├─ src
│  ├─ App.vue
│  ├─ assets
│  │  ├─ css
│  │  │  └─ index.css // 🎨 Main stylesheet file
│  │  ├─ logo.png
│  │  ├─ screenshots
│  │  │  └─ login.png
│  │  └─ scripts
│  │     ├─ api.js // 📡 Handle api calls
│  │     └─ session.js // 👦🏻 Handle user session
│  ├─ components
│  │  ├─ Button.vue
│  │  ├─ MainSection.vue
│  │  ├─ Title.vue
│  │  └─ UserSessionLink.vue
│  ├─ main.js // 🪴 Application's entry point
│  └─ pages
│     ├─ Home.vue
│     ├─ Login.vue
│     └─ SpotifyTracker.vue
├─ stores
│  └─ index.js // 💾 Save general state of the app
├─ tests // 🃏 Unit tests
│  ├─ routerMock.js
│  └─ unit
│     ├─ spotify.spec.js
│     └─ user-session.spec.js
└─ vite.config.js // 📦 Bundler setup, alias and more


🚀 Install

Install it locally in your project

npm install

npm run dev

🧪 Unit tests

npm run test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.