CRM-laravel
CRM-laravel copied to clipboard
A Laravel based Booking + CRM system for a fictional salon called Salon Bliss. This project was developed as per the requirements of a Server Side Programming Module.
Laravel based booking + CRM for Salon Bliss

Table of contents
- About the project
- Technologies Used
- Project Document
- Features
- Using the queue
- Installation
About the project
This project is a booking and CRM system for Salon Bliss, a fictional hair salon.
Managing Users, Services, Locations, Cart for customers, Appointment Booking functionality, Multiple categories, locations for the salon, use of Email notifications, sending emails and capturing the views of the users, appointment management, analytics data display are some of the features of this project.
If you want to run this project locally, follow the installation instructions.
Technologies Used
The system is built with the TALL Stack
For authentication scaffolding the project uses Laravel Jetstream.
The project uses Laravel's Queued Jobs to send emails and record analytics data.
For testing of the email sending, Mailtrap was used.
Project Document
This was developed for the requirements of a Server Side Programming module. The assignment document is available here: SSP2_FINAL2_CB010454.pdf
Features
The following are some of the features of the project. To provide a better understanding of the features some screenshots are also provided where necessary.
β Use of middleware to grant role based access to routes
A middleware was created to validate the role of the user and grant access to the routes. When using the middleware the name of the required roles are passed seperated by a comma. The routes associated for the users based on the roles are grouped in the web.php file.
π¬ Location Management
The admin user can create, edit and delete locations. These locations are used when booking an appointment. For the purpose of the assignment, only one appointment per time slot is possible in the system.
π€User management
The management of the customers and employees is done by the admin user. Admin user can create, edit and delete employees. There is an option that allows the admin to suspend a user.
π Categories and Service management
Admin and employee users can create, edit and delete service categories. Admin and employee users can create, edit and delete services. When creating a service a category must be selected. There are some other details such as the price, description, image, benefits, allegens, cautions, and aftercare tips.
When a new service is created, the customers are notified by email. This is done using a queued job. Check out how to start the queue in laravel
π Booking an appointment
The appointment booking is done by first adding to the cart: the customer selects the location of the booking, and the date. The system then checks for availability and disables and grey out the timeslots that are not available. Then the customer can select a time slot and add it to the cart.
The system displays the timeslots of a location that are available when the user selects the location and date. The system disables and greys out the unavailable time slots.
Take Note of the greyed out unavailable time slot below
π Cart
A cart system was created for the user to add the services to the cart. It also included creation of a pivot table called cart_services. The system checks if there are any booking for that time slot before creation of the appointment at Checkout
π Appointment creation
At checkout the appointment is created. Then an email is sent to the customer as a confirmation of the booking. This email is sent using a queued job. Check out how to start the queue in laravel
π― Page view hit analytics
The views of the pages is recorded using a queued job by resolving the AnalyticsSingleton
π― View analytics of customer and services
The staff can view the information related to the services such as the views, appointments, and revenue. This is shown when viewing a service. The staff can also view the analytics of a customer.
π Appointment management
The staff can manage appointments of all customers, a customer can manage their appointments.
The customer can also see the details of the appointments that they have made.
A schedule for the current day and the day is shown for all the locations of the salon in the admin dashboard
π§βπ» API Customer CRUD and Services CRUD
The system provides an API for the create, read, update and delete of a customer.
The system also provides an API for the create, read, update and delete of a service.
The postman collection for the API is available here: [Salon Bliss.postman_collection.json](Salon Bliss.postman_collection.json)
Using the queue
The system utilizes queued jobs for tasks such as capturing page views and sending emails.
To run the queue manually you will have to run the command
php artisan queue:listen
More Info: https://laravel.com/docs/10.x/queues
Installation
The following pre-requisites are needed to run the project
For PHP and MySQL, XAMPP or WAMP server can be used.
-
Clone the repo
git clone https://github.com/sachintha-lk/CRM-laravel -
Move in to the folder
cd CRM-laravel -
Install Composer packages
composer install -
Install NPM packages
npm install -
Create a .env file by copying the .env.example file
-
Generate an app encryption key
php artisan key:generate -
Create a database and add the database credentials to the .env file
Follow instructions from Laravel docs if you are using SQLite. https://laravel.com/docs/10.x/database#sqlite-configuration
Note: A sqlite database file is committed to the repository you can use it by configuring the env following instructions of the above link
-
Run the migrations
php artisan migrate -
Run the seeders
php artisan db:seed -
Run the project
npm run devKeep this running and open a new terminal and run
php artisan serve -
Visit the site at http://localhost:8000
Note: The Admin user is created using the seeder. The default credentials are as follows:
email : [email protected]
password : adminpassword
Note Make sure you set up an email service provider in the env file. For testing purposes a service like Mailtrap can be used.
For the email and page view capture to work, the queue should be run
Future Development
This project was developed for an academic assignment, the project will be further developed in the future as a portfolio project
If you have any suggestions create an issue on the repository.