summaryrefslogtreecommitdiff
path: root/packages/shared
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-07 01:42:57 -0800
committerFuwn <[email protected]>2026-02-07 01:42:57 -0800
commit5c5b1993edd890a80870ee05607ac5f088191d4e (patch)
treea721b76bcd49ba10826c53efc87302c7a689512f /packages/shared
downloadasa.news-5c5b1993edd890a80870ee05607ac5f088191d4e.tar.xz
asa.news-5c5b1993edd890a80870ee05607ac5f088191d4e.zip
feat: asa.news RSS reader with developer tier, REST API, and webhooks
Full-stack RSS reader SaaS: Supabase + Next.js + Go worker. Includes three subscription tiers (free/pro/developer), API key auth, read-only REST API, webhook push notifications, Stripe billing with proration, and PWA support.
Diffstat (limited to 'packages/shared')
-rw-r--r--packages/shared/package.json15
-rw-r--r--packages/shared/source/index.ts45
-rw-r--r--packages/shared/tsconfig.json16
3 files changed, 76 insertions, 0 deletions
diff --git a/packages/shared/package.json b/packages/shared/package.json
new file mode 100644
index 0000000..e17e81c
--- /dev/null
+++ b/packages/shared/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "@asa-news/shared",
+ "version": "0.0.0",
+ "private": true,
+ "type": "module",
+ "main": "./source/index.ts",
+ "types": "./source/index.ts",
+ "scripts": {
+ "build": "tsc",
+ "lint": "tsc --noEmit"
+ },
+ "devDependencies": {
+ "typescript": "^5.7"
+ }
+}
diff --git a/packages/shared/source/index.ts b/packages/shared/source/index.ts
new file mode 100644
index 0000000..a8108fd
--- /dev/null
+++ b/packages/shared/source/index.ts
@@ -0,0 +1,45 @@
+export const APPLICATION_NAME = "asa.news"
+
+export const TIER_LIMITS = {
+ free: {
+ maximumFeeds: 10,
+ maximumFolders: 3,
+ maximumMutedKeywords: 5,
+ maximumCustomFeeds: 1,
+ historyRetentionDays: 14,
+ refreshIntervalSeconds: 1800,
+ allowsAuthenticatedFeeds: false,
+ allowsExport: false,
+ allowsManualRefresh: false,
+ allowsApiAccess: false,
+ allowsWebhooks: false,
+ },
+ pro: {
+ maximumFeeds: 200,
+ maximumFolders: 10000,
+ maximumMutedKeywords: 10000,
+ maximumCustomFeeds: 1000,
+ historyRetentionDays: Infinity,
+ refreshIntervalSeconds: 300,
+ allowsAuthenticatedFeeds: true,
+ allowsExport: true,
+ allowsManualRefresh: true,
+ allowsApiAccess: false,
+ allowsWebhooks: false,
+ },
+ developer: {
+ maximumFeeds: 500,
+ maximumFolders: 10000,
+ maximumMutedKeywords: 10000,
+ maximumCustomFeeds: 1000,
+ historyRetentionDays: Infinity,
+ refreshIntervalSeconds: 300,
+ allowsAuthenticatedFeeds: true,
+ allowsExport: true,
+ allowsManualRefresh: true,
+ allowsApiAccess: true,
+ allowsWebhooks: true,
+ },
+} as const
+
+export type SubscriptionTier = keyof typeof TIER_LIMITS
diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json
new file mode 100644
index 0000000..1636f4d
--- /dev/null
+++ b/packages/shared/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "declaration": true,
+ "declarationMap": true,
+ "sourceMap": true,
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "outDir": "dist"
+ },
+ "include": ["source"],
+ "exclude": ["node_modules", "dist"]
+}