- Laravel V10.3.3
- Filament V2.17.16
- Bootstrap V5.3.0-alpha
To get a local copy up and running follow these simple steps.
This is an example of how to list things you need to Prepare.
- Local Server Or Live Server
- PHP Version 8.1+
Composer
Download From Here- Command Line and I prefer
Git Bash
You Can download it From Here
-
Clone the repo
git clone https://github.com/EGYWEB-Mohamed/foodics_task.git
-
Install Required packages With
composer
composer install
-
Copy .env.example file and rename it with .env
cp .env.example .env
-
Generate Key
php artisan key:generate
-
Create Two Database
- Testing
DB_TEST_DATABASE
- Live
DB_DATABASE
- Testing
-
Fill
.env
File With Important DataDB_DATABASE= DB_TEST_DATABASE= DB_USERNAME= DB_PASSWORD= .... MAIL_HOST= MAIL_PORT=587 MAIL_USERNAME= MAIL_PASSWORD= ..... MERCHANT_MAIL="merchant@test.com" LOWEST_STOCK_PERCENTAGE=50
And Don't Forget To Fill SMTP Data To Recive a notification Whenever Any Stock Is Low
You can also specify when you will receive an alert when a certain percentage is reached with LOWEST_STOCK_PERCENTAGE 😉
-
Then Run To Migrate All Database Also to seed with dummy data
php artisan migration --seed
- Account Credential
Email : admin@test.com Password : 123456
- Account Credential
-
If your using local server don't forget to run
php artisan serv
or you can navigate from localhost correct installation path -
Don't Forget To run queue worker so it's important to deliver the Email Notification
php artisan queue:work
-
Want To Test The Whole Application and functionality ? Easy Jump To This Part
In a system that has three main models; Product, Ingredient, and Order. A Burger (Product) may have several ingredients:
- 150g Beef
- 30g Cheese
- 20g Onion
The system keeps the stock of each of these ingredients stored in the database. You can use the following levels for seeding the database:
- 20kg Beef
- 5kg Cheese
- 1kg Onion
When a customer makes an order that includes a Burger. The system needs to update the stock of each of the ingredients so it reflects the amounts consumed. Also when any of the ingredients stock level reaches 50%, the system should send an email message to alert the merchant they need to buy more of this ingredient.
When You Finish Setup the application you can easily run
php artisan test
You Got Green Pass So What you are waiting for 😂
✔️ Is Home Page Work ?
✔️ Is Home Page Has Products ?
✔️ Is There Auth Links ?
✔️ Is Auth Required To Buy New Product ?
✔️ Is User Can Login Successfully ?
✔️ Is there Logout and Dashboard Link ?
✔️ Is Dashboard Work ?
✔️ Is Orders Page Work ?
✔️ Is Products Page Work ?
✔️ Is Ingredients Page Work ?
✔️ Is There Burger Product With its Ingredients Exists?
️✔️ Is Buy Button Work ?
✔️ Is Product Ingredients Stock 100% ?
✔️ Is Order Added To DB ?
✔️ Is Product Ingredients Decreased ?
✔️ Is Ingredients Decreased Is Correct ?
14 Test Case With 34 assertions
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.