laravel-spa

Laravel Auth SPA Boilerplate Laravel Auth SPA Boilerplate

Laravel authentication and user management SPA built with Laravel 13, Vue 3, Socialite, Vite, and Tailwind CSS.

App Version CodeQL Lines of Code MadeWithVueJs.com shield Composer Install StyleCI License: MIT

Follow @jeremykenedy Star laravel-spa on GitHub Sponsor me on GitHub

Table of Contents

About

A Laravel + Socialite + Vite + Vue 3 + TailwindCSS SPA Boilerplate. Laravel with user authentication, registration with email verification, social media authentication, password recovery, user management, and roles/permissions management. Uses official TailwindCSS. While the front end is part of this repository it is a completely separated Vue 3 front end compiled using ViteJS.

Features

Built on

Feature list

The following Sanctum features are implemented in this Vue SPA:

Requirements

Requirements: PHP >= 8.4, Composer, and Node.js >= 22.13 (this repo’s .nvmrc pins Node 24).

Installation

  1. Run git clone https://github.com/jeremykenedy/laravel-spa.git laravel-spa
  2. Create a MySQL database for the project
    • mysql -u root -p, if using Vagrant: mysql -u homestead -psecret
    • create database laravelSpa;
    • \q
  3. From the projects root run cp .env.example .env
  4. Configure your .env file (VERY IMPORTANT)
  5. Run composer install from the projects root folder
  6. From the projects root folder run sudo chmod -R 755 ../laravel-spa
  7. From the projects root folder run php artisan key:generate
  8. From the projects root folder run php artisan migrate
  9. From the projects root folder run composer dump-autoload
  10. From the projects root folder run php artisan db:seed
  11. Compile the front end assets with npm steps or yarn steps.

Build the Front End Assets with Vite

Using npm:

  1. From the projects root folder run npm install
  2. From the projects root folder run npm run dev or npm run build
    • You can lint assets with npm run lint
    • You can clean the syntax with npm run clean

Using Yarn:

  1. From the projects root folder run yarn install
  2. From the projects root folder run yarn run dev or yarn run build
    • You can lint assets with yarn run lint
    • You can clean the syntax with yarn run clean

Optionally Build Cache

  1. From the projects root folder run php artisan config:cache

That’s it, with the caveat that you need to set up and configure your development environment.

Seeds

Seeded Users

Email Password
superadmin@superadmin.com password
admin@admin.com password
user@user.com password

Socialite

Get Socialite Login API Keys

Add More Socialite Logins

Testing

The CI workflows validate Composer configuration and installation, generate an application key, lint the Vue application, and build the frontend assets. Run the same checks locally:

composer validate --strict
npm install
npm run lint
npm run build

The repository also includes Laravel feature and unit tests. Run them with php artisan test after installing Composer dependencies and configuring the application environment.

Screenshots

Desktop screenshots

Login Social Media Login Social Media TikTok Register Social Media Instagram Register Social Media Social User Dashboard Admin Dashboard Dark Mode Admin Users Table Admin Roles Table Admin Permissions Table Admin App Settings Dark Mode Home About Login Register Dashboard Settings - Profile Settings - Password Profile Dark Account SM Settings Revoke Account SM Provider Delete Account Confirm Delete Account Account Deleted Terms Template Forgot Password Reset Password

Mobile screenshots

Mobile Menu Mobile Login

File Tree

LaravelSpa
├── .editorconfig
├── .env.example
├── .gitattributes
├── .github
│   ├── dependabot.yml
│   ├── FUNDING.yml
│   ├── labeler.yml
│   └── workflows
│       ├── build-changelog.yml
│       ├── codacy.yml
│       ├── codeql.yml
│       ├── dependency-review.yml
│       ├── deploy.yml
│       ├── gitguardian.yml
│       ├── greetings.yml
│       ├── labeler.yml
│       ├── laravel.yml
│       ├── node.js.yml
│       ├── php.yml
│       ├── sentry.yml
│       └── stale.yml
├── .gitignore
├── .nvmrc
├── .phpunit.result.cache
├── .prettierignore
├── .prettierrc.json
├── .scripts
│   └── deploy.sh
├── .styleci.yml
├── app
│   ├── Exceptions
│   │   └── SocialProviderDeniedException.php
│   ├── Http
│   │   ├── Controllers
│   │   │   ├── Admin
│   │   │   │   ├── AppSettingsController.php
│   │   │   │   ├── DashboardController.php
│   │   │   │   └── ServerInfoController.php
│   │   │   ├── Api
│   │   │   │   ├── ActivityLogController.php
│   │   │   │   ├── BrowserSessionController.php
│   │   │   │   ├── CategoryController.php
│   │   │   │   ├── PermissionsController.php
│   │   │   │   ├── PostController.php
│   │   │   │   ├── ProfileController.php
│   │   │   │   ├── RolesController.php
│   │   │   │   ├── UserController.php
│   │   │   │   └── UsersController.php
│   │   │   ├── Auth
│   │   │   │   ├── AuthenticatedSessionController.php
│   │   │   │   ├── ConfirmPasswordController.php
│   │   │   │   ├── ForgotPasswordController.php
│   │   │   │   ├── ImpersonateController.php
│   │   │   │   ├── LoginController.php
│   │   │   │   ├── PasswordController.php
│   │   │   │   ├── RegisterController.php
│   │   │   │   ├── ResetPasswordController.php
│   │   │   │   ├── SocialiteController.php
│   │   │   │   └── VerificationController.php
│   │   │   ├── Controller.php
│   │   │   └── HomeController.php
│   │   ├── Requests
│   │   │   ├── Admin
│   │   │   │   ├── AdminDashboardRequest.php
│   │   │   │   ├── ShowAppSettingsRequest.php
│   │   │   │   ├── ShowServerInfoRequest.php
│   │   │   │   └── UpdateAppSettingsRequest.php
│   │   │   ├── Auth
│   │   │   │   ├── LoginRequest.php
│   │   │   │   └── RegisterRequest.php
│   │   │   ├── Categories
│   │   │   │   ├── DeleteCategoryRequest.php
│   │   │   │   ├── RestoreCategoryRequest.php
│   │   │   │   ├── ShowCategoryRequest.php
│   │   │   │   ├── StoreCategoryRequest.php
│   │   │   │   └── UpdateCategoryRequest.php
│   │   │   ├── Permissions
│   │   │   │   ├── CreatePermissionRequest.php
│   │   │   │   ├── GetPermissionsRequest.php
│   │   │   │   └── UpdatePermissionRequest.php
│   │   │   ├── Posts
│   │   │   │   ├── DeletePostRequest.php
│   │   │   │   ├── RestorePostRequest.php
│   │   │   │   ├── ShowPostRequest.php
│   │   │   │   ├── StorePostRequest.php
│   │   │   │   └── UpdatePostRequest.php
│   │   │   ├── Roles
│   │   │   │   ├── CreateRoleRequest.php
│   │   │   │   ├── GetUserRolesRequest.php
│   │   │   │   └── UpdateRoleRequest.php
│   │   │   ├── StoreRoleRequest.php
│   │   │   ├── StoreUserRequest.php
│   │   │   ├── UpdateProfileRequest.php
│   │   │   └── Users
│   │   │       ├── CreateUserRequest.php
│   │   │       ├── DeleteUserRequest.php
│   │   │       ├── ImpersonateUserRequest.php
│   │   │       ├── LeaveImpersonateUserRequest.php
│   │   │       ├── RestoreUserRequest.php
│   │   │       ├── UpdateUserRequest.php
│   │   │       ├── VerifyUserRequest.php
│   │   │       └── ViewUserRequest.php
│   │   └── Resources
│   │       ├── ActivityLogs
│   │       │   ├── ActivityLogResource.php
│   │       │   └── ActivityLogsCollection.php
│   │       ├── Categories
│   │       │   ├── CategoryResource.php
│   │       │   └── GategoriesCollection.php
│   │       ├── Permissions
│   │       │   ├── PermissionResource.php
│   │       │   └── PermissionsCollection.php
│   │       ├── Posts
│   │       │   ├── PostResource.php
│   │       │   └── PostsCollection.php
│   │       ├── Roles
│   │       │   ├── RoleResource.php
│   │       │   └── RolesCollection.php
│   │       └── Users
│   │           ├── UserResource.php
│   │           └── UsersCollection.php
│   ├── Jobs
│   │   └── PersonalDataExportJob.php
│   ├── Mail
│   │   └── ExceptionOccured.php
│   ├── Models
│   │   ├── Category.php
│   │   ├── CategoryPost.php
│   │   ├── Impersonation.php
│   │   ├── Permission.php
│   │   ├── Post.php
│   │   ├── Role.php
│   │   ├── Setting.php
│   │   ├── SocialiteProvider.php
│   │   └── User.php
│   ├── Notifications
│   │   ├── PersonalDataExportedNotification.php
│   │   ├── ResetPasswordNotification.php
│   │   ├── SendActivationEmail.php
│   │   ├── SendGoodbyeEmail.php
│   │   ├── SendPasswordResetEmail.php
│   │   └── VerifyEmailNotification.php
│   ├── Providers
│   │   ├── AppServiceProvider.php
│   │   └── ViewComposerServiceProvider.php
│   ├── Services
│   │   └── AppleToken.php
│   ├── Traits
│   │   ├── AppSettingsTrait.php
│   │   └── SocialiteProvidersTrait.php
│   └── View
│       └── Composers
│           ├── GaComposer.php
│           └── GaEnabledComposer.php
├── artisan
├── bootstrap
│   ├── app.php
│   ├── cache
│   │   ├── .gitignore
│   │   ├── packages.php
│   │   └── services.php
│   └── providers.php
├── composer.json
├── composer.lock
├── config
│   ├── activitylog.php
│   ├── app.php
│   ├── auth.php
│   ├── broadcasting.php
│   ├── browser-sessions.php
│   ├── cache.php
│   ├── cors.php
│   ├── database.php
│   ├── debugbar.php
│   ├── exceptions.php
│   ├── filesystems.php
│   ├── hashing.php
│   ├── laravel-https.php
│   ├── laravel-page-speed.php
│   ├── laravelpwa.php
│   ├── logging.php
│   ├── mail.php
│   ├── media-library.php
│   ├── personal-data-export.php
│   ├── queue.php
│   ├── request-docs.php
│   ├── roles.php
│   ├── sanctum.php
│   ├── sentry.php
│   ├── services.php
│   ├── session.php
│   ├── settings.php
│   ├── sitemap.php
│   ├── users.php
│   └── view.php
├── database
│   ├── .gitignore
│   ├── factories
│   │   └── UserFactory.php
│   ├── migrations
│   │   ├── 0001_01_01_000000_create_users_table.php
│   │   ├── 0001_01_01_000001_create_cache_table.php
│   │   ├── 0001_01_01_000002_create_jobs_table.php
│   │   ├── 2014_10_00_000000_create_settings_table.php
│   │   ├── 2014_10_00_000001_add_group_column_on_settings_table.php
│   │   ├── 2014_10_12_100000_create_password_resets_table.php
│   │   ├── 2016_01_15_105324_create_roles_table.php
│   │   ├── 2016_01_15_114412_create_role_user_table.php
│   │   ├── 2016_01_26_115212_create_permissions_table.php
│   │   ├── 2016_01_26_115523_create_permission_role_table.php
│   │   ├── 2016_02_09_132439_create_permission_user_table.php
│   │   ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│   │   ├── 2022_09_30_181156_create_posts_table.php
│   │   ├── 2022_09_30_181227_create_categories_table.php
│   │   ├── 2022_11_28_073632_create_socialite_providers_table.php
│   │   ├── 2022_12_06_061947_create_impersonations_table.php
│   │   ├── 2023_10_02_010617_create_category_post_table.php
│   │   ├── 2023_10_02_175025_create_media_table.php
│   │   ├── 2024_11_25_022836_create_permission_tables.php
│   │   ├── 2025_01_23_093055_create_activity_log_table.php
│   │   ├── 2025_01_23_093056_add_event_column_to_activity_log_table.php
│   │   ├── 2025_01_23_093057_add_batch_uuid_column_to_activity_log_table.php
│   │   └── 2026_09_10_000000_upgrade_activity_log_table_to_activitylog_v5.php
│   └── seeders
│       ├── AppSettingsSeeder.php
│       ├── ConnectRelationshipsSeeder.php
│       ├── DatabaseSeeder.php
│       ├── PermissionsTableSeeder.php
│       ├── PermissionTableSeeder.php
│       ├── RolesTableSeeder.php
│       └── UsersTableSeeder.php
├── eslint.config.js
├── lang
│   └── en
│       ├── auth.php
│       ├── emails.php
│       ├── pagination.php
│       ├── passwords.php
│       └── validation.php
├── LICENSE
├── package-lock.json
├── package.json
├── phpunit.xml
├── pint.json
├── public
│   ├── .htaccess
│   ├── android-chrome-192x192.png
│   ├── android-chrome-512x512.png
│   ├── apple-touch-icon.png
│   ├── favicon-16x16.png
│   ├── favicon-32x32.png
│   ├── favicon.ico
│   ├── favicon.png
│   ├── images
│   │   └── placeholder.jpg
│   ├── index.php
│   ├── robots.txt
│   ├── serviceworker.js
│   ├── site.webmanifest
│   └── sw.js
├── README.md
├── resources
│   ├── css
│   │   ├── app.css
│   │   └── normalize.css
│   ├── img
│   │   ├── 404.png
│   │   ├── favicon
│   │   │   ├── android-chrome-192x192.png
│   │   │   ├── android-chrome-512x512.png
│   │   │   ├── apple-touch-icon.png
│   │   │   ├── favicon-16x16.png
│   │   │   ├── favicon-32x32.png
│   │   │   ├── favicon.ico
│   │   │   ├── favicon.png
│   │   │   └── site.webmanifest
│   │   ├── fonts
│   │   │   ├── Leckerli_One
│   │   │   │   ├── LeckerliOne-Regular.ttf
│   │   │   │   └── OFL.txt
│   │   │   ├── Nunito
│   │   │   │   ├── Nunito-Italic-VariableFont_wght.ttf
│   │   │   │   ├── Nunito-VariableFont_wght.ttf
│   │   │   │   ├── OFL.txt
│   │   │   │   ├── README.txt
│   │   │   │   └── static
│   │   │   │       ├── Nunito-Black.ttf
│   │   │   │       ├── Nunito-BlackItalic.ttf
│   │   │   │       ├── Nunito-Bold.ttf
│   │   │   │       ├── Nunito-BoldItalic.ttf
│   │   │   │       ├── Nunito-ExtraBold.ttf
│   │   │   │       ├── Nunito-ExtraBoldItalic.ttf
│   │   │   │       ├── Nunito-ExtraLight.ttf
│   │   │   │       ├── Nunito-ExtraLightItalic.ttf
│   │   │   │       ├── Nunito-Italic.ttf
│   │   │   │       ├── Nunito-Light.ttf
│   │   │   │       ├── Nunito-LightItalic.ttf
│   │   │   │       ├── Nunito-Medium.ttf
│   │   │   │       ├── Nunito-MediumItalic.ttf
│   │   │   │       ├── Nunito-Regular.ttf
│   │   │   │       ├── Nunito-SemiBold.ttf
│   │   │   │       └── Nunito-SemiBoldItalic.ttf
│   │   │   └── Quicksand
│   │   │       ├── OFL.txt
│   │   │       ├── Quicksand-VariableFont_wght.ttf
│   │   │       ├── README.txt
│   │   │       └── static
│   │   │           ├── Quicksand-Bold.ttf
│   │   │           ├── Quicksand-Light.ttf
│   │   │           ├── Quicksand-Medium.ttf
│   │   │           ├── Quicksand-Regular.ttf
│   │   │           └── Quicksand-SemiBold.ttf
│   │   ├── login.png
│   │   ├── login.webp
│   │   ├── plugs.png
│   │   └── vendor-logos
│   │       ├── vultr-1.webp
│   │       ├── vultr-2.png
│   │       ├── zoho-monocrome-black.png
│   │       └── zoho-monocrome-white.png
│   ├── js
│   │   ├── app.js
│   │   ├── bootstrap.js
│   │   ├── components
│   │   │   ├── admin
│   │   │   │   ├── CreateComp.vue
│   │   │   │   ├── EditComp.vue
│   │   │   │   └── IndexComp.vue
│   │   │   ├── auth
│   │   │   │   └── SocialiteLogins.vue
│   │   │   ├── common
│   │   │   │   ├── AdminMiniCard.vue
│   │   │   │   ├── AppButton.vue
│   │   │   │   ├── AppDeleteModal.vue
│   │   │   │   ├── AppModal.vue
│   │   │   │   ├── AppSwitch.vue
│   │   │   │   ├── AppTable.vue
│   │   │   │   ├── CircleSvg.vue
│   │   │   │   ├── CKEditorComponent.vue
│   │   │   │   ├── DropZone.vue
│   │   │   │   ├── ErrorsNotice.vue
│   │   │   │   ├── ImpersonateUser.vue
│   │   │   │   ├── LeaveImpersonation.vue
│   │   │   │   ├── LoadingCircle.vue
│   │   │   │   ├── NoRecordsCTA.vue
│   │   │   │   ├── PaginationComp.vue
│   │   │   │   ├── PerPage.vue
│   │   │   │   ├── SocialMediaLoginStatus.vue
│   │   │   │   ├── SocialMediaLoginStatusItem.vue
│   │   │   │   ├── SuccessNotice.vue
│   │   │   │   ├── TextEditorComponent.vue
│   │   │   │   ├── TinyMCEditor.vue
│   │   │   │   └── UmoEditor.vue
│   │   │   ├── form
│   │   │   │   ├── AppPasswordInput.vue
│   │   │   │   ├── AppSettingTextarea.vue
│   │   │   │   ├── AppSettingTextInput.vue
│   │   │   │   ├── AppSettingToggle.vue
│   │   │   │   └── AppTextInput.vue
│   │   │   ├── includes
│   │   │   │   ├── AdminBreadcrumb.vue
│   │   │   │   ├── AdminBreadcrumbContainer.vue
│   │   │   │   ├── AdminBreadcrumbSep.vue
│   │   │   │   ├── AdminNavbar.vue
│   │   │   │   ├── AdminNavBarLink.vue
│   │   │   │   ├── AdminSidebar.vue
│   │   │   │   ├── AdminSidebarLink.vue
│   │   │   │   ├── AppFooter.vue
│   │   │   │   ├── AppNav.vue
│   │   │   │   ├── BreadcrumbOld.vue
│   │   │   │   └── NavLink.vue
│   │   │   ├── loaders
│   │   │   │   └── AnimatedTableLoader.vue
│   │   │   ├── LocaleSwitcher.vue
│   │   │   ├── plugs
│   │   │   │   ├── BmcButtons.vue
│   │   │   │   ├── GHButton.vue
│   │   │   │   ├── GHButtons.vue
│   │   │   │   ├── OctoCat.vue
│   │   │   │   ├── PatreonButton.vue
│   │   │   │   └── VultrReferral.vue
│   │   │   ├── roles
│   │   │   │   ├── PermissionFormModal.vue
│   │   │   │   ├── RoleFormModal.vue
│   │   │   │   └── RolesBadges.vue
│   │   │   ├── ToggleDarkMode.vue
│   │   │   └── users
│   │   │       ├── UserForm.vue
│   │   │       └── UserFormModal.vue
│   │   ├── composables
│   │   │   ├── activityLogs.js
│   │   │   ├── auth.js
│   │   │   ├── categories.js
│   │   │   ├── darkmode.js
│   │   │   ├── posts.js
│   │   │   ├── profile.js
│   │   │   ├── roles.js
│   │   │   └── users.js
│   │   ├── lang
│   │   │   ├── bn.json
│   │   │   ├── en.json
│   │   │   ├── es.json
│   │   │   ├── fr.json
│   │   │   ├── pt-BR.json
│   │   │   └── zh-CN.json
│   │   ├── layouts
│   │   │   ├── AdminLayout.vue
│   │   │   ├── AuthenticatedLayout.vue
│   │   │   ├── ErrorLayout.vue
│   │   │   └── GuestLayout.vue
│   │   ├── plugins
│   │   │   └── i18n.js
│   │   ├── routes
│   │   │   ├── index.js
│   │   │   ├── middleware.js
│   │   │   └── routes.js
│   │   ├── services
│   │   │   ├── ability.js
│   │   │   ├── analytics.js
│   │   │   ├── asteroids.js
│   │   │   ├── common.js
│   │   │   ├── excanvas.js
│   │   │   ├── s-code.js
│   │   │   ├── s-code.min.js
│   │   │   └── utilities.js
│   │   ├── store
│   │   │   ├── auth.js
│   │   │   ├── index.js
│   │   │   ├── lang.js
│   │   │   ├── sidebar.js
│   │   │   └── toast.js
│   │   ├── validation
│   │   │   └── rules.js
│   │   └── views
│   │       ├── admin
│   │       │   ├── ActivityLog.vue
│   │       │   ├── AdminPage.vue
│   │       │   ├── AppSettings.vue
│   │       │   ├── BrowserSessions.vue
│   │       │   ├── categories
│   │       │   │   ├── CategoryIndex.vue
│   │       │   │   ├── CreateCategory.vue
│   │       │   │   └── EditCategory.vue
│   │       │   ├── DashboardPage.vue
│   │       │   ├── PermissionsPage.vue
│   │       │   ├── PhpInfo.vue
│   │       │   ├── posts
│   │       │   │   ├── AdminCreatePost.vue
│   │       │   │   ├── AdminEditPost.vue
│   │       │   │   └── AdminPostsIndex.vue
│   │       │   ├── RolesPage.vue
│   │       │   └── UsersPage.vue
│   │       ├── auth
│   │       │   ├── passwords
│   │       │   │   ├── ConfirmPage.vue
│   │       │   │   ├── RequestReset.vue
│   │       │   │   └── ResetPage.vue
│   │       │   └── Verify.vue
│   │       ├── category
│   │       │   └── CatPostsPage.vue
│   │       ├── errors
│   │       │   └── NotFound.vue
│   │       ├── home
│   │       │   └── HomePage.vue
│   │       ├── login
│   │       │   └── LoginPage.vue
│   │       ├── misc
│   │       │   ├── AboutPage.vue
│   │       │   ├── PricingPage.vue
│   │       │   ├── SupportPage.vue
│   │       │   └── TermsPage.vue
│   │       ├── pages
│   │       │   └── user-settings
│   │       │       ├── AccountAuthentication.vue
│   │       │       ├── AccountData.vue
│   │       │       ├── AccountPage.vue
│   │       │       ├── PasswordPage.vue
│   │       │       ├── ProfilePage.vue
│   │       │       ├── SettingsNav.vue
│   │       │       ├── SettingsNavLink.vue
│   │       │       ├── SettingsPage.vue
│   │       │       └── UserDownloadData.vue
│   │       ├── posts
│   │       │   ├── PublicIndex.vue
│   │       │   └── PublicPostDetails.vue
│   │       ├── register
│   │       │   └── RegisterPage.vue
│   │       └── templates
│   │           ├── Bare.vue
│   │           └── Blank.vue
│   ├── pwa
│   │   ├── serviceworker.js
│   │   └── sw.js
│   └── views
│       ├── app.blade.php
│       ├── auth
│       │   ├── login.blade.php
│       │   ├── passwords
│       │   │   ├── confirm.blade.php
│       │   │   ├── email.blade.php
│       │   │   └── reset.blade.php
│       │   ├── register.blade.php
│       │   └── verify.blade.php
│       ├── home.blade.php
│       ├── layouts
│       │   ├── app.blade.php
│       │   └── master.blade.php
│       └── socialite
│           ├── callback.blade.php
│           └── denied.blade.php
├── routes
│   ├── api.php
│   ├── channels.php
│   ├── console.php
│   └── web.php
├── SECURITY.md
└── vite.config.js

99 directories, 419 files

License

This project is open-sourced software licensed under the MIT license.

Enjoy!