This boilerplate provides a starting point for Laravel applications using Laravel 11 using Inertia.js with React. It integrates Laravel Breeze for authentication and uses MongoDB as the default database. This setup helps streamline the development process for modern web applications with a robust stack.
- Laravel: PHP framework for building web applications.
- Inertia.js: Allows you to build modern single-page applications (SPAs) using classic server-side routing and controllers.
- React: JavaScript library for building user interfaces.
- Laravel Breeze: Simple authentication scaffolding for Laravel.
- MongoDB: NoSQL database used as the default database.
- Docker: Containerization for development and deployment.
- Caching: Uses Redis for caching
- Tailwind CSS: Uses Tailwind utilities for styling
- React Bootstrap: Uses ReactBootstrap Components.
- MATCHED breakpoints: Bootstrap and Tailwind breakpoints matched for layout consistency
- PHP >= 8.2
- Node.js >= 18.x
- MongoDB
- Docker (for containerized environment)
Follow these steps to set up the boilerplate on your local machine:
git clone https://github.com/rfgonzales/inertia-react-laravel-breeze-mongodb-boilerplate.git
cd laravel-inertia-react-boilerplate
composer install
npm install
docker compose up -d
to run the server php artisan serve
on a separate terminal run npm run dev
use tw-
prefix to tailwind classes
docker-compose file already has mongodb replication setup, to start you have to
- start only one mongodb(the primary preferred) container first to enable the mongodb to setup primary databases.
- then turn it of,
- and then start all mongodb containers including the mongo-setup container
- check logs of mongo-setup container if okay, if not? restart the container.
- please refer to mongodb official site for issues with laravel-mongodb
This project is licensed under the MIT License. See the LICENSE file for details.
If you want to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and test thoroughly.
- Submit a pull request with a clear description of the changes.
This project uses the following open-source libraries and tools:
-
Laravel
- License: MIT License
- URL: GitHub Repository
-
Inertia.js
- License: MIT License
- URL: GitHub Repository
-
React
- License: MIT License
- URL: GitHub Repository
-
Laravel Breeze
- License: MIT License
- URL: GitHub Repository
-
MongoDB
- License: Server Side Public License (SSPL)
- URL: MongoDB License Details
-
Docker
- License: Apache License 2.0
- URL: GitHub Repository
-
Redis
- License: Redis Source Available License (RSAL)
- URL: Redis License Details
Please refer to the respective repositories or official documentation for full license details and any additional terms or conditions. Make sure to comply with all licensing requirements when using these libraries and tools in your project.