@adityanair98/api-oracle 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -0
  3. package/dist/cli.d.ts +11 -0
  4. package/dist/cli.js +74 -0
  5. package/dist/dashboard/public/app.js +1004 -0
  6. package/dist/dashboard/public/index.html +142 -0
  7. package/dist/dashboard/public/public/app.js +1004 -0
  8. package/dist/dashboard/public/public/index.html +142 -0
  9. package/dist/dashboard/public/public/styles.css +1464 -0
  10. package/dist/dashboard/public/styles.css +1464 -0
  11. package/dist/dashboard/routes/api.d.ts +7 -0
  12. package/dist/dashboard/routes/api.js +245 -0
  13. package/dist/dashboard/server.d.ts +9 -0
  14. package/dist/dashboard/server.js +45 -0
  15. package/dist/index.d.ts +5 -0
  16. package/dist/index.js +23 -0
  17. package/dist/knowledge/db.d.ts +22 -0
  18. package/dist/knowledge/db.js +182 -0
  19. package/dist/knowledge/schema.d.ts +275 -0
  20. package/dist/knowledge/schema.js +135 -0
  21. package/dist/knowledge/scorer.d.ts +63 -0
  22. package/dist/knowledge/scorer.js +314 -0
  23. package/dist/knowledge/search.d.ts +37 -0
  24. package/dist/knowledge/search.js +111 -0
  25. package/dist/knowledge/synonyms.d.ts +36 -0
  26. package/dist/knowledge/synonyms.js +523 -0
  27. package/dist/knowledge/tfidf.d.ts +42 -0
  28. package/dist/knowledge/tfidf.js +138 -0
  29. package/dist/server.d.ts +9 -0
  30. package/dist/server.js +40 -0
  31. package/dist/tools/check-freshness.d.ts +9 -0
  32. package/dist/tools/check-freshness.js +95 -0
  33. package/dist/tools/compare-apis.d.ts +8 -0
  34. package/dist/tools/compare-apis.js +149 -0
  35. package/dist/tools/find-api.d.ts +9 -0
  36. package/dist/tools/find-api.js +120 -0
  37. package/dist/tools/get-setup-guide.d.ts +8 -0
  38. package/dist/tools/get-setup-guide.js +127 -0
  39. package/dist/updater/linter.d.ts +31 -0
  40. package/dist/updater/linter.js +219 -0
  41. package/dist/updater/report.d.ts +29 -0
  42. package/dist/updater/report.js +96 -0
  43. package/dist/updater/staleness.d.ts +39 -0
  44. package/dist/updater/staleness.js +66 -0
  45. package/dist/updater/version-tracker.d.ts +28 -0
  46. package/dist/updater/version-tracker.js +50 -0
  47. package/dist/utils/config.d.ts +11 -0
  48. package/dist/utils/config.js +13 -0
  49. package/dist/utils/logger.d.ts +20 -0
  50. package/dist/utils/logger.js +32 -0
  51. package/package.json +56 -0
  52. package/src/entries/ai/anthropic.json +95 -0
  53. package/src/entries/ai/eleven-labs.json +90 -0
  54. package/src/entries/ai/openai.json +95 -0
  55. package/src/entries/ai/replicate.json +87 -0
  56. package/src/entries/ai/resemble-ai.json +88 -0
  57. package/src/entries/ai/stability-ai.json +89 -0
  58. package/src/entries/analytics/posthog.json +88 -0
  59. package/src/entries/analytics/sentry.json +84 -0
  60. package/src/entries/auth/auth0.json +90 -0
  61. package/src/entries/auth/clerk.json +95 -0
  62. package/src/entries/cms/contentful.json +92 -0
  63. package/src/entries/cms/sanity.json +92 -0
  64. package/src/entries/cms/strapi.json +93 -0
  65. package/src/entries/commerce/medusa.json +91 -0
  66. package/src/entries/commerce/shopify-api.json +91 -0
  67. package/src/entries/communication/sendbird.json +85 -0
  68. package/src/entries/communication/stream-chat.json +94 -0
  69. package/src/entries/database/firebase.json +88 -0
  70. package/src/entries/database/neon.json +94 -0
  71. package/src/entries/database/planetscale.json +95 -0
  72. package/src/entries/database/supabase.json +94 -0
  73. package/src/entries/database/upstash.json +94 -0
  74. package/src/entries/devops/fly-io.json +90 -0
  75. package/src/entries/devops/netlify.json +90 -0
  76. package/src/entries/devops/railway.json +90 -0
  77. package/src/entries/devops/vercel.json +90 -0
  78. package/src/entries/email/mailgun.json +91 -0
  79. package/src/entries/email/postmark.json +91 -0
  80. package/src/entries/email/resend.json +89 -0
  81. package/src/entries/email/sendgrid.json +90 -0
  82. package/src/entries/forms/formspark.json +85 -0
  83. package/src/entries/forms/typeform.json +98 -0
  84. package/src/entries/infrastructure/aws-s3.json +104 -0
  85. package/src/entries/infrastructure/cloudflare-r2.json +92 -0
  86. package/src/entries/infrastructure/cloudflare-workers.json +92 -0
  87. package/src/entries/infrastructure/digital-ocean-spaces.json +87 -0
  88. package/src/entries/integration/nango.json +90 -0
  89. package/src/entries/integration/zapier.json +92 -0
  90. package/src/entries/maps/google-maps.json +89 -0
  91. package/src/entries/maps/mapbox.json +87 -0
  92. package/src/entries/media/deepgram.json +84 -0
  93. package/src/entries/media/imgix.json +84 -0
  94. package/src/entries/media/mux.json +94 -0
  95. package/src/entries/messaging/ably.json +94 -0
  96. package/src/entries/messaging/pusher.json +94 -0
  97. package/src/entries/messaging/twilio.json +94 -0
  98. package/src/entries/messaging/vonage.json +89 -0
  99. package/src/entries/notifications/knock.json +84 -0
  100. package/src/entries/notifications/novu.json +84 -0
  101. package/src/entries/notifications/onesignal.json +84 -0
  102. package/src/entries/payments/lemonsqueezy.json +91 -0
  103. package/src/entries/payments/paddle.json +90 -0
  104. package/src/entries/payments/paypal.json +91 -0
  105. package/src/entries/payments/razorpay.json +85 -0
  106. package/src/entries/payments/square.json +91 -0
  107. package/src/entries/payments/stripe.json +96 -0
  108. package/src/entries/scheduling/cal-com.json +90 -0
  109. package/src/entries/scheduling/calendly.json +90 -0
  110. package/src/entries/search/algolia.json +96 -0
  111. package/src/entries/security/arcjet.json +89 -0
  112. package/src/entries/security/snyk.json +90 -0
  113. package/src/entries/storage/cloudinary.json +93 -0
  114. package/src/entries/storage/uploadthing.json +90 -0
  115. package/src/entries/testing/browserstack.json +86 -0
  116. package/src/entries/testing/checkly.json +89 -0
  117. package/src/entries/workflow/inngest.json +88 -0
  118. package/src/entries/workflow/temporal.json +90 -0
  119. package/src/entries/workflow/trigger-dev.json +89 -0
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "Stream Chat",
3
+ "slug": "stream-chat",
4
+ "category": "communication",
5
+ "subcategory": "in-app-chat",
6
+ "website": "https://getstream.io/chat",
7
+ "description": "Stream Chat is a managed chat API and SDK that provides everything needed to build in-app messaging: message persistence, user presence, reactions, threads, moderation, search, and pre-built UI components for React, React Native, iOS, and Android. It handles the full chat infrastructure so you can focus on your product.",
8
+ "useCases": [
9
+ {
10
+ "task": "Build in-app chat between users in a marketplace or social app",
11
+ "fit": "perfect"
12
+ },
13
+ {
14
+ "task": "Add team messaging and channels to a SaaS product",
15
+ "fit": "perfect"
16
+ },
17
+ {
18
+ "task": "Build customer support live chat",
19
+ "fit": "perfect"
20
+ },
21
+ {
22
+ "task": "Add group messaging with reactions and threads",
23
+ "fit": "perfect"
24
+ },
25
+ {
26
+ "task": "Simple one-directional notifications",
27
+ "fit": "partial"
28
+ }
29
+ ],
30
+ "auth": {
31
+ "method": "api_key",
32
+ "setupSteps": [
33
+ "Sign up at getstream.io",
34
+ "Create a new app in the Stream dashboard",
35
+ "Copy your App ID, API Key, and API Secret",
36
+ "Set STREAM_API_KEY and STREAM_API_SECRET environment variables",
37
+ "Generate user tokens server-side using the StreamChat SDK"
38
+ ],
39
+ "envVarName": "STREAM_API_SECRET",
40
+ "codeSnippet": "import { StreamChat } from 'stream-chat';\nconst serverClient = StreamChat.getInstance(process.env.STREAM_API_KEY!, process.env.STREAM_API_SECRET!);"
41
+ },
42
+ "pricing": {
43
+ "model": "freemium",
44
+ "freeTier": "Up to 1,000 MAU, unlimited messages",
45
+ "startingPrice": "$399/month for up to 10,000 MAU",
46
+ "costPer": "Varies by plan; approximately $0.04/MAU above plan limit",
47
+ "pricingUrl": "https://getstream.io/chat/pricing"
48
+ },
49
+ "rateLimits": {
50
+ "tier": "all tiers",
51
+ "limit": "Depends on plan; default API rate limits apply per endpoint",
52
+ "notes": "Stream handles WebSocket connections internally. Message rate limits are per channel. High-volume channels (broadcast) have different limits than 1:1 conversations.",
53
+ "retryStrategy": "Stream's client SDK handles reconnection and message retry automatically. Use server-side retry for API calls with exponential backoff."
54
+ },
55
+ "sdk": {
56
+ "primaryLanguage": "typescript",
57
+ "installCommand": "npm install --save-exact stream-chat stream-chat-react",
58
+ "importStatement": "import { StreamChat } from 'stream-chat';\nimport { Chat, Channel, MessageList, MessageInput } from 'stream-chat-react';",
59
+ "otherLanguages": ["react-native", "swift", "android", "python", "go", "ruby", "php"]
60
+ },
61
+ "codeExamples": [
62
+ {
63
+ "title": "Create a channel and send a message (server-side)",
64
+ "language": "typescript",
65
+ "code": "import { StreamChat } from 'stream-chat';\n\nconst serverClient = StreamChat.getInstance(\n process.env.STREAM_API_KEY!,\n process.env.STREAM_API_SECRET!\n);\n\n// Upsert users\nawait serverClient.upsertUsers([\n { id: 'user-1', name: 'Alice' },\n { id: 'user-2', name: 'Bob' },\n]);\n\n// Create or get a direct message channel\nconst channel = serverClient.channel('messaging', 'alice-bob-dm', {\n members: ['user-1', 'user-2'],\n name: 'Alice & Bob',\n created_by_id: 'user-1',\n});\nawait channel.create();\n\n// Send a message\nconst response = await channel.sendMessage({\n text: 'Hey Bob! How are you?',\n user_id: 'user-1',\n});\n\nconsole.log('Message sent:', response.message.id);",
66
+ "notes": "Channel IDs must be unique per channel type. 'messaging' is for DMs and group chats; 'livestream' is for broadcast channels. Avoid spaces in channel IDs."
67
+ },
68
+ {
69
+ "title": "React chat component with pre-built UI",
70
+ "language": "typescript",
71
+ "code": "import { StreamChat } from 'stream-chat';\nimport { Chat, Channel, ChannelHeader, MessageList, MessageInput, Thread, Window } from 'stream-chat-react';\nimport 'stream-chat-react/dist/css/v2/index.css';\n\nconst client = StreamChat.getInstance(process.env.NEXT_PUBLIC_STREAM_API_KEY!);\n\n// Token generated server-side: serverClient.createToken(userId)\nawait client.connectUser(\n { id: 'user-1', name: 'Alice' },\n userToken // Generated server-side\n);\n\nconst channel = client.channel('messaging', 'alice-bob-dm');\n\nexport function ChatUI() {\n return (\n <Chat client={client}>\n <Channel channel={channel}>\n <Window>\n <ChannelHeader />\n <MessageList />\n <MessageInput />\n </Window>\n <Thread />\n </Channel>\n </Chat>\n );\n}",
72
+ "notes": "The pre-built React components handle everything: message rendering, infinite scroll, file uploads, emoji reactions, thread replies. Fully customizable via CSS and props."
73
+ }
74
+ ],
75
+ "gotchas": [
76
+ "User tokens MUST be generated server-side using your API Secret. The API Secret must never be exposed in client-side code. Set up a token endpoint that your app calls to authenticate users.",
77
+ "Stream's pricing jumps significantly at scale ($399/month for 10k MAU). The free tier (1,000 MAU) is only suitable for prototypes. Calculate your MAU carefully before committing.",
78
+ "Channel queries can return stale data if you're not handling the real-time events correctly. Always listen to channel events (message.new, member.added, etc.) to keep your state current.",
79
+ "Stream stores all message history on their servers. If you have data residency requirements (GDPR, HIPAA), check which regions are available and configure accordingly."
80
+ ],
81
+ "reliability": {
82
+ "uptimeGuarantee": "99.999% uptime SLA on Growth and Enterprise plans",
83
+ "statusPageUrl": "https://status.getstream.io",
84
+ "notes": "Stream powers billions of messages for companies like Reddit, Duolingo, and Mercari. Global infrastructure with 99.999% SLA on paid plans."
85
+ },
86
+ "qualityScore": 9,
87
+ "qualityJustification": "Best-in-class chat API with the most complete feature set: reactions, threads, read receipts, file uploads, moderation, search, and excellent pre-built React components. TypeScript support is excellent. Pricing is the main drawback — it gets expensive quickly at scale.",
88
+ "alternatives": ["sendbird", "ably"],
89
+ "complementary": ["clerk", "pusher", "uploadthing"],
90
+ "bestFor": "Building full-featured in-app chat with pre-built UI components, message history, and reactions — for marketplaces, social apps, and SaaS",
91
+ "lastVerified": "2026-02-25",
92
+ "entryVersion": 1,
93
+ "addedBy": "claude-code-session-2"
94
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "Firebase",
3
+ "slug": "firebase",
4
+ "category": "database",
5
+ "subcategory": "app-platform",
6
+ "website": "https://firebase.google.com",
7
+ "description": "Firebase is Google's comprehensive app development platform providing Firestore (NoSQL document database), Authentication, Cloud Storage, Cloud Functions, Hosting, and Analytics. It is especially strong for mobile apps and real-time applications where offline-first behavior and Google ecosystem integration matter.",
8
+ "useCases": [
9
+ {
10
+ "task": "Build a mobile app backend with offline-first data sync",
11
+ "fit": "perfect"
12
+ },
13
+ {
14
+ "task": "Add user authentication with multiple social providers",
15
+ "fit": "perfect"
16
+ },
17
+ {
18
+ "task": "Store and sync real-time data across multiple clients",
19
+ "fit": "perfect"
20
+ },
21
+ {
22
+ "task": "Host a static web app with serverless functions",
23
+ "fit": "good"
24
+ },
25
+ {
26
+ "task": "Complex SQL queries or relational data models",
27
+ "fit": "partial"
28
+ }
29
+ ],
30
+ "auth": {
31
+ "method": "oauth2",
32
+ "setupSteps": [
33
+ "Create a project at console.firebase.google.com",
34
+ "Add a web or mobile app to your project",
35
+ "Copy the Firebase config object (apiKey, authDomain, projectId, etc.)",
36
+ "For server-side: go to Project Settings > Service Accounts and download a service account JSON",
37
+ "Set FIREBASE_SERVICE_ACCOUNT_KEY as the JSON string (or path) in your environment"
38
+ ],
39
+ "envVarName": "FIREBASE_SERVICE_ACCOUNT_KEY",
40
+ "codeSnippet": "import { initializeApp } from 'firebase/app';\nconst app = initializeApp({\n apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY!,\n authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN!,\n projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID!,\n});"
41
+ },
42
+ "pricing": {
43
+ "model": "freemium",
44
+ "freeTier": "Spark plan: 1GB Firestore storage, 50k reads/day, 20k writes/day, 1GB storage",
45
+ "startingPrice": "Blaze plan: pay-as-you-go (no monthly fee beyond free tier)",
46
+ "costPer": "Firestore: $0.06/100k reads, $0.18/100k writes, $0.06/GB/month storage",
47
+ "pricingUrl": "https://firebase.google.com/pricing"
48
+ },
49
+ "rateLimits": {
50
+ "tier": "Spark (free)",
51
+ "limit": "50,000 document reads/day, 20,000 writes/day, 20,000 deletes/day",
52
+ "notes": "Blaze (pay-as-you-go) has no daily limits but costs per operation. Cloud Functions require Blaze plan. Firestore has a 1MB document size limit.",
53
+ "retryStrategy": "Firebase SDK handles automatic retries with exponential backoff. Cloud Firestore has built-in offline persistence that queues writes."
54
+ },
55
+ "sdk": {
56
+ "primaryLanguage": "typescript",
57
+ "installCommand": "npm install --save-exact firebase",
58
+ "importStatement": "import { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, query, where, getDocs } from 'firebase/firestore';",
59
+ "otherLanguages": ["swift", "android", "flutter", "python", "go", "java", "ruby"]
60
+ },
61
+ "codeExamples": [
62
+ {
63
+ "title": "Read and write to Firestore",
64
+ "language": "typescript",
65
+ "code": "import { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, addDoc, query, where, getDocs, serverTimestamp } from 'firebase/firestore';\n\nconst app = initializeApp({\n apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY!,\n authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN!,\n projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID!,\n});\nconst db = getFirestore(app);\n\n// Write a document\nconst docRef = await addDoc(collection(db, 'posts'), {\n title: 'Hello Firestore',\n userId: 'user-123',\n createdAt: serverTimestamp(),\n});\nconsole.log('Written document ID:', docRef.id);\n\n// Query with filter\nconst q = query(\n collection(db, 'posts'),\n where('userId', '==', 'user-123')\n);\nconst snapshot = await getDocs(q);\nsnapshot.forEach(doc => console.log(doc.id, doc.data()));",
66
+ "notes": "Document IDs are auto-generated by addDoc(). For custom IDs use setDoc(). Firestore queries are limited to fields that have been indexed — complex queries may require composite indexes."
67
+ }
68
+ ],
69
+ "gotchas": [
70
+ "Cloud Functions (required for any server-side logic) require the Blaze (pay-as-you-go) plan, even if you're within the free tier limits. You cannot deploy functions on the free Spark plan.",
71
+ "Firestore does not support OR queries across different fields, JOIN-like operations, or full-text search. You may need to denormalize your data model significantly compared to a relational database.",
72
+ "The Firebase SDK bundle size is large. Using tree-shaking and the modular SDK (firebase/app, firebase/firestore) is essential for web performance — the legacy compat SDK imports everything.",
73
+ "Firestore Security Rules are a separate mini-language and are easy to get wrong. A misconfigured rule can either lock out legitimate users or expose all your data. Test rules thoroughly with the Firebase Emulator."
74
+ ],
75
+ "reliability": {
76
+ "uptimeGuarantee": "99.95% uptime SLA (Google Cloud SLA)",
77
+ "statusPageUrl": "https://status.firebase.google.com",
78
+ "notes": "Firebase runs on Google Cloud infrastructure with global multi-region replication for Firestore. Extremely reliable at scale."
79
+ },
80
+ "qualityScore": 8,
81
+ "qualityJustification": "Excellent for mobile-first applications with offline sync and real-time requirements. The NoSQL data model and deep Google/Android integration are genuine advantages. Web developer experience has improved with modular SDK. Main limitations: no SQL, complex security rules, and vendor lock-in.",
82
+ "alternatives": ["supabase", "neon"],
83
+ "complementary": ["stripe", "resend", "clerk"],
84
+ "bestFor": "Mobile-first apps needing offline-first sync, real-time data, and deep Google ecosystem integration (Android, Google Auth, Analytics)",
85
+ "lastVerified": "2026-02-25",
86
+ "entryVersion": 1,
87
+ "addedBy": "claude-code-session-2"
88
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "Neon",
3
+ "slug": "neon",
4
+ "category": "database",
5
+ "subcategory": "serverless-postgres",
6
+ "website": "https://neon.tech",
7
+ "description": "Neon is a serverless PostgreSQL platform that separates storage and compute, allowing databases to scale to zero when idle (no charges when not in use). It provides instant branching for development workflows, a serverless driver optimized for edge functions, and full PostgreSQL compatibility — making it the best serverless Postgres option for cost-conscious teams.",
8
+ "useCases": [
9
+ {
10
+ "task": "Run a serverless PostgreSQL database that scales to zero",
11
+ "fit": "perfect"
12
+ },
13
+ {
14
+ "task": "Add a Postgres database to a Next.js or serverless application",
15
+ "fit": "perfect"
16
+ },
17
+ {
18
+ "task": "Create database branches for development and preview environments",
19
+ "fit": "perfect"
20
+ },
21
+ {
22
+ "task": "Use Drizzle or Prisma ORM with a hosted Postgres database",
23
+ "fit": "perfect"
24
+ },
25
+ {
26
+ "task": "High-throughput OLTP workloads requiring consistent low latency",
27
+ "fit": "good"
28
+ }
29
+ ],
30
+ "auth": {
31
+ "method": "api_key",
32
+ "setupSteps": [
33
+ "Sign up at neon.tech",
34
+ "Create a new project (choose a region)",
35
+ "Go to the Dashboard and find your connection string",
36
+ "Copy the connection string (includes host, database, user, password)",
37
+ "Set DATABASE_URL environment variable with the connection string"
38
+ ],
39
+ "envVarName": "DATABASE_URL",
40
+ "codeSnippet": "import { neon } from '@neondatabase/serverless';\nconst sql = neon(process.env.DATABASE_URL!);"
41
+ },
42
+ "pricing": {
43
+ "model": "freemium",
44
+ "freeTier": "1 project, 0.5GB storage, 190 compute hours/month (scales to zero)",
45
+ "startingPrice": "$19/month (Launch plan) for 10GB storage, 300 compute hours",
46
+ "costPer": "Launch: $0.16/GB-month storage, $0.10/compute-hour above included amount",
47
+ "pricingUrl": "https://neon.tech/pricing"
48
+ },
49
+ "rateLimits": {
50
+ "tier": "free tier",
51
+ "limit": "0.5 compute units (shared CPU), 190 compute hours/month",
52
+ "notes": "Neon scales to zero after a period of inactivity (default 5 minutes on free tier). The first query after scaling to zero has a cold start of 100-500ms. Pro plan has configurable scale-to-zero.",
53
+ "retryStrategy": "Implement retry logic for cold start scenarios (connection timeout on first request). The @neondatabase/serverless driver handles HTTP connections for edge environments."
54
+ },
55
+ "sdk": {
56
+ "primaryLanguage": "typescript",
57
+ "installCommand": "npm install --save-exact @neondatabase/serverless",
58
+ "importStatement": "import { neon } from '@neondatabase/serverless';",
59
+ "otherLanguages": ["python", "go", "java", "ruby"]
60
+ },
61
+ "codeExamples": [
62
+ {
63
+ "title": "Query with the serverless driver",
64
+ "language": "typescript",
65
+ "code": "import { neon } from '@neondatabase/serverless';\n\nconst sql = neon(process.env.DATABASE_URL!);\n\n// Tagged template literal syntax (safe against SQL injection)\nconst userId = 'user-123';\nconst users = await sql`\n SELECT id, name, email, created_at\n FROM users\n WHERE id = ${userId}\n LIMIT 1\n`;\n\nconsole.log('User:', users[0]);\n\n// Insert with RETURNING\nconst [newPost] = await sql`\n INSERT INTO posts (title, body, user_id)\n VALUES (${'Hello World'}, ${'My first post'}, ${userId})\n RETURNING *\n`;\n\nconsole.log('Created post:', newPost.id);",
66
+ "notes": "The tagged template literal syntax automatically parameterizes values, preventing SQL injection. Use the neon() client for edge/serverless functions. For Node.js with connection pooling, use Pool from @neondatabase/serverless."
67
+ },
68
+ {
69
+ "title": "Use with Drizzle ORM",
70
+ "language": "typescript",
71
+ "code": "import { neon } from '@neondatabase/serverless';\nimport { drizzle } from 'drizzle-orm/neon-http';\nimport { users, posts } from './schema';\nimport { eq, desc } from 'drizzle-orm';\n\nconst sql = neon(process.env.DATABASE_URL!);\nconst db = drizzle(sql);\n\n// Type-safe query with Drizzle\nconst recentPosts = await db\n .select({\n id: posts.id,\n title: posts.title,\n authorName: users.name,\n })\n .from(posts)\n .leftJoin(users, eq(posts.userId, users.id))\n .orderBy(desc(posts.createdAt))\n .limit(10);\n\nconsole.log('Recent posts:', recentPosts);",
72
+ "notes": "Drizzle with neon-http adapter is optimized for serverless. Install: npm install --save-exact drizzle-orm drizzle-kit. Define your schema in a separate file."
73
+ }
74
+ ],
75
+ "gotchas": [
76
+ "Neon scales to zero by default, which means the first query after idle has a cold start latency of 100-500ms. For user-facing requests, this can be noticeable. Configure a longer scale-to-zero timeout or keep-alive pings if cold starts are unacceptable.",
77
+ "The free tier's 190 compute hours/month sounds generous, but if your database doesn't scale to zero (e.g., you keep it warm), you'll use ~190/730 = ~26% of a compute unit continuously, exhausting the free tier in roughly 26% of a month at full utilization.",
78
+ "Neon uses a different connection pooler (PgBouncer) than standard Postgres. When using Prisma, use the pooled connection string (ends in ?pgbouncer=true) for the application and the direct connection string for migrations.",
79
+ "Neon database branches are NOT like git branches that you can merge. Schema changes on a branch don't automatically apply to the parent branch. Branching is mainly for isolated development/testing environments."
80
+ ],
81
+ "reliability": {
82
+ "uptimeGuarantee": "99.95% uptime SLA on paid plans",
83
+ "statusPageUrl": "https://neonstatus.com",
84
+ "notes": "Neon stores data on AWS S3 with multi-AZ redundancy. Automatic failover and point-in-time recovery on paid plans."
85
+ },
86
+ "qualityScore": 8,
87
+ "qualityJustification": "Best serverless Postgres for cost-sensitive projects — scale-to-zero billing means you only pay for actual usage. Full PostgreSQL compatibility with no compromises (unlike MySQL-based alternatives). Database branching is genuinely useful for CI/CD. Cold start latency is the main tradeoff.",
88
+ "alternatives": ["supabase", "planetscale", "firebase", "upstash"],
89
+ "complementary": ["clerk", "stripe", "resend", "supabase"],
90
+ "bestFor": "Serverless PostgreSQL that scales to zero — ideal for applications with variable traffic, preview environments, and teams using Drizzle or Prisma",
91
+ "lastVerified": "2026-02-25",
92
+ "entryVersion": 1,
93
+ "addedBy": "claude-code-session-2"
94
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "PlanetScale",
3
+ "slug": "planetscale",
4
+ "category": "database",
5
+ "subcategory": "serverless-mysql",
6
+ "website": "https://planetscale.com",
7
+ "description": "PlanetScale is a serverless MySQL-compatible database platform built on Vitess (the technology powering YouTube's database). It offers horizontal sharding, non-blocking schema changes via branching, and a connection architecture optimized for serverless environments — without the operational overhead of managing MySQL.",
8
+ "useCases": [
9
+ {
10
+ "task": "Run MySQL-compatible database workloads at scale without operations",
11
+ "fit": "perfect"
12
+ },
13
+ {
14
+ "task": "Deploy schema changes safely without table locks in production",
15
+ "fit": "perfect"
16
+ },
17
+ {
18
+ "task": "Use a serverless-optimized database with connection pooling built in",
19
+ "fit": "perfect"
20
+ },
21
+ {
22
+ "task": "Use Prisma ORM with a hosted MySQL database",
23
+ "fit": "perfect"
24
+ },
25
+ {
26
+ "task": "Run complex PostgreSQL-specific features or extensions",
27
+ "fit": "partial"
28
+ }
29
+ ],
30
+ "auth": {
31
+ "method": "api_key",
32
+ "setupSteps": [
33
+ "Sign up at planetscale.com",
34
+ "Create a new database",
35
+ "Create a branch (main is your production branch)",
36
+ "Go to the branch's Connect tab",
37
+ "Select your connection method (e.g., Prisma, general) and generate credentials",
38
+ "Set DATABASE_URL environment variable with the provided connection string"
39
+ ],
40
+ "envVarName": "DATABASE_URL",
41
+ "codeSnippet": "// In .env: DATABASE_URL='mysql://username:password@host/dbname?sslaccept=strict'\n// With Prisma:\nimport { PrismaClient } from '@prisma/client';\nconst prisma = new PrismaClient();"
42
+ },
43
+ "pricing": {
44
+ "model": "freemium",
45
+ "freeTier": "1 database, 5GB storage, 1 billion row reads/month, 10M row writes/month",
46
+ "startingPrice": "$39/month (Scaler plan) for 10GB storage, 100B row reads",
47
+ "costPer": "Scaler: $39/month/database; additional storage at $2.50/GB/month",
48
+ "pricingUrl": "https://planetscale.com/pricing"
49
+ },
50
+ "rateLimits": {
51
+ "tier": "free tier (Hobby)",
52
+ "limit": "1 billion row reads/month, 10M row writes/month, 1,000 concurrent connections",
53
+ "notes": "PlanetScale uses a serverless driver that supports HTTP connections, eliminating traditional connection pool limits for serverless functions.",
54
+ "retryStrategy": "Use PlanetScale's @planetscale/database serverless driver for edge/serverless environments; it uses fetch() over HTTP instead of TCP connections"
55
+ },
56
+ "sdk": {
57
+ "primaryLanguage": "typescript",
58
+ "installCommand": "npm install --save-exact @planetscale/database",
59
+ "importStatement": "import { connect } from '@planetscale/database';",
60
+ "otherLanguages": ["python", "go", "ruby", "java", "php"]
61
+ },
62
+ "codeExamples": [
63
+ {
64
+ "title": "Query with the serverless driver",
65
+ "language": "typescript",
66
+ "code": "import { connect } from '@planetscale/database';\n\nconst conn = connect({\n url: process.env.DATABASE_URL!,\n});\n\n// Execute a query\nconst results = await conn.execute(\n 'SELECT * FROM users WHERE email = ? LIMIT 1',\n ['jane@example.com']\n);\n\nconsole.log('User:', results.rows[0]);\n\n// Insert a record\nconst insert = await conn.execute(\n 'INSERT INTO users (name, email, created_at) VALUES (?, ?, NOW())',\n ['Jane Smith', 'jane@example.com']\n);\n\nconsole.log('Inserted ID:', insert.insertId);",
67
+ "notes": "The @planetscale/database driver uses HTTP (fetch) instead of TCP connections — it works in Vercel Edge Functions, Cloudflare Workers, and any serverless environment."
68
+ },
69
+ {
70
+ "title": "Use with Prisma ORM",
71
+ "language": "typescript",
72
+ "code": "// prisma/schema.prisma\n// datasource db {\n// provider = \"mysql\"\n// url = env(\"DATABASE_URL\")\n// relationMode = \"prisma\" // Required for PlanetScale (no FK constraints)\n// }\n\nimport { PrismaClient } from '@prisma/client';\n\nconst prisma = new PrismaClient();\n\n// Use normally\nconst users = await prisma.user.findMany({\n where: { active: true },\n orderBy: { createdAt: 'desc' },\n take: 10,\n});\n\nconsole.log('Active users:', users.length);",
73
+ "notes": "Set relationMode = 'prisma' in your Prisma schema — PlanetScale disables foreign key constraints at the database level (Vitess limitation). Prisma emulates referential integrity in the client."
74
+ }
75
+ ],
76
+ "gotchas": [
77
+ "PlanetScale disables foreign key constraints at the database level (Vitess architecture). If you use Prisma, you must set relationMode = 'prisma' in your schema. This affects referential integrity — your app must handle cascading deletes manually.",
78
+ "PlanetScale's branching model means schema changes go through a deploy request process. You cannot run ALTER TABLE in production directly. This is safer but adds workflow complexity for teams used to running raw migrations.",
79
+ "The Hobby (free) plan was discontinued in 2024 for new signups. Existing Hobby users were grandfathered. New users start on Scaler ($39/month). Verify current pricing before committing.",
80
+ "Connection strings contain credentials — never commit them to git. Use environment variables and rotate credentials via the PlanetScale dashboard if compromised."
81
+ ],
82
+ "reliability": {
83
+ "uptimeGuarantee": "99.999% uptime SLA on paid plans",
84
+ "statusPageUrl": "https://www.planetscalestatus.com",
85
+ "notes": "Built on Vitess (used by YouTube, Slack, GitHub). Automatic failover, point-in-time recovery, and daily automated backups on paid plans."
86
+ },
87
+ "qualityScore": 8,
88
+ "qualityJustification": "Excellent MySQL-compatible serverless database with genuinely innovative schema branching workflow. The serverless HTTP driver is a real differentiator for edge deployments. No foreign key constraints is a significant limitation. Pricing change (removing free tier) reduced accessibility for indie developers.",
89
+ "alternatives": ["supabase", "neon"],
90
+ "complementary": ["stripe", "clerk", "resend"],
91
+ "bestFor": "Production-scale MySQL workloads in serverless/edge environments with safe schema migrations via branch-based deployments",
92
+ "lastVerified": "2026-02-25",
93
+ "entryVersion": 1,
94
+ "addedBy": "claude-code-session-2"
95
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "Supabase",
3
+ "slug": "supabase",
4
+ "category": "database",
5
+ "subcategory": "postgres-platform",
6
+ "website": "https://supabase.com",
7
+ "description": "Supabase is an open-source Firebase alternative built on PostgreSQL. It bundles a hosted Postgres database, authentication, file storage, edge functions, and real-time subscriptions into a single platform — making it the fastest way to build a full-stack backend without managing infrastructure.",
8
+ "useCases": [
9
+ {
10
+ "task": "Build a full-stack app backend with database, auth, and storage",
11
+ "fit": "perfect"
12
+ },
13
+ {
14
+ "task": "Add a managed PostgreSQL database to a Next.js application",
15
+ "fit": "perfect"
16
+ },
17
+ {
18
+ "task": "Get real-time database updates pushed to the client",
19
+ "fit": "perfect"
20
+ },
21
+ {
22
+ "task": "Replace Firebase with an open-source, SQL-based alternative",
23
+ "fit": "perfect"
24
+ },
25
+ {
26
+ "task": "Run complex SQL analytics queries",
27
+ "fit": "good"
28
+ }
29
+ ],
30
+ "auth": {
31
+ "method": "api_key",
32
+ "setupSteps": [
33
+ "Sign up at supabase.com",
34
+ "Create a new project (choose a region and set a database password)",
35
+ "Go to Project Settings > API to find your Project URL and keys",
36
+ "Copy the Project URL and anon public key (safe for browser) and service_role key (server only)",
37
+ "Set NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, and SUPABASE_SERVICE_ROLE_KEY"
38
+ ],
39
+ "envVarName": "SUPABASE_SERVICE_ROLE_KEY",
40
+ "codeSnippet": "import { createClient } from '@supabase/supabase-js';\nconst supabase = createClient(\n process.env.NEXT_PUBLIC_SUPABASE_URL!,\n process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!\n);"
41
+ },
42
+ "pricing": {
43
+ "model": "freemium",
44
+ "freeTier": "2 free projects, 500MB database, 1GB storage, 50MB file uploads",
45
+ "startingPrice": "$25/month (Pro plan) per project",
46
+ "costPer": "Pro: $25/project/month includes 8GB DB, 100GB storage, 5GB bandwidth",
47
+ "pricingUrl": "https://supabase.com/pricing"
48
+ },
49
+ "rateLimits": {
50
+ "tier": "free tier",
51
+ "limit": "500MB database, projects paused after 1 week of inactivity",
52
+ "notes": "Free projects are paused after 7 days of inactivity (no requests). You must manually unpause them. Pro projects are never paused.",
53
+ "retryStrategy": "Use connection pooling (PgBouncer built-in) for serverless functions. Implement exponential backoff for transient errors."
54
+ },
55
+ "sdk": {
56
+ "primaryLanguage": "typescript",
57
+ "installCommand": "npm install --save-exact @supabase/supabase-js",
58
+ "importStatement": "import { createClient } from '@supabase/supabase-js';",
59
+ "otherLanguages": ["python", "dart", "swift", "kotlin", "rust"]
60
+ },
61
+ "codeExamples": [
62
+ {
63
+ "title": "Query data from a table",
64
+ "language": "typescript",
65
+ "code": "import { createClient } from '@supabase/supabase-js';\n\nconst supabase = createClient(\n process.env.NEXT_PUBLIC_SUPABASE_URL!,\n process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!\n);\n\n// Fetch all posts with author name\nconst { data, error } = await supabase\n .from('posts')\n .select(`\n id,\n title,\n body,\n created_at,\n author:users(name, avatar_url)\n `)\n .eq('published', true)\n .order('created_at', { ascending: false })\n .limit(10);\n\nif (error) throw new Error(error.message);\nconsole.log('Posts:', data);",
66
+ "notes": "Supabase uses Row Level Security (RLS) to control data access. Enable RLS on all tables and create policies, otherwise the anon key gives full table access."
67
+ },
68
+ {
69
+ "title": "Subscribe to real-time changes",
70
+ "language": "typescript",
71
+ "code": "import { createClient } from '@supabase/supabase-js';\n\nconst supabase = createClient(\n process.env.NEXT_PUBLIC_SUPABASE_URL!,\n process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!\n);\n\n// Subscribe to INSERT events on 'messages' table\nconst channel = supabase\n .channel('messages-changes')\n .on(\n 'postgres_changes',\n { event: 'INSERT', schema: 'public', table: 'messages' },\n (payload) => {\n console.log('New message:', payload.new);\n }\n )\n .subscribe();\n\n// Unsubscribe when done\nreturn () => supabase.removeChannel(channel);",
72
+ "notes": "Realtime works via WebSockets. It requires enabling Realtime for the specific table in the Supabase dashboard (Table Editor > Realtime). Only works when RLS is enabled."
73
+ }
74
+ ],
75
+ "gotchas": [
76
+ "Row Level Security (RLS) is disabled by default. If you use the anon key (which is safe to expose in the browser), every user can read and write all rows in all tables unless you enable RLS and write policies. This is the #1 security mistake with Supabase.",
77
+ "Free tier projects are paused after 7 days of inactivity. The first request after pausing triggers an unpausing process that can take 20-30 seconds. This surprises teams demoing their apps.",
78
+ "Supabase uses connection pooling via PgBouncer, but serverless functions (Vercel, Netlify) can still exhaust connection limits under load. Use the session-mode connection string (not transaction-mode) for full PostgreSQL feature support.",
79
+ "The Supabase Auth user IDs are UUIDs stored in auth.users (a separate schema). You typically create a public.users table and use a database trigger to sync users on signup — don't forget this step."
80
+ ],
81
+ "reliability": {
82
+ "uptimeGuarantee": "99.9% uptime SLA on Pro plan and above",
83
+ "statusPageUrl": "https://status.supabase.com",
84
+ "notes": "Supabase infrastructure is hosted on AWS. Multiple regions available. Pro plan includes daily database backups (7-day retention)."
85
+ },
86
+ "qualityScore": 9,
87
+ "qualityJustification": "The best Firebase alternative for developers who prefer SQL. Excellent TypeScript SDK, generous free tier, and the combination of auth + storage + database + realtime in one platform reduces infrastructure complexity dramatically. RLS requirement is a feature, not a bug, but does add onboarding complexity.",
88
+ "alternatives": ["firebase", "neon", "planetscale", "upstash"],
89
+ "complementary": ["resend", "stripe", "clerk"],
90
+ "bestFor": "Full-stack Next.js/React apps needing a managed Postgres database with auth, storage, and real-time built in — the open-source Firebase alternative",
91
+ "lastVerified": "2026-02-25",
92
+ "entryVersion": 1,
93
+ "addedBy": "claude-code-session-2"
94
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "Upstash",
3
+ "slug": "upstash",
4
+ "category": "database",
5
+ "subcategory": "serverless-redis",
6
+ "website": "https://upstash.com",
7
+ "description": "Upstash provides serverless Redis and Kafka optimized for edge and serverless environments. With per-request pricing and a REST API, it is the go-to solution for caching, rate limiting, session storage, and queuing in Next.js, Vercel Edge Functions, and Cloudflare Workers where persistent TCP connections are not available.",
8
+ "useCases": [
9
+ {
10
+ "task": "Add Redis caching to a serverless or edge function",
11
+ "fit": "perfect"
12
+ },
13
+ {
14
+ "task": "Implement rate limiting for API routes",
15
+ "fit": "perfect"
16
+ },
17
+ {
18
+ "task": "Store session data or ephemeral state in serverless apps",
19
+ "fit": "perfect"
20
+ },
21
+ {
22
+ "task": "Queue background jobs with Redis lists",
23
+ "fit": "good"
24
+ },
25
+ {
26
+ "task": "Use as primary persistent database",
27
+ "fit": "partial"
28
+ }
29
+ ],
30
+ "auth": {
31
+ "method": "api_key",
32
+ "setupSteps": [
33
+ "Sign up at upstash.com",
34
+ "Create a new Redis database (choose region, enable TLS)",
35
+ "Go to the database details page",
36
+ "Copy the UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN",
37
+ "Set UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN environment variables"
38
+ ],
39
+ "envVarName": "UPSTASH_REDIS_REST_TOKEN",
40
+ "codeSnippet": "import { Redis } from '@upstash/redis';\nconst redis = new Redis({\n url: process.env.UPSTASH_REDIS_REST_URL!,\n token: process.env.UPSTASH_REDIS_REST_TOKEN!,\n});"
41
+ },
42
+ "pricing": {
43
+ "model": "freemium",
44
+ "freeTier": "10,000 commands/day, 256MB max database size",
45
+ "startingPrice": "$0.20 per 100k commands (Pay-as-you-go, no monthly fee)",
46
+ "costPer": "$0.20 per 100,000 commands; $0.25/GB storage/month",
47
+ "pricingUrl": "https://upstash.com/pricing"
48
+ },
49
+ "rateLimits": {
50
+ "tier": "free tier",
51
+ "limit": "10,000 daily commands; 1MB max request/response size",
52
+ "notes": "Upstash uses a REST API over HTTP — there are no TCP connection limits. Free tier has a daily command quota. Pro plan has higher quotas and bandwidth.",
53
+ "retryStrategy": "HTTP-based requests; implement standard exponential backoff for 429 and 5xx responses"
54
+ },
55
+ "sdk": {
56
+ "primaryLanguage": "typescript",
57
+ "installCommand": "npm install --save-exact @upstash/redis",
58
+ "importStatement": "import { Redis } from '@upstash/redis';",
59
+ "otherLanguages": ["python", "go"]
60
+ },
61
+ "codeExamples": [
62
+ {
63
+ "title": "Cache API responses with TTL",
64
+ "language": "typescript",
65
+ "code": "import { Redis } from '@upstash/redis';\n\nconst redis = new Redis({\n url: process.env.UPSTASH_REDIS_REST_URL!,\n token: process.env.UPSTASH_REDIS_REST_TOKEN!,\n});\n\nasync function getCachedUser(userId: string): Promise<User | null> {\n const cacheKey = `user:${userId}`;\n \n // Try cache first\n const cached = await redis.get<User>(cacheKey);\n if (cached) return cached;\n \n // Cache miss — fetch from database\n const user = await db.users.findUnique({ where: { id: userId } });\n if (!user) return null;\n \n // Cache for 5 minutes\n await redis.setex(cacheKey, 300, user);\n return user;\n}",
66
+ "notes": "Upstash Redis serializes/deserializes JSON automatically via the @upstash/redis client. Use typed generics (get<User>) for type safety."
67
+ },
68
+ {
69
+ "title": "Rate limiting with sliding window",
70
+ "language": "typescript",
71
+ "code": "import { Ratelimit } from '@upstash/ratelimit';\nimport { Redis } from '@upstash/redis';\n\nconst ratelimit = new Ratelimit({\n redis: Redis.fromEnv(),\n limiter: Ratelimit.slidingWindow(10, '10 s'), // 10 requests per 10 seconds\n analytics: true,\n});\n\n// In your API route / middleware\nexport async function middleware(request: Request) {\n const ip = request.headers.get('x-forwarded-for') ?? 'anonymous';\n const { success, remaining, reset } = await ratelimit.limit(ip);\n \n if (!success) {\n return new Response('Too Many Requests', {\n status: 429,\n headers: { 'Retry-After': String(Math.round((reset - Date.now()) / 1000)) },\n });\n }\n \n return NextResponse.next();\n}",
72
+ "notes": "Install @upstash/ratelimit separately: npm install --save-exact @upstash/ratelimit. Redis.fromEnv() reads UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN automatically."
73
+ }
74
+ ],
75
+ "gotchas": [
76
+ "Upstash Redis uses a REST API (HTTP), not the native Redis TCP protocol. This means you cannot use the standard 'redis' or 'ioredis' npm packages — you must use @upstash/redis. Libraries that depend on a standard Redis connection (like Bull/BullMQ) won't work directly.",
77
+ "The free tier (10k commands/day) is exhausted quickly in development with hot reload. A Next.js app with frequent refreshes can easily burn through the daily quota during development. Consider using a separate dev database.",
78
+ "Upstash Redis is eventually consistent for replicated (global) databases. If you need strong consistency (e.g., distributed locks), use a single-region database.",
79
+ "Data is not persisted forever by default — Redis has eviction policies. Make sure your eviction policy (noeviction, allkeys-lru, etc.) matches your use case."
80
+ ],
81
+ "reliability": {
82
+ "uptimeGuarantee": "99.99% uptime SLA on paid plans",
83
+ "statusPageUrl": "https://status.upstash.com",
84
+ "notes": "Upstash uses AWS and GCP infrastructure. Global replication available for low-latency reads worldwide. REST API works in edge environments where TCP is not available."
85
+ },
86
+ "qualityScore": 8,
87
+ "qualityJustification": "The best serverless Redis solution — the HTTP REST API is a genuine differentiator for edge/serverless environments. @upstash/ratelimit is excellent. Pricing is very competitive with pay-per-use. The incompatibility with standard Redis clients is the main limitation.",
88
+ "alternatives": ["supabase", "neon"],
89
+ "complementary": ["supabase", "neon", "clerk"],
90
+ "bestFor": "Serverless Redis for caching, rate limiting, and session storage in Next.js, Vercel Edge Functions, and Cloudflare Workers",
91
+ "lastVerified": "2026-02-25",
92
+ "entryVersion": 1,
93
+ "addedBy": "claude-code-session-2"
94
+ }