https://github.com/arslanstack/jwt
A boilerplate JWT user authentication in React JS and Laravel
https://github.com/arslanstack/jwt
api authentication jwt laravel react rest-api
Last synced: about 2 months ago
JSON representation
A boilerplate JWT user authentication in React JS and Laravel
- Host: GitHub
- URL: https://github.com/arslanstack/jwt
- Owner: arslanstack
- Created: 2023-12-25T08:15:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-25T13:20:42.000Z (over 1 year ago)
- Last Synced: 2025-01-26T02:28:12.544Z (4 months ago)
- Topics: api, authentication, jwt, laravel, react, rest-api
- Language: PHP
- Homepage:
- Size: 151 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JWT Authentication Boilerplate in React JS and Laravel Framework
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.
## Technologies Used
### Laravel Backend
- 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 Frontend
- 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.## Getting Started
Follow these steps to get started with the boilerplate:
### Laravel Backend
1. Set up your Laravel environment and database configuration in `backend` directory.
2. Run `composer install` to install the required dependencies.
3. Set up your `.env` file with the necessary configurations, including your database connection and JWT secret.
4. Run database migrations with `php artisan migrate` to create the required tables.
5. Seed the database with sample data (optional) using `php artisan db:seed`.
6. Start the Laravel development server: `php artisan serve`.### React JS Frontend
1. Navigate to the `frontend` directory.
2. Run `npm install` to install the required Node.js modules.
3. Update the API URL in the React application to point to your Laravel backend.
4. Start the React development server: `npm start`.## Postman API Collection
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!