erag/laravel-tenancy-vue-starter-kit

The skeleton application for the Laravel framework.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

Language:Vue

Type:project

pkg:composer/erag/laravel-tenancy-vue-starter-kit

v1.0.0 2025-12-21 01:44 UTC

This package is auto-updated.

Last update: 2025-12-21 01:49:21 UTC


README

πŸ“Έ Screenshots & UI Preview:
πŸ‘‰ View Screenshots (Images.md)

A Laravel 12 + Inertia.js + Vue 3 multi-tenancy starter kit designed for building SaaS applications with a clean, scalable architecture.
This project provides a solid foundation for central + tenant based apps, modern frontend tooling, and automated developer workflows.

✨ Features

πŸ—οΈ Laravel 12 modern architecture

🏒 Multi-Tenancy (Central + Tenant separation)

πŸ”„ Inertia.js + Vue 3 SPA experience

🧩 TypeScript support

⚑ Vite + HMR fast development

🎨 Tailwind CSS v4 UI styling

🧱 shadcn-vue preconfigured component system

πŸ—‚οΈ Clean & scalable folder structure

πŸ” Central & Tenant authentication

πŸ›£οΈ Dedicated tenant routing

πŸ“¬ Queue & Jobs support

πŸ§ͺ Testing ready (Feature & Unit)

🧹 Laravel Pint (PHP formatting)

πŸ“ ESLint & Prettier (Frontend linting)

🧠 Developer-friendly scripts

πŸ” One-command setup & dev

🌐 SSR support (optional)

πŸš€ Production-ready boilerplate

πŸ“¦ Requirements

Make sure the following are installed on your system:

  • PHP >= 8.2
  • Composer
  • Node.js >= 18
  • NPM
  • MySQL or SQLite
    (SQLite is supported by default for local development)

πŸš€ Installation

composer create-project erag/laravel-tenancy-vue-starter-kit laravel-multi-tenancy-vue

Run the setup command:

composer run setup

What does this command do?

  • Installs Composer dependencies
  • Creates .env file (if not exists)
  • Generates application key
  • Runs database migrations
  • Installs NPM dependencies
  • Builds frontend assets

πŸ§‘β€πŸ’» Development Mode

Start the local development environment:

composer run dev

What runs in development mode?

  • Laravel development server
  • Queue worker
  • Laravel Pail logs
  • Vite dev server (HMR)

All processes run together using concurrently.

🌐 SSR Development (Optional)

If you are using Inertia SSR:

composer run dev:ssr

πŸ§ͺ Testing

Run all tests using:

composer run test

🧹 Linting & Formatting

Linting and formatting are fully automated.

βœ… Recommended (One command)

composer run lint

This command will:

  • Format & lint PHP using Laravel Pint
  • Lint JavaScript / TypeScript using ESLint
  • Format Vue & Blade files using Prettier
  • Auto-fix issues where possible

You don’t need to run separate npm commands manually.

πŸ”§ Optional Manual Commands

Frontend lint only:

npm run lint

Auto-fix frontend issues:

npm run lint:fix

🧠 Recommendation

Always run this before committing code:

composer run lint

This ensures:

  • Clean commits
  • Consistent code style
  • Fewer CI issues

πŸ”„ Upgrade / Dependency Updates

To update project dependencies:

composer run update:requirements

This will:

  • Update Composer dependencies
  • Update NPM packages
  • Keep version constraints clean

After upgrading, run:

composer install
npm install
npm run build

πŸ“ Project Structure

This project follows a clean and scalable multi-tenancy architecture.

.
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ Http
β”‚   β”‚   β”œβ”€β”€ Controllers
β”‚   β”‚   β”œβ”€β”€ Middleware
β”‚   β”‚   └── Requests
β”‚   β”œβ”€β”€ Jobs
β”‚   β”‚   └── SyncTenantJob.php
β”‚   β”œβ”€β”€ Menu
β”‚   β”‚   └── Sidebar.php
β”‚   β”œβ”€β”€ Models
β”‚   β”‚   β”œβ”€β”€ Tenant.php
β”‚   β”‚   └── User.php
β”‚   └── Providers
β”‚       β”œβ”€β”€ CentralRouteServiceProvider.php
β”‚       └── TenancyServiceProvider.php
β”‚
β”œβ”€β”€ config
β”‚   └── tenancy.php
β”‚
β”œβ”€β”€ database
β”‚   β”œβ”€β”€ migrations
β”‚   β”‚   β”œβ”€β”€ create_tenants_table.php
β”‚   β”‚   β”œβ”€β”€ create_domains_table.php
β”‚   β”‚   └── tenant/
β”‚   └── seeders
β”‚
β”œβ”€β”€ resources
β”‚   β”œβ”€β”€ css
β”‚   β”œβ”€β”€ js
β”‚   β”‚   β”œβ”€β”€ app.ts
β”‚   β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ composables
β”‚   β”‚   β”œβ”€β”€ layouts
β”‚   β”‚   β”œβ”€β”€ pages
β”‚   β”‚   β”‚   β”œβ”€β”€ tenant
β”‚   β”‚   β”‚   └── auth
β”‚   β”‚   └── types
β”‚   └── views
β”‚       └── app.blade.php
β”‚
β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ web.php
β”‚   β”œβ”€β”€ tenant.php
β”‚   └── tenants
β”‚       β”œβ”€β”€ tenant-auth.php
β”‚       └── tenant-settings.php
β”‚
β”œβ”€β”€ tests
β”‚   β”œβ”€β”€ Feature
β”‚   └── Unit
β”‚
β”œβ”€β”€ vite.config.ts
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ composer.json
└── README.md

πŸ“‚ Ignored from Structure

These directories are intentionally excluded from structure views:

  • node_modules/
  • vendor/
  • storage/
  • bootstrap/cache/

πŸ›  Tech Stack

  • Laravel 12
  • Inertia.js
  • Vue 3
  • TypeScript
  • Vite
  • Tailwind CSS
  • Laravel Pint
  • ESLint
  • Prettier

⭐ Support

If you find this project helpful, please consider giving it a ⭐ on GitHub. It helps the project grow and stay maintained ❀️

🀝 Contributing

Issues and pull requests are welcome. Please ensure code style rules are followed by running lint checks before committing.