This is a boilerplate project for building web applications using Laravel and ReactJS. It provides a foundation setup with essential configurations and structures to kickstart your development process.
- Laravel: A powerful PHP framework for building web applications.
- ReactJS: A JavaScript library for building user interfaces.
- Vite: Bundles JavaScript, CSS, and other assets for the frontend.
- ESLint: Lints JavaScript/JSX code to maintain code quality.
- Prettier: Formats code for consistency and readability.
- Routing: Laravel's routing for backend APIs and React Router for frontend routing.
.htaccessfile for Apache configuration. - Authentication: Basic authentication setup using cookies.
- API Development: Laravel serves as a backend API to interact with the frontend.
- Database Integration: Integration with MySQL, SQLite, or PostgreSQL databases.
- PHP >= 8.2
- Composer
- Node.js >= 18.6
- Yarn
-
Clone this repository:
git clone https://github.com/Stevox404/laravel-react-starter.git
-
Install PHP dependencies:
composer install
-
Install JavaScript dependencies:
yarn install
-
Copy the .env.example file to .env:
cp .env.example .env
-
Generate application key:
php artisan key:generate
-
Run database migrations and seeders:
php artisan migrate --seed
-
Build frontend assets:
npm run dev # For development # OR npm run prod # For production
-
Start the development server:
php artisan serve
-
Visit http://localhost:8000 in your browser.
app/: Contains Laravel application files.frontend/: Contains frontend React files.database/: Contains database migrations and seeders.public/: Contains publicly accessible files (compiled assets, images, etc.).public/build: Contains the compiled react app files
Contributions are welcome! Feel free to open an issue or submit a pull request for any improvements or features you'd like to add.
This project is licensed under the MIT License.