Add React Email template support via Node.js microservice#1
Open
Add React Email template support via Node.js microservice#1
Conversation
- Add react-email-service/ with Fastify server for rendering React Email templates - Add campaign_react template type to PostgreSQL enum and Go models - Add internal/reactrender HTTP client to call React Email service - Update campaign manager to support React template rendering - Add configuration options for react_email section in config.toml - Update frontend TemplateForm to support React Email template type - Update docker-compose.yml with optional React Email service This introduces a microservice architecture for React Email, similar to the existing email-builder pattern. Templates are defined as TSX components and rendered to HTML via HTTP calls to the Node.js service. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add react-dom as explicit dependency to ensure it's included in package-lock.json for npm ci in Docker builds. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds React Email template support as a new template type (
campaign_react) alongside existing Go templates and visual editor.react-email-service/Node.js microservice for rendering React Email templatescampaign_reactto template_type enumUpstream proposal: knadh#2890
Architecture
Files Changed
New:
react-email-service/- Complete Node.js service with 3 sample templatesinternal/reactrender/client.go- Go HTTP clientinternal/migrations/v6.1.0.go- Database migrationModified:
models/templates.go- AddTemplateTypeCampaignReactconstantinternal/manager/manager.go- Add reactClient fieldinternal/manager/message.go- Add React rendering pathcmd/init.go,cmd/main.go,cmd/templates.go- Initialization and validationconfig.toml.sample- Add[react_email]sectiondocker-compose.yml- Add optional react-email servicefrontend/src/views/TemplateForm.vue- UI for React template selectionTest plan
cd react-email-service && npm run devcurl http://localhost:3001/api/healthreact_email.enabled = true🤖 Generated with Claude Code