All Projects → zmts → Beauty Vuejs Boilerplate

zmts / Beauty Vuejs Boilerplate

Licence: mit
❤️ Real world base Vue.js app. Access/refresh tokens auth, api services, http client, vuex modules

Projects that are alternatives of or similar to Beauty Vuejs Boilerplate

Koa Vue Notes Api
🤓 This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Features MySQL integration, user authentication, CRUD note actions, and async/await.
Stars: ✭ 342 (-41.34%)
Mutual labels:  api, jwt, boilerplate, spa
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+205.32%)
Mutual labels:  api, realworld, jwt, boilerplate
Koa Vue Notes Web
🤓 This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Features MySQL integration, user authentication, CRUD note actions, and Vuex store modules.
Stars: ✭ 200 (-65.69%)
Mutual labels:  jwt, boilerplate, vuex, spa
Blog
一个go、echo、vue 开发的快速、简洁、美观、前后端分离的个人博客系统(blog)、也可方便二次开发为CMS(内容管理系统)和各种企业门户网站
Stars: ✭ 388 (-33.45%)
Mutual labels:  api, vuex, spa
Vue Crud
Vue.js based REST-ful CRUD system
Stars: ✭ 629 (+7.89%)
Mutual labels:  boilerplate, vuex, spa
Enso
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]el-enso.com` & `password` -
Stars: ✭ 959 (+64.49%)
Mutual labels:  boilerplate, vuex, spa
Go Restful Api
An idiomatic Go REST API starter kit (boilerplate) following SOLID principles and Clean Architecture
Stars: ✭ 1,043 (+78.9%)
Mutual labels:  api, jwt, boilerplate
Laravel Vue Starter
Well Documented Laravel Starter App From Development to Production. For Full Blown RESTFUL API and SPA with Beautiful UI Using Buefy / ElementUi For Reusable Vue Components
Stars: ✭ 76 (-86.96%)
Mutual labels:  api, jwt, spa
Laravel Api Boilerplate Jwt
A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.
Stars: ✭ 1,155 (+98.11%)
Mutual labels:  api, jwt, boilerplate
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-73.76%)
Mutual labels:  api, jwt, boilerplate
Plato
❤️ a Boilerplate for [mobile] SPAs use vue, vuex, vue-router
Stars: ✭ 283 (-51.46%)
Mutual labels:  boilerplate, vuex, spa
Vue2 Echo
基于vue2 + vue-router + vuex 构建的一个音乐类单页面应用 —— echo回声
Stars: ✭ 408 (-30.02%)
Mutual labels:  vuex, spa
Preact Starter
Webpack3 boilerplate for building SPA / PWA / offline front-end apps with Preact
Stars: ✭ 384 (-34.13%)
Mutual labels:  boilerplate, spa
Express Rest Api Boilerplate
Express REST API with JWT Authentication and support for sqlite, mysql, and postgresql
Stars: ✭ 384 (-34.13%)
Mutual labels:  jwt, boilerplate
Jwtrefreshtokenbundle
Implements a Refresh Token system over Json Web Tokens in Symfony
Stars: ✭ 425 (-27.1%)
Mutual labels:  api, jwt
Koa Rest Api Boilerplate
💯 Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI
Stars: ✭ 420 (-27.96%)
Mutual labels:  api, boilerplate
Jwt sessions
XSS/CSRF safe JWT auth designed for SPA
Stars: ✭ 431 (-26.07%)
Mutual labels:  api, jwt
Normalizr
Normalizes nested JSON according to a schema
Stars: ✭ 20,721 (+3454.2%)
Mutual labels:  api, flux
React Starter Kit
React Starter Kit — front-end starter kit using React, Relay, GraphQL, and JAM stack architecture
Stars: ✭ 21,060 (+3512.35%)
Mutual labels:  flux, boilerplate
Go Api Boilerplate
Go Server/API boilerplate using best practices DDD CQRS ES gRPC
Stars: ✭ 373 (-36.02%)
Mutual labels:  api, boilerplate

Real World Vue.js Boilerplate

This project based on real world practice and ready to use. Have a fun!

Features

  • Http request class that implements API calls with Auth and tokens refresh based on Axios
  • Data access layer/API calls
  • Response wrapper/Response error wrapper
  • Base common and layout components
  • Some help mixins
  • Vue CLI v4
  • Developed to work with: https://github.com/zmts/supra-api-nodejs

Project structure

src

Source =)

assets

Images/Fonts/Other media stuff.

components

Shared components folder.

  • DataBox wrap in this component any received data. It represents loading(spinloader animation), error and empty statuses (examaple in src/pages/News.vue).
  • UiImgLoader - img tag wrapper. Shows image loading(pulseloader animation) status and animate onloading as option.
  • UiModal - simple modal window.
  • PulseLoading and SpinnerWave - loading animation.
  • UiUploadMulti and UiUploadSingle - file upload example components.
  • ...

config

App config files. Each category in separate file.

directives

  • Handy debounce directive

layout

Base app layout components.

  • Header, Footer components and main layout wrapper.

mixins

  • One method/prop per file principle.
  • Name files same as method/prop.
  • currentUser - Includes current user object from store. Global.
  • formatDateTime - Datetime moment formatters. Global.
  • jumpTo - Help jump to some DOM element. Global.
  • prepareFetchParamsMixin - Prepare params for data fetching (examaple in src/pages/News.vue).
  • prepareQueryParamsMixin - Prepare params for setting it in URL (examaple in src/pages/News.vue).
  • setModelMixin - Use to set same fields from response that declared in front-end model.

pages

Page wrapper components(Pages) and Local components.

plugins

  • globalEventBus - $bus.

router

Router instance and routing declaration.

  • index - router initialization.
  • routes - routing.
  • middlewares:
    • initCurrentUserStateMiddleware - Current user state initialization (each time app loads, check refresh token and fetch current user if token exist.)
    • checkAccessMiddleware - Each time user change route, check permissions to route.
    • setPageTitleMiddleware - Each time user change route, set page title.
  • util:
    • routePropResolver - Pass params from URL to component as props (example in src/router/routes.js)

scss

Style files(partials, variables, mixins, reset).

services

Data access layer/API calls.

  • ES6 API calls classes.
  • API calls must be represented in separate classes (not in vuex action).
  • auth.service - Auth methods and API calls.
  • http.init - Http request class.
  • util:
    • ResponseWrapper - Represent response object.
    • ErrorWrapper - Represent error object.
    • clearData - Uses to clear request data before send it. Helper.

store

App store with separate modules.

.env.js

Environment variables (add this to git ignore).

main.js

Root app initialization file.

global.helpers.js

Add global helpers to window object. Yepp globals ... =)

How to declare global SCSS variables/mixins etc... ?

In /build/utils.js >> generateLoaders('sass')

Utils/Helpers

What about debounce ?

import debounce from '../directives/debounce'
directives: {
  debounce
}

And use it in a template.

<input type="text" v-model="name" v-debounce="500" @debounce-change="runSomeMethod">

Notifications/Toast:

Just make mutation

commit('dom/TOAST', { message: 'hello', duration: 2000, type: 'success' })

Icons/SVG:

Set up yours svg icons in src/components/icons/ folder. Modify UiIconBase.vue related to yours newly added icons and use it in template.

<UiIconBase size="40" color="yellow" icon="write"/>

Build Setup

# clone repo
git clone https://github.com/zmts/vuejs-boilerplate.git

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run serve

# build for production with minification
npm run build

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

Amazing repos where I found some great approaches:

!!! Project still in progress !!!

2017 - 2018 - 2019 - 2020 ...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].