Skip to content

Commit d193bba

Browse files
Merge pull request #6 from kcoderhtml/dev
docs: add instructions on how to deploy
2 parents 472252c + be17820 commit d193bba

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

README.md

+37
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,43 @@ Ummmm... seems I may have used a little gemini to write the readme :shushing_fac
1414

1515
Well besides gemini introductions you can find a simple astro site that interfaces with [kcoderhtml/cloudflare-email](https://github.com/kcoderhtml/cloudflare-email) on the backend and is easily deployable with netlify!
1616

17+
## Setup
18+
1. Fork this repo and deploy it to netlify
19+
2. create a new Astro DB project at [studio.astro.build](https://studio.astro.build/) and generate a new app token to be added to the netlify env below
20+
3. create a new slack app with the app manifest listed below; make sure to change the name of the app and to install it into your workspace:
21+
```yaml
22+
display_information:
23+
name: Catapult Mailer - {name} Instance # can be whatever this is just what I use
24+
description: The OAuth Provider for the {name} Catapult Mailer instance # same here
25+
background_color: "#735bb5" # could be whatever you want
26+
oauth_config:
27+
redirect_urls:
28+
- https://your-app-here.netlify.app/
29+
scopes:
30+
user:
31+
- openid
32+
- email
33+
- profile
34+
settings:
35+
org_deploy_enabled: false
36+
socket_mode_enabled: false
37+
token_rotation_enabled: false
38+
```
39+
4. setup the ENV in netlify:
40+
```s
41+
ARCJET_KEY=ajkey_xxxxxxxxxxxxxxxxxxxxxxxxxx {you can get this from https://arcjet.com/}
42+
ASTRO_STUDIO_APP_TOKEN=d478xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:gbaixxxxxxxxxxxxxxxxxxxxxxxx:gbaixxxxxxxxxxxxxxxxxxxxxxxx {you can get this from your astro db project}
43+
EMAIL_API=https://email.example.com/api/email {change it to be your cloudflare email instance but always add the /api/email on the end of your base domain}
44+
EMAIL_API_KEY={Whatever you set it to be in your cloudflare email instance}
45+
JWT_SECRET={generate a new 256 length secret at https://jwtsecret.com/generate or with `openssl rand -hex 256`}
46+
NAME=Catapult Mailer dev instance
47+
48+
SLACK_CLIENT_ID=xxxxxxxxxx.xxxxxxxxxxxxx
49+
SLACK_CLIENT_SECRET=55f7xxxxxxxxxxxxxxxxxxxxxxxxxxxx
50+
SLACK_SIGNING_SECRET=d597xxxxxxxxxxxxxxxxxxxxxxxxxxxx
51+
```
52+
5. Have fun!
53+
1754
**Ready to take your email marketing to the next level? Grab your flaming arrows and let Catapult Mailer launch your success!**
1855

1956
P.S. This repo is licensed with the AGPL-3.0 license which can be found in [LICENSE.md](/LICENSE.md)

src/pages/dashboard.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if (Astro.request.method === "POST") {
3434
html:
3535
messageType === "text/html"
3636
? message +
37-
` \n\n You're receiving this email because you subscribed to ${import.meta.env.NAME}'s newsletter. If you'd like to stop receiving emails from ${import.meta.env.NAME}, <a href="${Astro.url.origin}/api/unsubscribe"> unsubscribe here </a>`
37+
` <br><br> You're receiving this email because you subscribed to ${import.meta.env.NAME}'s newsletter. If you'd like to stop receiving emails from ${import.meta.env.NAME}, <a href="${Astro.url.origin}/api/unsubscribe"> unsubscribe here </a>`
3838
: undefined,
3939
text:
4040
messageType === "text/plain"

0 commit comments

Comments
 (0)