Skip to content
A full eventsourced gamification application designed to integrate with the Last Wishes application via messaging using AMQP and RabbitMQ.
PHP ApacheConf HTML
Branch: master
Clone or download
Christian Soronellas
Christian Soronellas Symfony 3.1
Latest commit 1994a7a Aug 13, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Symfony 3.1 Aug 13, 2016
bin Symfony 3.1 Aug 13, 2016
spec/Lw/Gamification/DomainModel/User README.md Dec 6, 2015
src Symfony 3.1 Aug 13, 2016
var Symfony 3.1 Aug 13, 2016
web Symfony 3.1 Aug 13, 2016
.editorconfig First commit Nov 28, 2015
.env.dist First commit Nov 28, 2015
.gitignore Symfony 3.1 Aug 13, 2016
CODE_OF_CONDUCT.md Added some documentation and the LICENCE file Dec 6, 2015
CONTRIBUTING.md Added some documentation and the LICENCE file Dec 6, 2015
LICENSE Added some documentation and the LICENCE file Dec 6, 2015
README.md Update README.md Dec 6, 2015
composer.json Symfony 3.1 Aug 13, 2016
composer.lock Symfony 3.1 Aug 13, 2016
docker-compose.yml Symfony 3.1 Aug 13, 2016
phpspec.yml First commit Nov 28, 2015
phpunit.xml.dist Symfony 3.1 Aug 13, 2016

README.md

Last Wishes Gamification Bounded Context

This application is an example of a Gamification Bounded Context aligned with the Gamification subdomain, a specialized supporting sudbdomain which handles all the gamification related concerns. This bounded countext exposes a REST API endpoint with two different parts. One exposes all the events published in the bounded context, and the other exposes a simple API to interact directly in terms of the subdomain's ubiquitous language.

This application used as an example in the book Domain-Driven Design in PHP by examples in the Integrating Bounded Contexts chapter. It's full eventsourced and it has integration with the Last Wishes application via messaging using RabbitMQ.

In order to run it, previously you should have to run in the command line

cp .env.dist .env

Then edit filling the values according to your environment, especially for the SYMFONY__SECRET, SYMFONY__REDIS_DSN and the SYMFONY__ELASTICSEARCH_HOST environment variables.

To run it you should have Docker Toolbox and docker-compose installed and then just execute the following in the command line

composer install
docker-compose up -d
php app/console server:run

And then, using your browser, access to

http://127.0.0.1:8000/documentation

It also has two AMQP consumers: one that listens to the Lw\Domain\Model\User\UserRegistered event and the other that listens to the Lw\Domain\Model\Wish\WishWasMade. To run the consumer for the Lw\Domain\Model\User\UserRegistered you should run the following in the command line

php app/console rabbitmq:consumer last_will_user_registered

And to run the consumer for the Lw\Domain\Model\Wish\WishWasMade just execute the following in the command line

php app/console rabbitmq:consumer last_will_wish_was_made

Running the test suite

php bin/phpspec run

Enjoy! :)

You can’t perform that action at this time.