External Connections Audit
Complete inventory of all external services, APIs, and data flows in Snappy Idioms
- •User auth tokens→ Frontend pages
- •Entity data requests→ base44.entities.* calls
- •Backend function calls→ Deno deploy handlers
- •User sessions→ Browser cookies
- •Entity records (JSON)→ Frontend state
- •Function responses→ Frontend handlers
- base44.auth.me()
- base44.entities.*.list()
- base44.entities.*.filter()
- base44.entities.*.create()
- +4 more...
Notes: Core platform - all entity operations go through here. Known stability issues with complex filtering.
- •File uploads (images, audio, video)→ Storage buckets
- •Public file URLs→ Idiom image_url, video_url, audio_url fields
- •Signed URLs for private files→ Premium content delivery
- Storage bucket uploads
- Public URL generation
- Signed URL generation for private files
Notes: Currently used primarily for file storage. Planned as migration target for entities.
- •Text for speech synthesis→ speakText.js function
- •Text for translation→ translateWithGoogle.js function
- •Image prompts→ generateIdiomImageV2.js function
- •Images for moderation→ moderateImageWithVision.js function
- •MP3 audio (base64)→ Browser audio playback
- •Translated text→ Dictionasaurus, Quiz pages
- •Generated PNG images→ Idiom illustrations
- •Content safety scores→ Image moderation results
- texttospeech.googleapis.com/v1/text:synthesize
- translation.googleapis.com/language/translate/v2
- us-central1-aiplatform.googleapis.com (Vertex AI Imagen)
- vision.googleapis.com (Safe Search)
- +1 more...
Notes: Service account auth via JWT. Credentials JSON contains private key. Cost per API call.
Est. Cost: TTS: ~$4/1M chars | Translation: ~$20/1M chars | Imagen: ~$0.02/image
- •Notification title/body→ sendFirebaseNotification.js
- •User FCM tokens→ User entity fcm_token field
- •Click URL targets→ Notification deep links
- •Push notifications→ User browsers/devices
- •Message IDs→ NotificationLog entity
- •Delivery status→ NotificationLog entity
- fcm.googleapis.com/v1/projects/{id}/messages:send
- oauth2.googleapis.com/token (service account auth)
Notes: Service account auth. FCM tokens stored per-user. Requires HTTPS and browser permission.
- •Checkout session requests→ createPremiumCheckout.js
- •Webhook events→ stripeWebhook.js
- •Customer metadata→ User email, pack details
- •Checkout URLs→ Redirect to Stripe hosted page
- •Payment confirmations→ User entity updates (is_premium, pearls_of_wisdom)
- •Subscription status→ User entity stripe_subscription_id
- api.stripe.com/v1/checkout/sessions
- api.stripe.com/v1/prices
- api.stripe.com/v1/customers
- Webhook: checkout.session.completed
Notes: Webhook signature validation critical for security. Test vs Live mode keys.
Est. Cost: Stripe fee: 2.9% + 30¢ per transaction
- •Chat prompts→ chatWithGPT35.js, chatWithGemini.js
- •System instructions→ AI tutor personas
- •User messages→ ConversationPractice page
- •AI responses→ Chat UI, feedback, analysis
- •Structured JSON→ Quiz analysis, content moderation
- •Token usage→ AIMessageLog entity (rate limiting)
- api.openai.com/v1/chat/completions (GPT-3.5, GPT-4)
- Base44 built-in: InvokeLLM integration
Notes: Rate limiting implemented. Token costs tracked. Free tier users limited to 10 msgs/hour.
Est. Cost: GPT-3.5: ~$0.002/1K tokens | GPT-4: ~$0.03/1K tokens
- •Push subscription requests→ Browser PushManager
- •Push subscription objects→ User entity fcm_token
- •VAPID public key→ Frontend for subscription
- Browser Push API
- Service Worker registration
Notes: Public key exposed to frontend. Private key used server-side only.
- •Error events→ Frontend catch blocks
- •Performance traces→ Page load timing
- •Error reports→ Sentry dashboard
- •Alert notifications→ Email/Slack (if configured)
- sentry.io/api/{project}/envelope/
Notes: DSN contains project identifier. No sensitive data should be logged.
Google Sheets (OAuth)
No OAuth app connector authorized. Would enable spreadsheet access.
Recommendation: Connect for bulk import/export of idioms, gradebooks, analytics.
Vercel
Previously used for standalone crossword. Currently inactive.
Recommendation: Re-enable if standalone crossword app deployment is needed.
✅ Good Practices
- • All secrets stored in Base44 environment variables
- • Stripe webhook signature validation
- • JWT-based service account auth for Google
- • User auth required for most API calls
- • Rate limiting on AI endpoints
⚠️ Considerations
- • Google Cloud credentials contain private key
- • Stripe keys = full payment access
- • No OAuth app connectors (manual API keys)
- • Firebase service account has admin access
- • OpenAI API key = pay-per-use billing