Laravel React Docker Boilerplate screenshot

Laravel React Docker Boilerplate

Author Avatar Theme by Lockhinator
Updated: 4 Mar 2024
25 Stars

A preconfigured Laravel, React, Typescript, Docker boilerplate to save you time!

Categories

Overview

This repo is a Laravel-React-Docker boilerplate that provides a solid starting point for building a project using these technologies. It includes PHP 8.2.3, Laravel 10, Laravel Websockets, Laravel Horizon, React 17, Vite 3, ESLint 8, TypeScript 4.7, Husky/Commit lint, Redis 7, Postgres 14.4, and Nginx 1.23. The purpose of this repo is to offer a monolithic repository for easy project setup and development.

Features

  • Laravel 10 for server-side programming
  • React 17 for building dynamic user interfaces
  • Docker for containerization and easy development environment setup
  • Laravel Websockets for real-time communication
  • Laravel Horizon for managing queues
  • Vite 3 for fast front-end development
  • ESLint and TypeScript for code quality and type-checking
  • Husky and Commit lint for enforcing commit message conventions
  • Redis for in-memory data caching
  • Postgres for database storage
  • Nginx for serving the application

Installation

To install this boilerplate, follow these steps:

  1. Install Docker Desktop.
  2. Clone the repository using the command git clone git@github.com:lockhinator/laravel-react-docker-boilerplate.git.
  3. Change into the directory using cd laravel-react-docker-boilerplate.
  4. Copy the .env.example file to .env using the command cp .env.example .env.
  5. Update the .env file to configure the database connection.
  6. Run the following commands to build and run the repository in Docker:
    docker-compose build fpm node web
    docker-compose run --rm fpm php artisan key:generate
    docker-compose run --rm fpm php artisan migrate
    docker-compose run --rm fpm composer install
    docker-compose run --rm node yarn
    docker-compose up -d
    
  7. Visit http://localhost to ensure that the application is running.
  8. Start building your app!

Summary

The Laravel-React-Docker boilerplate provides a comprehensive starting point for developers looking to build projects using Laravel, React, and Docker. It includes key features such as Laravel Websockets, Laravel Horizon, and Vite for efficient and real-time development. The installation process is straightforward, relying on Docker for easy setup and containerization. With this boilerplate, developers can start building their applications quickly and efficiently.