Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AF-19] Add service layer #20

Merged
merged 6 commits into from
Feb 23, 2024
Merged

[AF-19] Add service layer #20

merged 6 commits into from
Feb 23, 2024

Conversation

ricardopacheco
Copy link
Owner

Issue number: resolves #19

Summary 🔴

This Pr adds an additional layer called services, to deal with external services and already adds the first service, email. Additional add-ons are available in the changelog in version 0.5.0.

Proposed / Possible solution 🔴

We added a standardized directory structure to scale the code across services, and in addition, we used a performant email sending gem to build the email frontend and trigger for the email service. The choice had only performative reasons.

A change has also been made to I18n, allowing not just contracts, but all layers to be their own isolated structure. This will facilitate possible changes in the future.

The use of environment variables was also inclusive as we followed the 12factor standard.

How to test 👮‍♂️

Start the related services, and open the console with the command bin/console. After that:

user = OpenStruct.new(user: "My name", email: "[email protected]")

AuctionFunCore::Services::Mail::UserContext::RegistrationMailer.new(user).deliver

To simulate the successful sending of an email, change the values of the user variable, which must contain the name and email attributes.

Risks / Impacts 🔴

  • None anticipated

Requirements for deployment 🔴

  • A new exclusive issue must be created to change the SMTP communication structure to match the chosen external email provider.

@ricardopacheco ricardopacheco added type:feature A suggestion for general features status:in-review In Review status priority:high High priority labels Feb 23, 2024
@ricardopacheco ricardopacheco self-assigned this Feb 23, 2024
@ricardopacheco ricardopacheco merged commit d2c0c36 into main Feb 23, 2024
1 check passed
@ricardopacheco ricardopacheco deleted the AF-19 branch February 23, 2024 19:31
@ricardopacheco ricardopacheco added status:done Done status and removed status:in-review In Review status labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high High priority status:done Done status type:feature A suggestion for general features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add service layer
1 participant