💻 Vending Machine PoC as a DDD and CQRS php project.
You will need Docker and docker compose installed. If you are a user of mac m1, don't worry, the docker compose file is addapted to this architecture. To have the enviroment running do:
make start
: will build all what is necessary for you. Just keep the port 3306 free and openmake deps
: will install all the vendors dependenciesmake test
: will execute the unit tests of teh projectmake init-db
: will setup the db for the first operations.
1. Insert Coins: insert `1.00` as 1 unit coin, `0.25`, `0.10` or `0.05` to increase your available money. No other coins are valid. After each coin hit *enter*. Example: `1.00`.
-
RETURN-COINS
: type this command and hit enter. You will get your money back. -
GET-XXXX
: use your current money to purchase the item from the command. Valid items are:WATER, JUICE, SODA
.
Example:GET-WATER
. -
exit
: Type this command to leave.
-
SET-COINS
: Set the amount of coins of a given value. Example:SET-COINS, 1.00, 400
Will set 400 units of 1.00 coin. -
SET-XXXX
: Set the current item stock.
Example:SET-WATER, 300
will set water stock to 300 units