All Projects → codecasts → Spa Starter Kit

codecasts / Spa Starter Kit

Licence: mit
A highly opinionated starter kit for building Single Page Applications with Laravel and Vue.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Spa Starter Kit

Running Time
Sample Single Page Application using Laravel & Vue.js + Vuex + Vue-Router
Stars: ✭ 90 (-90.35%)
Mutual labels:  laravel, spa, single-page-app
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 (-91.85%)
Mutual labels:  laravel, spa, single-page-app
Vanillajs Spa
a simple SPA in vanilla js
Stars: ✭ 265 (-71.6%)
Mutual labels:  spa, single-page-app
Ios Pwa Wrapper
An iOS Wrapper application to create a native iOS App from an offline-capable Progressive Web App.
Stars: ✭ 268 (-71.28%)
Mutual labels:  spa, single-page-app
Roastandbrew
Updated content available! We learned a lot since we originally wrote this article. We now have this updated for Laravel 8, Vue, and NuxtJS 👉 https://srvrsi.de/book
Stars: ✭ 300 (-67.85%)
Mutual labels:  laravel, spa
wordpress
Free PWA & SPA for Wordpress & Woocommerce
Stars: ✭ 103 (-88.96%)
Mutual labels:  spa, single-page-app
cakephpvue-spa
A CakePHP + VueJS single page application skeleton/boilerplate.
Stars: ✭ 40 (-95.71%)
Mutual labels:  spa, single-page-app
Abstract State Router
Like ui-router, but without all the Angular. The best way to structure a single-page webapp.
Stars: ✭ 288 (-69.13%)
Mutual labels:  spa, single-page-app
spring-boot-react-blog
Token-based blog application using spring boot, react and jwt.
Stars: ✭ 132 (-85.85%)
Mutual labels:  spa, single-page-app
Preact Starter
Webpack3 boilerplate for building SPA / PWA / offline front-end apps with Preact
Stars: ✭ 384 (-58.84%)
Mutual labels:  starter-kit, spa
Laravel Enterprise Starter Kit
👔 Enterprise Web application starter kit or template using Laravel
Stars: ✭ 356 (-61.84%)
Mutual labels:  laravel, starter-kit
Webpack Starter Basic
A simple webpack starter project for your basic modern web development needs.
Stars: ✭ 552 (-40.84%)
Mutual labels:  starter-kit, spa
Erlach
☣⚫⚫ SPA Imageboad on WebSockets written on Erlang
Stars: ✭ 23 (-97.53%)
Mutual labels:  spa, single-page-app
webviewhs
🌐 A Haskell binding to the webview library created by Serge Zaitsev.
Stars: ✭ 109 (-88.32%)
Mutual labels:  spa, single-page-app
Android Pwa Wrapper
Android Wrapper to create native Android Apps from offline-capable Progressive Web Apps
Stars: ✭ 265 (-71.6%)
Mutual labels:  spa, single-page-app
stimulus todomvc
[WIP] An implementation of TodoMVC using Ruby on Rails and StimulusJS
Stars: ✭ 14 (-98.5%)
Mutual labels:  spa, single-page-app
Browser
Create Elm programs that run in browsers!
Stars: ✭ 284 (-69.56%)
Mutual labels:  spa, single-page-app
Vue Crud
Vue.js based REST-ful CRUD system
Stars: ✭ 629 (-32.58%)
Mutual labels:  spa, single-page-app
jquery-spa-example
Example Single Page Application build with jQuery
Stars: ✭ 27 (-97.11%)
Mutual labels:  spa, single-page-app
wordpress-svelte
Frontend writen on svelt
Stars: ✭ 17 (-98.18%)
Mutual labels:  spa, single-page-app

Codecast's Single Page Application Starter Kit

Build Status

Cover

A highly opinionated Single Page Application starter kit built on top of Vue.js and Laravel.

This package contains two separate projects to act as a starting point for a Single Page Application: a Vue.js project (created with vue-cli + webpack template) and a Laravel 5.3 project.

They're not just freshly created projects but a fully working application that can be modified and expanded to become your own application.

Demo

The live demo can be found in https://spa.codecasts.rocks/.

Features

  1. Client side
    • Vue.js 2.0 project create with vue-cli + webpack template
    • Centralized state management with Vuex
    • Route management with Vue-router
    • Authentication with JWT
    • Keep user signed in using local stored info
    • HTTP requests with Axios
    • ESLint with AirBNB preset
    • Pagination integrated with Laravel's LengthAwarePaginator
    • Alerts and Confirmation Alerts provided by SweetAlert
  2. Server side

Prerequisites

Make sure you have installed Node and Yarn (latest versions) as well as PHP 7 and MySQL.

Installation

Cloning

These commands will download the repository and prepare it for you.

git clone --depth 1 -b master [email protected]:codecasts/spa-starter-kit.git
cd spa-starter-kit
rm -rf ./.git/
git init
git add --all
git commit -m "init"

Setup

  1. Client side - this is a Vue.js project created with vue-cli
    • With Terminal cd client && yarn && yarn run dev.
  2. Server side - this is a Laravel 5.3 project
    • With Terminal:
      • Navigate to webservice folder and then:
      • composer install to install Laravel and third party packages
      • touch database/database.sqlite to create an empty database file
      • cp .env.example .env to configure installation
      • php artisan key:generate to generate unique key for the project
      • php artisan jwt:secret to generate unique key for the project
      • php artisan migrate to create all the tables
      • php artisan db:seed to fill the tables with fake data
      • php artisan serve to serve application on localhost:8000

Usage

  1. Client side
  2. Server side
    • API endpoint is http://localhost:8000/api

Testing

Navigate to webservice folder and run the composer test script

$ composer test

Things worth mentioning

  1. Error handling is done globally by making use of Axios' interceptors. But you can still .catch() errors within components to perform actions related to that scope. See /client/src/plugins/http.js;

  2. The same way error messages lives in one single component (/client/src/modules/general/alerts.vue) and their visibility is controlled by a Vuex property. So to show/hide messages it is just a matter of dispaching a Vuex action from within any component;

  3. The spinner displayed during server requests (see top right close to user indentification) is also controlled by a Vuex property. The procedure to show/hide it is the same as outlined in the item 2 above;

  4. routes and Vuex modules live close to the modules they work for. Always look for routes.js and store.js inside a module directory. See /client/src/modules/categories;

  5. Important: Laravel project found in the directory webservice was modified beyond adding routes and controllers. For instance: the webservice/app/Exceptions/Handler.php was modified from its original version to return all exceptions to the client, not only HttpExceptions. Other changes are also in place. So our recommendation is to always use this project to build your own, instead of copying controllers and routes to a new project.

Contributing

  1. Fork it!
  2. Create your feature branch from develop: git checkout -b feature/my-new-feature
  3. Write your code. Comment your code.
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin feature/my-new-feature
  6. Submit a pull request to develop branch :D

Credits

Fábio Vedovelli and dedicated contributors.

License

Licensed under the MIT license.

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].