Closed helloanil closed 4 weeks ago
The recent update to the NestJS API introduces a new ReminderEmailsModule
that handles sending reminder emails to mentors and mentees. This includes adding controllers, services, and guards for the new module. Additionally, the .gitignore
file has been updated to exclude specific directories, and new test files have been added to ensure the functionality of the reminder email features.
File Path | Change Summary |
---|---|
.gitignore |
Added exclusions for infrastructure/.terraform and /reminder-email-scripts/* . |
apps/nestjs-api/src/app/app.module.ts |
Imported and added ReminderEmailsModule to the modules list. |
apps/nestjs-api/src/auth/cronjob-auth.guard.ts |
Introduced CronjobAuthGuard class for route guarding based on authorization token. |
apps/nestjs-api/src/reminder-emails/... |
Added ReminderEmailsController , ReminderEmailsService , and their respective test files. |
apps/nestjs-api/src/salesforce-api/... |
Added SfApiEmailTemplatesService for retrieving email templates from Salesforce and updated SfApiModule to include the new service. |
sequenceDiagram
participant Client
participant ReminderEmailsController
participant ReminderEmailsService
participant SfApiEmailTemplatesService
participant AWS SES
Client->>+ReminderEmailsController: Request to send reminder email
ReminderEmailsController->>+ReminderEmailsService: Process request
ReminderEmailsService->>+SfApiEmailTemplatesService: Retrieve email template
SfApiEmailTemplatesService-->>-ReminderEmailsService: Email template
ReminderEmailsService->>+AWS SES: Send email
AWS SES-->>-ReminderEmailsService: Confirmation
ReminderEmailsService-->>-ReminderEmailsController: Email sent
ReminderEmailsController-->>-Client: Response
In the code where emails fly,
A module built to reach the sky,
Reminders sent with gentle cheer,
To mentors, mentees far and near.
Salesforce whispers templates sweet,
While guards ensure the code's elite.
A rabbit hops with joyful glee,
For changes made so splendidly. 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Ready for review?
Ready for review?
@ericbolikowski Yes. Please go ahead and review 🙏
Hey @ericbolikowski and @katamatata, here are the latest news on this task and I need your help:
I decided to move script file to gitignore for two reasons. I'll create this file manually on the server, alongside the background service that will take care of the automation. I will send you the script code on Slack so you can review it there.
I will start testing this task with two reminders only, which is the top priority ones. (Mentors and Mentees to complete their profile). There are few more reminders ready but I haven't tested them properly yet. They are commented out (see the last commit). Please let's focus on only the first two reminders for now.
Just added another reminder:
What Github issue does this PR relate to? Insert link.
712
What should the reviewer know?
This PR is focusing only on the top 3 priority emails from the reminders list:
The automation part will be done in parallel, by writing a service script either directly in the server, or using a service like val.town
Summary by CodeRabbit
New Features
ReminderEmailsModule
to manage reminder emails for mentorship activities.CronjobAuthGuard
to secure routes based on authorization tokens.Tests
ReminderEmailsController
andReminderEmailsService
.Chores
.gitignore
to exclude specific infrastructure and script files.