Skip to content

Boilerplate for Laravel 11 using Mongodb as Default Database, Frontend will be react using inertia

License

Notifications You must be signed in to change notification settings

rfgonzales/laravel-inertia-react-mongodb-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Inertia React MongoDB Boilerplate

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.

Features

  • 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

Requirements

  • PHP >= 8.2
  • Node.js >= 18.x
  • MongoDB
  • Docker (for containerized environment)

Getting Started

Follow these steps to set up the boilerplate on your local machine:

1. Clone the Repository

git clone https://github.com/rfgonzales/inertia-react-laravel-breeze-mongodb-boilerplate.git
cd laravel-inertia-react-boilerplate

2. Install PHP dependencies

composer install

3. Install Node Dependencies

npm install

4.Docker Setup (for Containerized Environments)

docker compose up -d

Usage

to run the server php artisan serve on a separate terminal run npm run dev

use tw- prefix to tailwind classes

Mongodb Replication

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.

Troubleshooting

  • please refer to mongodb official site for issues with laravel-mongodb

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

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.

License Information

This project uses the following open-source libraries and tools:

Additional Notes

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.

About

Boilerplate for Laravel 11 using Mongodb as Default Database, Frontend will be react using inertia

Resources

License

Stars

Watchers

Forks

Packages

No packages published