A simple boilerplate for Laravel + Vue with authentication through Sanctum/Fortify

Overview

About this boilerplate

Basic boilerplate to quickly and easy get started with a Laravel API and a Vue SPA frontend. Nothing has been done, so everything is possible! This is just a scaffolding to avoid a lot of copypasting in the beginning of projects.

A few notes on backend:

  • Laravel 8
  • API is headless and by default separated on a subdomain, i.e. api.yourapp.test
  • Authentication is handled by Laravel Sanctum and Laravel Fortify
  • Only a simple seeder is provided to create a test user

A few notes on frontend:

  • Vue 3 + Vue Router + Vuex with TailwindCSS/PostCSS
  • ESLint with Babel+Vue extensions
  • A few basic views are supplied, auth (login, forgot/reset password) and a home view, to illustrate the authentication flow
  • vue-router is implemented with support for middleware. See examples in resources/js/router/middleware
  • vuex is implemented with modules. The only present module at first is auth, but is fully extendable for all needs.
  • A simple "layout" manager is implemented. This allows for defining the layout property in any Vue routed components base properties, such as:
export default {
    components: {
        PrimaryButton
    },

    layout: 'basic',

    props: {
    ...

Installation

Clone this repo, and run:

composer install
cp .env.example .env

Edit the .env to reflect your setup in regards of DB and APP_URL (Using Laravel Valet is highly recommended), then run:

php artisan key:generate
php artisan migrate --seed

yarn && yarn production

See package.json for Laravel Mix-scripts for development.

You might also like...
LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like Advanced CRUD Generation, Module Manager, Backups and many more.
LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like Advanced CRUD Generation, Module Manager, Backups and many more.

LaraAdmin 1.0 LaraAdmin is a Open source CRM for quick-start Admin based applications with features like Advanced CRUD Generation, Schema Manager and

A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0

AdminLTE template Laravel package A Laravel package that switch default Laravel scaffolding / boilerplate to AdminLTE template with Bootstrap 3.0 and

Laravel and AngularJS Starter Application Boilerplate featuring Laravel 5.3 and AngularJS 1.5.8

💁 Zemke/starter-laravel-angular has been upgraded to AngularJS 1.5.8. 💁 Zemke/starter-laravel-angular has been upgraded to Laravel 5.3. You can pull

Laravel Boilerplate (Current: Laravel 8.*)

Laravel Boilerplate (Current: Laravel 8.*) (Demo) Demo Credentials Admin: [email protected] Password: secret User: [email protected] Password: secret Offici

Laravel Quick-Start - a boilerplate for Laravel Application with typical packages preinstalled and configured

Laravel Quickstart is a boilerplate for Laravel Application with typical packages preinstalled and configured to extend a full-fledged application. We tried to make it as minimal as possible.

Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Starter With Laravel, Vite, Vue 2, Inertia.js, Ziggy

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Laravel Starter With Laravel, Vite, Vue 2, Inertia.js, Ziggy, Typescript

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Owner
ikoncept
ikoncept
A Laravel 8 and Vue 3 SPA boilerplate using tailwind styling and sanctum for authentication :ghost:

Laravel Vue Sanctum SPA Laravel and vue spa using tailwind (laravel/ui looks) for styling and sanctum for authentification Features Laravel 8 Vue + Vu

Hijen EL Khalifi 62 Dec 5, 2022
Creating authentication using sanctum, laravel and VUE

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Mohd Aminuddin 1 May 11, 2022
Simple Laravel API with Sanctum Authentication.

Laravel API (with sanctum authentication) What is sanctum? Laravel Sanctum provides a featherweight authentication system for SPAs (single page applic

Nopal 2 Jul 14, 2022
Hydra is a zero-config API boilerplate with Laravel Sanctum that comes with excellent user and role management API out of the box

Hydra - Zero Config API Boilerplate with Laravel Sanctum Hydra is a zero-config API boilerplate with Laravel Sanctum and comes with excellent user and

Hasin Hayder 858 Dec 24, 2022
Base Laravel project with React and Laravel Sanctum authentication

About this project This is a base Laravel project with ReactJS frontend and Laravel Sanctum API authentication. You could read more about here. Instal

David Toth 8 Oct 25, 2022
TweetNow is a Twitter clone created with Vue.js and Laravel. It is a social media platform that allows users to post short messages, follow other users, and engage in conversations through comments and likes.

TweetNow TweetNow is a opensource social media created with Vue.js+Inertia SSR and Laravel. It is a social media platform that allows users to post sh

I.E.U. Juboraj Naofel 12 Jun 16, 2023
The Laravel Boilerplate Project - https://laravel-boilerplate.com

Laravel Boilerplate (Current: Laravel 8.*) (Demo) Demo Credentials Admin: [email protected] Password: secret User: [email protected] Password: secret Offici

Anthony Rappa 5.4k Jan 4, 2023
High scalable boilerplate for Laravel - Vue using laravel-mix.

Why use this ? This boilerplate make developer easier to make monolith Laravel project which integrated with Vue.js and vue-router as default front-en

Carvel Saputra Martaloho 5 Sep 21, 2022
:elephant: A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.

Laravel Vue Boilerplate A Laravel 6 Single Page Application boilerplate using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass and Pug with: A users

Alefe Souza 533 Jan 3, 2023
Admin One is simple, beautiful and free Laravel admin dashboard (built with Vue.js, Bulma & Buefy).

Admin One — Free Laravel Vue Bulma Dashboard Admin One is simple, beautiful and free Laravel admin dashboard (built with Vue.js, Bulma & Buefy). Built

Viktor Kuzhelny 136 Dec 27, 2022