Skip to content

[FEATURE] Add mock Resend email mode for local development #25

Description

@Obiajulu-gif

Overview

Add a mock email mode so contributors can test email-related flows without needing a real Resend API key.

Problem

Email delivery is useful for notifications, onboarding, and future investor/driver updates. Contributors should be able to work on these flows without using maintainer credentials or sending real emails.

Expected solution

Add support for:

ENABLE_MOCK_EMAILS=true

When enabled:

  • email sending should be skipped or written to a safe local console/log abstraction
  • no real request should be sent to Resend
  • mock output should include recipient, subject, and template name only where safe
  • no sensitive tokens or personal secrets should be printed

Security notes

  • Do not log secrets.
  • Do not send real emails in tests.
  • Avoid logging private user data beyond what is necessary for local debugging.

Files likely involved

  • email service/helper files
  • notification-related API routes
  • .env.example
  • README or contributor docs

Acceptance criteria

  • ENABLE_MOCK_EMAILS=true disables real Resend API calls.
  • Contributors can test email flows locally without a Resend key.
  • Mock email behavior is documented.
  • Production behavior remains unchanged when mock mode is disabled.
  • Lint and build pass.

Suggested labels

email, backend, developer-experience, good first issue

Difficulty

Good first issue / Beginner

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions