This repository provides a scaffold designed with best practices in mind, utilizing Laravel 11, Vue 3, Tailwind, and several other modern technologies. The goal is to create a foundation that leverages composables and reusable components to enhance development efficiency and maintainability.
Laravel 11: A robust PHP framework for building web applications with an elegant syntax.
Vue 3: A progressive JavaScript framework for building user interfaces.
Tailwind CSS: A utility-first CSS framework for rapid UI development.
Sanctum: Laravel's lightweight authentication system for SPAs and simple API token usage.
i18n: Internationalization support to build multilingual applications.
Vuex: State management pattern + library for Vue.js applications.
Reusable Components: Modular components to promote reuse and consistency across the application.
The purpose of this package is to scaffold a best practice design using composables and reusable components. This setup aims to streamline the development process and ensure that the codebase remains clean, maintainable, and scalable.
Efficient State Management: Leverage Vuex for centralized state management.
Authentication: Implement authentication seamlessly with Laravel Sanctum.
Responsive Design: Utilize Tailwind CSS for a fully responsive design.
Multilingual Support: Easily support multiple languages with i18n.
Component Reusability: Write reusable Vue components to avoid code duplication and enhance consistency.
Composables: Utilize Vue 3 composables to share reusable logic.
Clone the git repository on your computer
$ git clone [email protected]:sayedahmadnawid/laravel11-vue3-vite-scaffolding.git
Move inside the application root directory.
$ cd laravel11-vue3-vite-scaffolding
$ composer install
When you are done with installation, copy the .env.example file to .env
$ cp .env.example .env
Generate the application key
$ php artisan key:generate
Add your database credentials to the necessary env fields
Migrate the application
$ php artisan migrate
$ php artisan db:seed
Install node modules
$ npm install
Open two tabs inside the application root directory.
In the first tab run:
$ php artisan serve
In the second tab run:
$ npm run dev
Browse the application
localhost:8000
Follow these steps to set up and run the application using Docker:
$ docker-compose build
$ docker-compose up -d
If Node.js was not installed correctly, run the following command to build the Node container separately:
$ docker build -t my-laravel-node .
Copy the example environment configuration to create your own environment file:
$ cp .env.example .env
Access the Laravel application container and install the necessary PHP packages:
$ docker exec -it my-laravel-app bash
Inside the container, run the following commands:
$ composer install
$ php artisan migrate
$ php artisan db:seed
Access the Node container and install the necessary Node.js packages:
docker exec -it my-laravel-node bash
Inside the container, run the following command:
npm install
Open your web browser and go to:
Contributions are welcome! Feel free to create a pull request.