The Problem
Beauty salons and SPA owners need a single system to schedule appointments, track staff, manage inventory, and run point‑of‑sale operations. Existing tools are fragmented, forcing manual data entry and leading to double‑bookings, inventory errors, and poor customer follow‑up.
What This Does
The repository implements a Laravel‑based web application that centralises all core salon workflows. Controllers such as app/Http/Controllers/AppBeautySmart/AppBeautySmartController.php, app/Http/Controllers/Customers/CustomersController.php and app/Http/Controllers/Products/ProductsController.php expose CRUD endpoints for appointments, customers, products, and staff. Views in resources/views/BeautySmart/ render the booking calendar, product listings, and cash‑management screens. Front‑end assets (resources/assets/js/app.js, resources/assets/sass/app.scss) are compiled via Laravel Mix and served from public/js/app.js and public/css/app.css.
How It Is Wired
Execution starts with the HTTP entry point public/index.php, which boots the Laravel framework. The request is routed by routes/web.php (and routes/api.php for JSON APIs) to controller actions. For example, a GET to /customers invokes CustomersController@index, which loads the Customer Eloquent model, applies any query scopes, and returns a Blade view (resources/views/BeautySmart/Customers/index.blade.php).
All controllers share a small set of helper methods that are duplicated across ten files (see Code Health & Issues). The authentication flow uses the built‑in Laravel auth scaffolding (app/Http/Controllers/Auth/*).
JavaScript bootstrapping occurs in resources/assets/js/bootstrap.js, which is imported by resources/assets/js/app.js. The compiled bundle is referenced by Blade layouts, enabling UI interactivity for appointment booking and POS actions. No circular import dependencies were detected; the internal import graph consists of four modules with a single edge (resources/assets/js/app → resources/assets/js/bootstrap).
How To Use It
# clone the repo
git clone https://github.com/moses-y/BeautySmart.git
cd BeautySmart
# install PHP dependencies
composer install
# install front‑end assets (npm is implied by package.json)
npm install && npm run dev # compiles resources/assets/* via Laravel Mix
# copy example env and generate an app key
cp .env.example .env
php artisan key:generate
# run migrations (DB connection must be configured in .env)
php artisan migrate
# start the development server
php artisan serve
Missing pieces: the repository does not contain a Dockerfile or explicit deployment scripts, so containerised builds must be added manually if required.
Real‑World Use
A salon employee logs in, navigates to /appointments, selects a service and staff member, and the front‑end sends an AJAX POST to api/appointments. The controller validates the request, creates an Appointment record, and queues a reminder email (Laravel’s mail queue). The same endpoint updates the cabin occupancy view in real time via Laravel Echo.
Code Health & Issues
- HIGH – License missing – No
LICENSEfile at the repo root. Without an explicit license the code is “all rights reserved,” preventing legal reuse. Fix: add an MIT or Apache‑2.0 license file. - MEDIUM – Dependabot not configured – Two manifest files (
composer.json,package.json) exist but no.github/dependabot.yml. Unpatched vulnerabilities will linger. Fix: add a Dependabot config covering both ecosystems. - HIGH – Duplicated code blocks – Repeated 6‑line snippets across 10 controller files (e.g.,
AppBeautySmartController.php,CustomersController.php,ProductsController.php,RegisterController.php). Fix: extract shared logic into a service class or trait. - MEDIUM – Empty catch block –
resources/assets/js/bootstrap.jscontainscatch {}that silently drops errors. Fix: log or re‑throw the exception. - MEDIUM – Deep nesting –
resources/assets/js/components/Example.vueandresources/views/welcome.blade.phphave nesting depth of 6, making the flow hard to read. Fix: use early returns or extract inner blocks into helper functions/components.
No critical security findings were reported by the static analysis, and the repo includes a test suite (tests/Feature/ExampleTest.php) and Travis CI configuration.
The Bottom Line
The project provides a functional Laravel foundation for salon management, with clear MVC separation and ready‑made UI assets. However, duplicated controller code, an absent license, and lack of automated dependency updates hinder maintainability and legal reuse. Engineers comfortable with Laravel can refactor the helpers, add a proper license, and set up Dependabot to make the codebase production‑ready.