Skip to content
/ quotes Public

REST API that given a famous person and a count N, returns N quotes from this famous person shouted.

Notifications You must be signed in to change notification settings

pgrau/quotes

Repository files navigation

Quotes API
Ports and Adapters, DDD, CQRS &
Event Driven Architecture in PHP

Continuous Integration

This project follow the Event Sourcing pattern described on Microsoft Site.

✔ Project Technology

This project contains the follow features

1. The Event Store is the authoritative data source. All events are stored using an append-only operation.

2. Subscribers build materialized views.

3. External systems and applications have available all domain events by message queue.

🖥️ Stack Technology

PHP 8 - Symfony 5.2

MySQL 8.0

RabbitMQ 3.8 - Erlang 23.2

Redis 6.0

🚀 Environment Setup

🐳 Needed tools

  1. Install Docker
  2. Clone this project: git clone https://github.com/pgrau/quotes
  3. Move to the project folder: cd quotes

🔥 Application execution

  1. Install and configure all the dependencies and bring up the project executing: make dev
  2. Execute the tests executing: make test

👩‍💻 Project explanation

REST API that given a famous person and a count N, returns N quotes from this famous person shouted.

You can:

  1. Verify the api status http://localhost:8082
  2. Import authors from json to mysql by cli docker exec -it quotes-php bin/console api:import:authors
  3. Import quotes from json to mysql by cli docker exec -it quotes-php bin/console api:import:quotes
  4. Get shouts by author. Example Steve Jobs http://localhost:8082/shout/steve-jobs

🦸🏼‍ Strategy and Plan Execution

Strategy and Plan Execution

🎯 API Documentation

Contracts

OpenAPI Specification

Postman Collection

🎯 Ports and Adapters / Hexagonal Architecture

Wiki Page

🎯 Command Bus

Wiki Page

🎯 Query Bus

Wiki Page

🎯 Event Sourcing

All documentation available on the Wiki:

Event sourcing architecture

Domain Events

Event Store

Event Bus

Message Broker

Consumer

Event Dispatcher

Subscriber

Installation

🔦 Unit / Integration / Functional Test

Phpspec

Behat

About

REST API that given a famous person and a count N, returns N quotes from this famous person shouted.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published