This codebase serves as a foundational user authentication boilerplate/scaffolding for projects built with the Laravel and React JS frameworks. It incorporates essential features for user authentication and can be easily integrated into new Laravel + React JS projects.
- Laravel Framework
- Tymon JWT Package: Used for JWT-based API authentication in Laravel.
- MySQL Database: The database file is provided to set up the required tables.
- React JS: JavaScript library for building user interfaces.
- React Router: Used for navigation and routing in the React application.
- Bootstrap: Frontend framework for styling and layout.
- Axios: A promise-based HTTP client for making requests to the Laravel backend.
Follow these steps to get started with the boilerplate:
- Set up your Laravel environment and database configuration in
backenddirectory. - Run
composer installto install the required dependencies. - Set up your
.envfile with the necessary configurations, including your database connection and JWT secret. - Run database migrations with
php artisan migrateto create the required tables. - Seed the database with sample data (optional) using
php artisan db:seed. - Start the Laravel development server:
php artisan serve.
- Navigate to the
frontenddirectory. - Run
npm installto install the required Node.js modules. - Update the API URL in the React application to point to your Laravel backend.
- Start the React development server:
npm start.
Explore the provided Postman API Collection for testing API endpoints and requests.
Feel free to integrate and customize these functionalities to meet the requirements of your projects. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.
Happy coding!