aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-04 00:45:27 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-04 00:47:56 -0700
commita6df2f7648748817a547b50f1effbdb92b2a572d (patch)
treebf673557ef8ba9469d09dae0e37cffb2a8a3ac50
parentcb2fdfa339a22f66fdc12f3ef199cb978ae96f69 (diff)
update README with notification info
-rw-r--r--README.md9
-rw-r--r--site/.env.template10
2 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 498bbf8..61ad4ee 100644
--- a/README.md
+++ b/README.md
@@ -58,3 +58,12 @@ pnpm run dev
# Middleware
The middleware dynamically generated OpenGraph and other metadata tags for posts. This is optional. Only deploy if you need this functionality (aka Discord previews)
+
+# Notifications
+**Requires Middleware to be running**
+
+Foreground and Background + PWA notifications are available using Firebase Cloud Messaging. Replace the credentials in `site/public/firebase-messaging-sw.js` as well as the necessary Firebase environment variables as shown in `site/.env.template`
+
+Subscription to individual games are tracked in Redis/Vercel KV as an edge funtion. This is necessary to both track which devices are subscribed to what topic. There is also no existing way in FCM to send a notification to every device without having the tokens stored somewhere.
+
+Notifications are only sent out each run of `generate.py` for uniquely hashed news entries.
diff --git a/site/.env.template b/site/.env.template
index 5a18e8b..c908a15 100644
--- a/site/.env.template
+++ b/site/.env.template
@@ -1,3 +1,13 @@
VITE_NEWS_BASE_URL=
VITE_MIDDLEWARE_BASE_URL=
VITE_PFP_BASE_URL=
+VITE_FIREBASE_API_KEY=
+VITE_FIREBASE_APP_ID=
+VITE_FIREBASE_AUTH_DOMAIN=
+VITE_FIREBASE_MESSAGING_SENDER_ID=
+VITE_FIREBASE_PROJECT_ID=
+VITE_FIREBASE_STORAGE_BUCKET=
+VITE_MIDDLEWARE_BASE_URL="https://ac.moekyun.me"
+VITE_NEWS_BASE_URL="https://arcade-news.pinapelz.com"
+VITE_PFP_BASE_URL="https://arcade-news.pinapelz.com"
+VITE_VAPID_KEY=
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage