Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

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.

sachintha-lk/CRM-laravel

Repository files navigation

Laravel based booking + CRM for Salon Bliss

Laravel Logo

Table of contents

About the project

Home Page

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.

Locations Manage Page

👤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.

Manage Users

💇 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.

Manage Services

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

Queued jobs to send the new service email

New service email

🆕 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.

Services

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

Viewing a service - Selecting Time Slots

🛒 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

Cart

📃 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

Queued jobs to send the confirmation email

Appointment Confirmation Email

🎯 Page view hit analytics

The views of the pages is recorded using a queued job by resolving the AnalyticsSingleton

Recording Analytics using a queued job

🎯 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.

Customer Details including analytics such as last appointment and total spending

Analytics of a service

📅 Appointment management

The staff can manage appointments of all customers, a customer can manage their appointments.

Appointment Management Page

The customer can also see the details of the appointments that they have made.

Appointment Management - Customer

A schedule for the current day and the day is shown for all the locations of the salon in the admin dashboard

Day schedules

🧑‍💻 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.

  1. Clone the repo

    git clone https://github.com/sachintha-lk/CRM-laravel
  2. Move in to the folder

    cd CRM-laravel
  3. Install Composer packages

    composer install
  4. Install NPM packages

    npm install
  5. Create a .env file by copying the .env.example file

  6. Generate an app encryption key

    php artisan key:generate
  7. 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

  8. Run the migrations

    php artisan migrate
  9. Run the seeders

    php artisan db:seed
  10. Run the project

    npm run dev

    Keep this running and open a new terminal and run

    php artisan serve
  11. 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.

CatComputerGIF

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published