Download the PHP package sandwicher/domain without Composer
On this page you can find all versions of the php package sandwicher/domain. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sandwicher/domain
More information about sandwicher/domain
Files in sandwicher/domain
Package domain
Short Description A project to test some development concepts - Domain
License MIT
Informations about the package domain
Sandwicher Domain
Index
- Summary
- Project Setup
- Business Logic Description / Requirements
- Tech Specifics
- Architecture
- Composer
- CI/CD
Summary
A proof of concept project to apply some engineering and development concepts.
This project consists in a simple app that will make any sandwich lover's live easier. Right now everybody that wants to have a sandwich from their favourite local sandwich shop needs to write down their preferred choice, and when you have a large group this app might come in handy to manage your group's meals and orders.
Project Setup
- In order to setup/run the project it is required only to have docker and docker compose installed
- Laravel Sail script was included in the project to handle the docker environment and the execution of commands inside the containers so it will be you best friend to run anything inside the containers.
- To run any command simply run
./sail <command_you_want_to_run>
. To get the project started run./sail up -d
. This will setup the docker environment and put all containers running. - Run
./sail composer install
to install all our PHP dependencies - And that is all. You should be all setup now.
- In order to run all the application tests run
./sail composer test
Business Logic Description / Requirements
- Right now everybody that wants to have a sandwich from their favourite local sandwich shop needs to write down their preferred choice
- We need an application backed by a database to manage this (very complex) process.
- An administrator should be able to add users (people that are going to eat the sandwich, lets call them consumers).
- The administrator should open up “registration” for a new meal. That stops people from ordering stuff separately all the time.
- A meal has a status that can be controlled by the admin (open and closed).
- Only one meal can be “open” at a single time. And only on an open meal users can register their choice.
- A meal also has a date (the date when the meal is eaten)
- A meal should also have a unique link. This link can be opened on a mobile device (without a password) to check what the current order is.
-
Every user should have a unique code he can login with on a certain page. On that page the user can pick:
- What bread (dropdown list, choices from database)
- Size of the bread (dropdown, 15 or 30 cm)
- If it should be oven baked or not
- Taste of the sandwich (dropdown from database, for instance chicken fajita)
- Extra’s (extra bacon, double meat or extra cheese)
- What vegetables you want on the sandwich (dropdown, multiple possible values from the database)
- What sauce (dropdown from the database)
- Then the user can place his order (on the current open order).
- The user must be able to edit his order (but only when the order/meal is still open).
- The user should also be able to view his previous orders when he is “logged in” by his unique link.
Tech specifics
Architecture
This app domain is following Screaming Architecture, SOLID and DDD principles mainly.
This domain is going to be used (for now) in a laravel app project
The application is currently undergoing some refactoring to start using the domain for the application's business use cases.
Composer
This project is currently published to Packagist so it can easily be imported via composer to any project.
CI/CD
The project is integrated with CircleCI to run our tests pipeline (link above).
Currently it is only running the tests but as next steps, a release should be automatically created in the repository with the code after passing all tests to avoid doing this process manually.