The documentation for the "Laravel Nuxt Boilerplate" application allows you to quickly start a new project using Nuxt 3 as the frontend layer and Laravel as the backend layer.
- System Requirements
- Installation
- Configuration
- Running the Application
- Using the Application
- API Documentation
- Validation Handling
- Style Management
- ESLint and Vee-Validate
- Auth
- Locales
- License
To run the "Laravel Nuxt Boilerplate" application, you will need:
- Node.js (recommended LTS version)
- PHP (recommended version 8.x)
- Composer (recommended 2.x)
- Docker (for using Laravel Sail)
- Laravel Sail (for easily running the Laravel application)
To install the application, follow these steps:
# Clone the repository
git clone https://github.com/AdrianKuriata/laravel-nuxt-boilerplate.git
# Navigate to the application directory
cd laravel-nuxt-boilerplate
# Copy the .env.example file to .env and customize the configuration
cp .env.example .env
# Install Sail
./vendor/bin/sail install
# Composer
./vendor/bin/sail composer install
# Migrations
./vendor/bin/sail art migrate:install && ./vendor/bin/sail art migrate
# Start Docker containers (using Laravel Sail)
./vendor/bin/sail up -d
# Install dependencies
npm i
# Start Nuxt
npm run dev
Application configuration is located in the .env
file. Customize settings such as the database, environment, etc., according to your needs.
To run the application, use the following command:
./vendor/bin/sail up -d
And next run Nuxt 3
npm run dev
The application will be accessible at http://localhost:3000
.
With this boilerplate you can ease create new modern applications. There is latest version of Nuxt 3, Laravel 10. To manage store pinia is used.
There is Laravel for API. You can easy use a ziggy route with useZiggy (auto import) to use routes from the API in the client layer.
Form validation is handled on the backend (in Laravel). Detailed information about validation can be found in the Laravel documentation. For the client vee-validate is used.
The application uses Tailwind CSS for style management. You can customize styles in the Tailwind CSS configuration files. There is a simple components created with tailwind, but if you want, you can use other UI libraries for your project.
ESLint is used to enforce coding style for JavaScript. Check a configuration for more information
There is used Laravel Breeze for backend authentication and @nuxt-alt/auth for client authorization. In fact to this day, there is no update for @nuxt/auth for Nuxt 3, so we are using alternative package. If there will be update for original package, we update this boilerplate. You can login, register or reset password.
i18n is used for manage locales in the application. Every locale should be updated in the client/locales files. The next locales you can add nuxt.config.ts.
The application is released under the MIT License.