🍬 Created with love from the sweet tooth and for the sweet tooth. 🍬
Final project at My IT School.
Config Open Server:
- Apache 2.4
- PHP 8.1
- MySQL 8.0
- Domain name:
- sweet-castle.local
- Domain dir:
- \sweet-castle\public
Deployment:
- new DB - sweet_castle
- .env & .env.testing copy
- composer install
- npm run dev
- php artisan storage:link
- php artisan migrate --seed
- php artisan queue:work
- php artisan test (check all pages are responsive)
- Displaying products
- Comments
- Admin Panel:
- products
- users
- comments
- orders
- CRUD
- Login form
- Registration form
- Feedback Form
- Forgotten password form
- /admin/login (point of entry)
- /admin/products (CRUD async Livewire)
- /admin/users (list and delete entry (sync PHP)
- /admin/comments (list and delete entry (sync PHP)
- /admin/orders (list async Livewire)
- /admin/login (point of entry)
- / (main page)
- /login (point of entry)
- /products (list of products through pagination)
- /product/{id} (detailed product card, comments (async Livewire)
- /forgot (password reset form with sending an email with a new password (sync PHP, through the worker QUEUE)
- /register (new user registration form (sync PHP)
- /contacts (submitting a feedback form (sync PHP, through the worker QUEUE)
- PHP - main engine
- Laravel - friendly framework based on MVC model, automation of routine tasks, built-in test suite)
- Livewire - creating dynamic interfaces, automating work with ajax
- Blade - simplification of work with HTML layout, used out of the box in Laravel
- Bootstrap - did not live up to expectations, it is required to be eradicated from the project
- Tailwind CSS - flexible framework for working with CSS styles inside HTML layout, the peculiarity of its work is to clean the output CSS-file from unused classes
- Alpine JS - working with js inside html-file
- Flowbite - plugin for Tailwind that allows you to create dynamic components using JS
- Styling is done with Tailwind and Flowbite responsive components
- Order style changes depending on the status
- Accordions in the admin panel orders
- Tooltip above the "+" button in the products category of the admin panel
- Responsive sidebar admin panel
- Responsive website menu
- Factories and seeds are used to fill the base
- Using unit tests to check if page status works, tests use the test base
- Slim controllers:
- Validation moved to Requests classes
- For simple business logic, there is a php artisan make:action console command that creates an action class template with the magic method __invoke method (object as a function)
- Mail:
- Sending feedback to personal mail (smtp Yandex)
- A forgotten password is sent to the user's email
- Sending mail is replicated through setting pending tasks so as not to load the server (queue: work or supervisor for Linux)
- Traits were used to render identical pieces of code
- Livewire:
- Comments are updated (polymorphic model in case of scaling)
- CRUD rewritten with Livewire and Alpine JS. Everything is updated without reloading the page. Delete method also cleans up the image
- Implemented adding products to the cart through the database
- Transferring data from cart to order
- Order status change
- Cart preview showing items and amount
- Using an external API:
- Notification of a new order in Telegram