Skip to content

Conversation

@laurenp-2
Copy link

Summary

This pull request implements an Admin interface for managing and sending newsletters.

  • Added a new Admin tab for creating and sending newsletters.
  • Implemented a form where admins can input newsletter title, body content, and optional metadata
  • Integrated with the existing email service to handle newsletter dispatch.
  • Added a new API endpoint (/api/newsletters/send) to send newsletters to a single test email (for preview purposes) or all users in the system (for full newsletter release).

This feature enables admins to compose and distribute newsletters directly through the platform without external tools.

Test Plan

  • Verified that the newsletter form renders correctly in the Admin UI tab.
  • Tested sending a test email to ensure formatting and content accuracy.
  • Confirmed that invalid input (e.g., missing subject or body) prevents submission with proper validation messages.

Admin Newsletter Form frontend:
Screenshot 2025-10-06 at 10 42 50 PM
Newsletter generated and sent with submitted information:
Screenshot 2025-10-06 at 10 42 41 PM
Error when there is invalid input:
Screenshot 2025-10-06 at 10 43 02 PM

Notes

Future improvements:

  • Add support for scheduling newsletters.
  • Add tracking (open/click analytics).
  • Improve preview functionality with rendered HTML view.

Lauren Pothuru added 28 commits April 13, 2025 16:16
- Update backend/.eslintrc.json to reference the correct tsconfig.json path
- Enable JSX support in tsconfig.json with "jsx": "react-jsx"
- Create email sending scripts
- Create basic components for newsletter
- Create assets folder in email directory
- Add email icons to assets
- Create Newsletter templates
- Create components for newsletter sections
- Create generateNewsletter component to allow customization
- Update README (WIP)
- Update emailService to mail newsletter created by GenerateNewsletter
- Edit tsconfig to allow JSX in react files
- Add working directory configuration in eslintrc to prevent parsing errors

- TODO: figure out why these errors keep on occuring
- Create ReelsFeature, SubleaseSpotlight, FeatureSpotlight and NeighborhoodComparison components
- Edit styling of existing newsletter components
- Add prop types for new components to Types.tsx
- Add new components to Newsletter template
- Add customization options for new components in GenerateNewsletter
- Implement all components of Newsletter
- Render property cards in AreaSpotlight and LandlordHighlight (based on property id)

- TODO: finish styling, add documentation
- Add top-level documentation to all Newsletter components
- Load firebase users in batches of 50
- Implement script to send emails out to all users in loaded batches
- Update README for email directory
- Update import in firebase_users_loader
- Fix relative vs absolute path in property fetch
- Add info to README
- Abstract unnecessary comments and clean up code
- Fix environment variable handling in firebase config
- Update README for clarity and formatting
- Update image icons for better compatibility
- Add mobile header; prevent dark mode (only supported in some email clients)
- Abstract email sending into separate functions
- Add newsletter tab in AdminPage
- Create AdminNewsletter component for filling out and sending newsletters
- Added API endpoint to send newsletters
- Integrated email service to dispatch newsletters
- Updated frontend to include newsletter form and submission handling
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Lauren Pothuru seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 3076. This diff might be too big! Developer leads are invited to review the code.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants