-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
65 lines (57 loc) · 2.88 KB
/
Copy pathwrangler.jsonc
File metadata and controls
65 lines (57 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "feedhub",
"main": "src/index.ts",
"compatibility_date": "2026-06-01",
"compatibility_flags": ["nodejs_compat"],
"observability": { "enabled": true },
// Custom domains — api.gokhan.vc + embeddable public assets (PDFs, etc.).
"routes": [
{ "pattern": "api.gokhan.vc", "custom_domain": true },
{ "pattern": "assets.numetal.xyz", "custom_domain": true }
],
// Public studio assets — PDF deck embeds, etc. Keys live under `assets/` prefix.
"r2_buckets": [
{ "binding": "ASSETS", "bucket_name": "numetal-crawls", "preview_bucket_name": "numetal-crawls" }
],
// D1 — system of record. Fill database_id from `wrangler d1 create feedhub`.
"d1_databases": [
{ "binding": "DB", "database_name": "feedhub", "database_id": "0165711f-4e9e-4f51-b8bc-75d897afedf1" }
],
// KV — rendered-feed cache only (staleness harmless).
"kv_namespaces": [
{ "binding": "FEED_CACHE", "id": "23426e7e96524e4a98a4fc11776512ff" }
],
// Durable Object — single-flight poll/enqueue lock (D1 read-your-writes + serialized execution).
"durable_objects": {
"bindings": [{ "name": "POLLER", "class_name": "Poller" }]
},
"migrations": [{ "tag": "v1", "new_sqlite_classes": ["Poller"] }],
// Queues — durable email/XMTP fan-out (at-least-once; the sends ledger makes the effect exactly-once).
"queues": {
"producers": [
{ "binding": "EMAIL_Q", "queue": "feedhub-email" },
{ "binding": "XMTP_Q", "queue": "feedhub-xmtp" }
],
"consumers": [
{ "queue": "feedhub-email", "max_batch_size": 10, "max_retries": 5, "dead_letter_queue": "feedhub-dlq" }
// feedhub-xmtp is consumed by the external xmtp-bot service via HTTP pull, not a Worker consumer.
]
},
// Cron — poll the 4 feeds every 10 min (blogs publish rarely; well under the 15-min wall cap).
"triggers": { "crons": ["*/10 * * * *"] },
// Non-secret vars. Secrets (RESEND_API_KEY, UNSUB_SECRET, ADMIN_TOKEN, RESEND_WEBHOOK_SECRET,
// RESEND_SEGMENT, TURNSTILE_SECRET) set via `wrangler secret put`.
"vars": {
"ALLOWED_ORIGINS": "https://ishtar.numetal.xyz,https://numetal.xyz,https://www.numetal.xyz,https://curb.numetal.xyz,https://api.curb.numetal.xyz,https://gokhan.vc,https://www.gokhan.vc,https://gokhanturhan.com,https://www.gokhanturhan.com,https://avalidurl.github.io",
"FEEDS": "https://ishtar.numetal.xyz/rss.xml,https://numetal.xyz/feed.xml,https://curb.numetal.xyz/feed.xml,https://gokhan.vc/feed.xml,https://gokhanturhan.com/rss.xml",
"SENDER": "Gökhan Turhan <newsletter@gokhan.vc>",
"AGENT_EMAIL_SENDER": "Agent Mail <newsletter@gokhan.vc>",
"LAUNCH": "off",
"PUBLIC_API_URL": "https://api.gokhan.vc",
"X402_MODE": "mainnet",
"PAY_TO": "0x36de990133D36d7E3DF9a820aA3eDE5a2320De71",
"MPP_RECIPIENT": "0x3e267aA9439C82FfB36078676E67901a1ca6D352",
"MPP_ENABLED": "true"
}
}