Skip to content

Commit

Permalink
[MS-754] feat: Emails sender (#5)
Browse files Browse the repository at this point in the history
* [MS-754] feat: Improve docs

* [MS-754] feat: Setup react emails. Basic emails provider with sending email logic

* [MS-754] feat: Imporove logging. WIP logic for sending emails

* [MS-754] feat: Add gql subscriptions

* [MS-754] feat: Add templates & with mapping
  • Loading branch information
piotrgrundas authored Oct 4, 2024
1 parent cc621f7 commit 5a559d4
Show file tree
Hide file tree
Showing 61 changed files with 2,871 additions and 125 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
SALEOR_URL=https://your.eu.saleor.cloud
STATIC_URL=https://your.storefront.com/public/emails
SQS_QUEUE_URL=
FROM_EMAIL=
FROM_NAME=

AWS_ACCESS_KEY_ID=
AWS_REGION=
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = defineConfig({
"import/no-default-export": "off",
"import/no-anonymous-default-export": "off",
},
files: ["**/plugins/**/*.ts", "*.config.ts"],
files: ["**/plugins/**/*.ts", "**/templates/**/*.tsx", "*.config.ts"],
},
],
});
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Resolves:

- [MS-XXX](https://mirumee.atlassian.net/browse/MS-XXX)
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
build/
graphql/schema.ts
generated.ts
graphql/schema.ts
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Nimara Mailer
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="docs/logo.svg">
<img width="200" alt="nimara logo" src="docs/logo.svg">
</picture>
</div>
<br />
<br />

<div align="center">
<h1>Nimara Mailer</h1>
<strong>TypeScript serverless app for sending emails from Saleor.</strong>
</div>
<br />

## Local development

Expand Down
10 changes: 10 additions & 0 deletions docs/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"scripts": {
"dev": "concurrently -k -p \"[{name}]\" -n \"TSC,BUILD,EVENTS-RECEIVER,EMAILS-SENDER\" -c \"blue.bold,red.bold,cyan.bold,green.bold\" \"pnpm tsc:watch\" \"pnpm dev:build\" \"pnpm dev:run:events-receiver\" \"pnpm dev:run:emails-sender-proxy\"",
"dev:build": "dotenv -v NODE_ENV=development -- node ./etc/scripts/dev.mjs",
"dev:emails": "email dev -d ./src/templates -p 3002",
"dev:run:events-receiver": "dotenv -v NODE_ENV=development -- nodemon --inspect=0.0.0.0:9229 --watch build/server.js build/server.js",
"dev:run:emails-sender-proxy": "dotenv -v NODE_ENV=development -- nodemon --inspect=0.0.0.0:9230 --watch build/emails-sender-proxy.js build/emails-sender-proxy.js",
"build": "dotenv -v NODE_ENV=production node ./etc/scripts/build.mjs",
Expand All @@ -37,9 +38,13 @@
},
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.637.0",
"@aws-sdk/client-ses": "^3.658.1",
"@aws-sdk/client-sqs": "^3.658.1",
"@fastify/aws-lambda": "^4.1.0",
"@fastify/error": "^4.0.0",
"@react-email/components": "^0.0.25",
"@types/react": "18",
"@types/react-dom": "18",
"dataloader": "^2.2.2",
"dotenv-cli": "^7.4.2",
"drizzle-kit": "^0.23.2",
Expand All @@ -60,6 +65,9 @@
"pg": "^8.12.0",
"pino-pretty": "^11.2.2",
"postcss": "^8.4.40",
"react": "18",
"react-dom": "18",
"react-email": "^3.0.1",
"ts-invariant": "^0.10.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.5.2",
Expand Down
Loading

0 comments on commit 5a559d4

Please sign in to comment.