GithubHelp home page GithubHelp logo

ibrahimsk1 / vue3-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 3.0 240 KB

Vue 3 Boilerplate

JavaScript 53.16% HTML 4.06% Vue 42.49% Shell 0.29%
vuex vue axios vue-router vue-i18n boilerplate spa pwa boilerplate-template boilerplate-front-end

vue3-boilerplate's Introduction

Vue 3 Boilerplate

This project based on "axios": 0.21.0, ,"core-js": 3.6.5, "vue": 3.0.0, , vue-i18n: 9.0.0-beta.15, ,"vue-router": 4.0.1, "vuex": 4.0.0.

Features

  • Global Error Handling
  • Http request class based on Axios and Services(Auth , Logger , ... )
  • Vuex 4 with multiple modules
  • Vue Router w AuthControl beforeRoute option
  • Layouts
  • i18n inter
  • views
  • utils

Project structure

src

source folder

assets

Images/Fonts/Other media stuff.

components

Shared and other Components

constants

App config and static data files

i18n

Internationalization plugin for Vue.js

  • intlify/vue-i18n-next is used.
  • defaultLocale is 'en' and have an option 'tr'
  • can control via store i18n module

layout

Base app layout components.

  • Auth, Home , .. layouts
  • Header, Footer components added in Home layout.

services

  • Http request class based on Axios w Response and Request Middleware classes
  • Api class wrapper for Http class
  • AuthService based on Api class controls AuthorizationHeader , localStorage and Auth based Apis
  • Logger Service used in Global error handling module

store

Vuex 4 store

  • Multiple modules (Auth , i18n)

utils

  • AuthRequired - controls Auth beforeEnter w router
  • ExeceptionHandler controls global error w window.onerror and Vue.config.errorHandler
  • Logs with LoggerService
  • Intercept High order class wraps home component. - Global and other dailogs - Main loading screen

views

Contain views used in app.

  • Views index file use Layout and router-view
  • Auth , Home , Error(404) views

.env.js

Environment variables (add this to git ignore).

main.js

Root app initialization file.

App.vue

Root app initialization file.

router

Router instance and routing declaration.

  • router initialization,
  • Auth control
  • redirect to child w consuming Layouts

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

vue3-boilerplate's People

Contributors

ibrahimsk1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.