Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

ci-on/laravel-nuxt-tailwind-boilerplate

Repository files navigation

Boilerplate for Laravel, Nuxt & Tailwind CSS

StyleCI Scrutinizer Code Quality Prettier Style License

This is a boilerplate template for a common and slightly opinionated setup of your Laravel, Nuxt & Tailwind CSS project that includes Sanctum authentication.

Installation

Please clone this repository and then follow these install steps:

git clone https://github.com/ci-on/laravel-nuxt-tailwind-boilerplate.git project-name
cd project-name

composer install
cp .env.example .env
php artisan key:generate
php artisan install
php artisan migrate

cd frontend
cp .env.example .env
yarn install

Please note, you may need to adjust your .env-variables.

Local Setup

It's fairly easy to set up a local server with this project. It is important to note, that due to Sanctum's httpOnly cookie authentication, we need to use Laravel's & Nuxt's built-in webserver, so that we can serve the API and the frontend on the same domain.

php artisan serve #localhost:8000

cd frontend
yarn && yarn build
yarn dev #localhost:3000

You can now visit your frontend by visiting localhost:3000 and the API by pinging localhost:8000.

Production Build

It is very easy to deploy this project to Netlify. We include the netlify.toml which allows you to simply connect your project to Netlify.

For those who are interested in the production build script:

# this will generate your static assets & pages and it should be your command to compile this project on services like Netlify or Vercel
yarn build && yarn export

Features & Tooling

Part of the reason this is a somewhat opinionated package is because we added some tooling we use for most of our projects to help us kickstart the initial development process. Below are the key details outlined:

Backend

  • Laravel 7.*
  • Laravel Sanctum Authentication

Frontend

  • Nuxt 2.13.*
  • Tailwind 1.5.*
  • Eslint & Prettier setup

Tooling

  • Laravel Telescope
  • Laravel's IDE Helper
  • VS Code suggested plugins
  • Netlify integration
  • StyleCI integration
  • Dependabot integration

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email chris@cion.agency instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Made with ❤️ by CION Agency

About

This boilerplate helps kickstart your Laravel, Nuxt & Tailwind projects.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •