{"id":35117248,"url":"https://github.com/codee-sh/medusa-plugin-notification-emails","last_synced_at":"2026-01-13T22:01:21.119Z","repository":{"id":326538628,"uuid":"1105959358","full_name":"codee-sh/medusa-plugin-notification-emails","owner":"codee-sh","description":"A complete notification plugin for Medusa.js — React Email templates, UI components and configurable blocks.","archived":false,"fork":false,"pushed_at":"2025-12-29T18:09:20.000Z","size":188,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-12-29T18:24:26.573Z","etag":null,"topics":["commerce","eccomerce","medusa","medusa-emails","medusa-plugin","medusa-plugin-v2"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codee-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing/creating-templates.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-28T12:08:23.000Z","updated_at":"2025-12-29T15:32:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/codee-sh/medusa-plugin-notification-emails","commit_stats":null,"previous_names":["codee-sh/medusa-plugin-notification-emails"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/codee-sh/medusa-plugin-notification-emails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codee-sh%2Fmedusa-plugin-notification-emails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codee-sh%2Fmedusa-plugin-notification-emails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codee-sh%2Fmedusa-plugin-notification-emails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codee-sh%2Fmedusa-plugin-notification-emails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codee-sh","download_url":"https://codeload.github.com/codee-sh/medusa-plugin-notification-emails/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codee-sh%2Fmedusa-plugin-notification-emails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commerce","eccomerce","medusa","medusa-emails","medusa-plugin","medusa-plugin-v2"],"created_at":"2025-12-27T21:10:37.531Z","updated_at":"2026-01-13T22:01:21.109Z","avatar_url":"https://github.com/codee-sh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Medusa plugin notification emails\n\nA comprehensive notification plugin for Medusa v2 that provides a flexible, block-based template system for multiple channels (Email and Slack) with internationalization support, custom translations, and seamless integration with Medusa's notification module.\n\n## Features\n\n- **Multi-Channel Templates**: Pre-built templates for Email and Slack channels\n- **Block-Based System**: Templates are built using a flexible block system that can be stored in a database for future builder functionality\n- **Email Templates**: Customizable email templates built with [React Email](https://react.email) for common use cases\n- **Slack Templates**: Slack Block Kit compatible templates for Slack notifications\n- **Template Service Architecture**: Unified `AbstractTemplateService` with channel-specific implementations (`EmailTemplateService`, `SlackTemplateService`)\n- **Automatic Interpolation**: Smart variable interpolation system that processes `{{data.*}}` and `{{translations.*}}` placeholders recursively\n- **Internationalization**: Built-in support for multiple locales (Polish, English)\n- **Customizable**: Override translations and customize templates without modifying core files\n- **Integration**: Integrates with Medusa's notification module\n- **Admin Panel**: Preview and test templates directly from Medusa Admin\n- **Type-Safe**: Full TypeScript support with exported types\n- **HTML \u0026 Plain Text**: Automatically generates both HTML and plain text versions of emails\n\n## Compatibility\n\n- **Medusa Version**: `\u003e= 2.8.8`\n- **Node Version**: `\u003e= 20`\n\n## Installation\n\n```bash\nnpm install @codee-sh/medusa-plugin-notification-emails\n# or\nyarn add @codee-sh/medusa-plugin-notification-emails\n```\n\n## Quick Start\n\n### 1. Register the Plugin\n\nAdd to your `medusa-config.ts`:\n\n```typescript\nmodule.exports = defineConfig({\n  plugins: [\n    \"@codee-sh/medusa-plugin-notification-emails\"\n  ]\n})\n```\n\n### 2. Configure Notification Provider\n\nSet up a notification provider - see [Configuration Documentation](./docs/configuration.md) for details.\n\n### 3. Use Templates\n\nThe plugin includes built-in subscribers that automatically send email notifications for various events. You can also use templates directly in your code:\n\n#### Email Templates\n\n```typescript\nimport { emailService, TEMPLATES_NAMES } from \"@codee-sh/medusa-plugin-notification-emails/templates/emails\"\n\nconst { html, text, subject } = await emailService.render({\n  templateName: TEMPLATES_NAMES.ORDER_PLACED,\n  data: templateData,\n  options: { locale: \"pl\" }\n})\n```\n\n#### Slack Templates\n\n```typescript\nimport { slackService, TEMPLATES_NAMES } from \"@codee-sh/medusa-plugin-notification-emails/templates/slack\"\n\nconst { blocks } = await slackService.render({\n  templateName: TEMPLATES_NAMES.INVENTORY_LEVEL,\n  data: templateData,\n  options: { locale: \"en\" }\n})\n```\n\n**Note**: Templates use a block-based system where each template is defined as an array of blocks. The system automatically interpolates variables like `{{data.order.id}}` and `{{translations.headerTitle}}` throughout the blocks.\n\nSee [Templates Documentation](./docs/templates.md) for detailed usage examples.\n\n## Available Templates\n\n### Email Templates\n\n- **[Order Placed](./docs/templates/order-placed.md)** (`order-placed`) - Order confirmation email template\n- **Order Completed** (`order-completed`) - Order completion notification template\n- **[Contact Form](./docs/templates/contact-form.md)** (`contact-form`) - Contact form submission email template\n- **Order Updated** (`order-updated`) - Order update notification template\n- **Inventory Level** (`inventory-level`) - Inventory level notification template\n\n### Slack Templates\n\n- **Inventory Level** (`inventory-level`) - Inventory level notification for Slack\n- **Product** (`product`) - Product notification for Slack\n- **Product Variant** (`product-variant`) - Product variant notification for Slack\n\nSee [Templates Documentation](./docs/templates.md) for general template information and [Blocks Documentation](./docs/blocks.md) for details on the block system.\n\n## Built-in Subscribers\n\nThe plugin includes automatic email notifications for the following events:\n\n- **`order.placed`** - Sends order confirmation email when an order is placed\n- **`order.completed`** - Sends order completion notification when an order is completed\n\nThese subscribers automatically:\n- Fetch order data from Medusa\n- Render email templates using React Email\n- Send notifications via Medusa's notification module\n- Respect custom translations configured in plugin options\n\nSee [Configuration Documentation](./docs/configuration.md) for details on customizing subscriber behavior.\n\n## Admin Panel\n\nAccess the template preview in Medusa Admin at `/app/notifications/render`. See [Admin Panel Documentation](./docs/admin.md) for details.\n\n## Documentation\n\n- [Templates](./docs/templates.md) - Using templates and creating custom subscribers\n- [Blocks System](./docs/blocks.md) - Understanding the block-based template system\n- [Translations](./docs/translations.md) - Internationalization and custom translations\n- [Configuration](./docs/configuration.md) - Plugin configuration options\n- [Admin Panel](./docs/admin.md) - Admin interface usage\n- [Creating Custom Templates](./docs/contributing/creating-templates.md) - Guide for creating new templates\n\n## Exports\n\nThe plugin exports the following:\n\n- `@codee-sh/medusa-plugin-notification-emails/templates/emails` - Email template service and types\n- `@codee-sh/medusa-plugin-notification-emails/templates/slack` - Slack template service and types\n- `@codee-sh/medusa-plugin-notification-emails/templates/shared` - Shared template utilities\n- `@codee-sh/medusa-plugin-notification-emails/utils` - Utility functions\n\n## License\n\nMIT\n\n## Author\n\nCodee Team - [https://codee.dev](https://codee.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodee-sh%2Fmedusa-plugin-notification-emails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodee-sh%2Fmedusa-plugin-notification-emails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodee-sh%2Fmedusa-plugin-notification-emails/lists"}