Overview
Codecast’s Single Page Application Starter Kit is an opinionated starter kit for building Single Page Applications (SPAs) using Vue.js and Laravel. It provides a fully working application that can be customized and expanded to suit individual needs.
Features
Client side:
- Vue.js 2.0 project created with vue-cli + webpack template
- Centralized state management with Vuex
- Route management with Vue-router
- Authentication with JWT
- User session persistence using local storage
- HTTP requests handled with Axios
- ESLint with AirBNB preset for code quality
- Pagination integrated with Laravel’s LengthAwarePaginator
- Alerts and Confirmation Alerts provided by SweetAlert
Server side:
- Laravel 5.3 project
- Authentication with JWT
- Web service RESTful with Dingo (planned)
Installation
Before installing the starter kit, ensure that Node, Yarn, PHP 7, and MySQL are installed.
To install the starter kit, follow these steps:
- Clone the repository and navigate to the cloned directory.
- For the client side (Vue.js project), navigate to the “client” directory and run
yarnfollowed byyarn run dev. - For the server side (Laravel project), navigate to the “webservice” directory and run
composer installto install Laravel and third-party packages. Create an empty database file by runningtouch database/database.sqlite. Copy the.env.examplefile to.envand configure the installation. Generate a unique key for the project usingphp artisan key:generateandphp artisan jwt:secret. Runphp artisan migrateto create the tables andphp artisan db:seedto populate the tables with fake data. Finally, serve the application on localhost:8000 usingphp artisan serve.
Summary
Codecast’s Single Page Application Starter Kit is a highly opinionated starter kit for building SPAs using Vue.js and Laravel. It provides a pre-built, customizable application with features such as centralized state management, route management, authentication, HTTP requests, and more. The installation process requires setting up both the client and server sides, ensuring the necessary prerequisites are installed.