Overview
The Front-End Project is a demonstration of how to implement roles and permissions in a Laravel-React/Next.js web application. It showcases the ability to assign permissions to different roles, create new roles, and manage these permissions from an admin panel. The project utilizes Laravel Breeze - Next.js Edition as the starter kit for the backend API, and Spatie Laravel Permission for implementing the roles and permissions functionality.
Features
- Role and Permission Management: Create and assign permissions to roles, allowing for granular control over user access.
- Backend API Integration: Utilizes Laravel Breeze - Next.js Edition as the backend starter kit to handle API requests.
- Frontend Implementation: Implements the roles and permissions functionality on the frontend using React and Next.js.
Installation
To install and run the Front-End Project, follow these steps:
- Clone the Back-End Repository from here.
- Install the necessary dependencies by running the following commands:
cd NextJs-Laravel-Boilerplate-B
composer install
npm install
- Rename the
.env.examplefile to.envand update the necessary configuration settings, such as the database credentials. - Generate a new application key by running the following command:
php artisan key:generate
- Migrate the database tables by running the migration command:
php artisan migrate
- Seed the database with initial data by running the following command:
php artisan db:seed
- Start the backend server by running the command:
php artisan serve
- Clone the Front-End Repository from here.
- Install the necessary dependencies by running the following commands:
cd breeze-next
npm install
- Rename the
.env.examplefile to.envand update the necessary configuration settings, such as the API endpoint. - Start the frontend server by running the command:
npm run dev
- Access the Front-End Project by visiting the following URL: https://laravel-nextjs.netlify.app
- Log in using the following credentials:
- Email: admin@admin.com
- Password: password
Summary
The Front-End Project is a demonstration of how to implement roles and permissions functionality in a Laravel-React/Next.js web application. It showcases the ability to create and assign permissions to roles, manage these permissions from an admin panel, and integrates the backend API using Laravel Breeze - Next.js Edition. With the provided installation guide, users can easily set up and explore the project’s functionality.