calvera / cqrs.nu-php

PHP version of https://cqrs.nu/ tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Domain

For this tutorial, we'll work in the cafe domain. Our focus will be on the concept of a tab, which tracks the visit of an individual or group to the cafe. When people arrive to the cafe and take a table, a tab is opened. They may then order drinks and food. Drinks are served immediately by the table staff, however food must be cooked by a chef. Once the chef has prepared the food, it can then be served.

During their time at the restaurant, visitors may order extra food or drinks. If they realize they ordered the wrong thing, they may amend the order - but not after the food and drink has been served to and accepted by them.

Finally, the visitors close the tab by paying what is owed, possibly with a tip for the serving staff. Upon closing a tab, it must be paid for in full. A tab with unserved items cannot be closed unless the items are either marked as served or cancelled first.

Screenshots

Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot

Requirements

  • Docker

Installation

  • Clone this repository: git clone git@github.com:yourwebmaker/cqrs.nu-php.git
  • Start the containers: make up
  • Install dependencies: make install-dependencies
  • Setup database: make migrations-run
  • Open your browser on http://0.0.0.0:8001/tab/open

Usage

  • See full commands list make help
  • Access the container: docker exec -it cafe-fpm bash

Testing

  • Run command: make test

About

PHP version of https://cqrs.nu/ tutorial

License:MIT License


Languages

Language:PHP 88.8%Language:Twig 8.2%Language:Makefile 1.6%Language:Shell 1.1%Language:Dockerfile 0.2%Language:CSS 0.2%