Code Monkey home page Code Monkey logo

last-wishes-gamify's Introduction

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! :)

last-wishes-gamify's People

Contributors

theunic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.