Overview
OpenSight integrates with several third-party services to provide authentication, payments, notifications, and AI capabilities. All integrations are configured via environment variables.Authentication
OpenSight supports multiple authentication methods configured inapps/api/src/config/passport.ts.
GitHub OAuth
Allow users to sign in with their GitHub account. Configuration (.env.example:7-8):
- User clicks “Sign in with GitHub”
- Redirects to
GET /auth/github - GitHub callback to
GET /auth/github/callback - User created or linked in database
apps/api/src/config/passport.ts:130-152):
GitHub OAuth emails are automatically verified. Users authenticated via GitHub have
email_verified: true.Google OAuth
Allow users to sign in with their Google account. Configuration (.env.example:9-10):
- User clicks “Sign in with Google”
- Redirects to
GET /auth/google(scopes:profile,email) - Google callback to
GET /auth/google/callback - User created or linked in database
apps/api/src/config/passport.ts:152-170):
Google OAuth implementation uses the
google-auth-library package for token verification in the /auth/google/token endpoint.Local Authentication
Traditional email/password authentication using Passport Local Strategy. Configuration (.env.example:5-6):
packages/shared/src/types/user.ts):
Payment Processing
Stripe
Stripe handles all subscription billing and payment processing. Configuration (.env.example:12-17):
apps/api/src/config/stripe.ts):
apps/api/src/routes/webhook.routes.ts):
customer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failed
Stripe webhooks must be configured in your Stripe Dashboard to point to
https://your-domain.com/api/webhooks/stripestripe_customer_id: Stripe Customer IDstripe_subscription_id: Active subscription IDplan_id: Current plan (free, starter, growth)
Email Services
Resend
Resend powers all transactional emails. Configuration (.env.example:19-21):
apps/api/src/config/email.ts):
- Verification Email: Sent on user registration
- Password Reset: Sent when user requests password reset
- Alert Digest: Weekly/daily notification summaries
Email alerts are sent based on user plan and notification preferences. See Plans & Pricing for details.
Caching & Job Queue
Upstash Redis
Upstash provides HTTP-based Redis for caching and rate limiting. Configuration (.env.example:23-25):
apps/api/src/config/redis.ts):
This replaces BullMQ for simple, single-server deployments. Redis is used via HTTP REST API instead of TCP connections.
AI Engine APIs
OpenSight integrates with multiple AI engines for visibility tracking.OpenAI
Configuration (.env.example:27-28):
- ChatGPT visibility tracking
- Content analysis
- Prompt evaluation
Perplexity
Configuration (.env.example:29):
- Perplexity AI visibility tracking
- Answer analysis
Serper (Google Search)
Configuration (.env.example:30):
- Google AI Overviews tracking
- SERP analysis
- Competitor monitoring
ChatGPT
Available on all plans
Perplexity
Starter and Growth plans
Google AIO
Starter and Growth plans
File Uploads
UploadThing
Configuration (.env.example:32-34):
- Brand logo uploads
- User avatar uploads
- Report attachments
Error Tracking
Sentry (Optional)
Configuration (.env.example:36-38):
Sentry is optional but recommended for production deployments. It provides error tracking and performance monitoring.
Webhooks
Users on the Growth plan can configure custom webhooks for real-time notifications. Webhook Configuration (apps/api/src/services/notification.service.ts):
apps/api/src/jobs/alert-checker.ts):
- Visibility drops
- New competitor mentions
- Sentiment shifts
- New brand mentions
Feature Flags
Configuration (.env.example:40-42):
ENABLE_CONTENT_SCORING: Enable/disable content scoring APIENABLE_WEBHOOKS: Enable/disable webhook notifications
Environment Variables Summary
| Service | Required | Environment Variables |
|---|---|---|
| Database | ✅ Yes | DATABASE_URL |
| Auth | ✅ Yes | JWT_SECRET, JWT_REFRESH_SECRET |
| GitHub OAuth | ❌ Optional | GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET |
| Google OAuth | ❌ Optional | GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET |
| Stripe | ❌ Optional | STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_*_PRICE_ID |
| Resend | ❌ Optional | RESEND_API_KEY |
| Upstash Redis | ✅ Yes | UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN |
| OpenAI | ❌ Optional | OPENAI_API_KEY |
| Perplexity | ❌ Optional | PERPLEXITY_API_KEY |
| Serper | ❌ Optional | SERPER_API_KEY |
| UploadThing | ❌ Optional | UPLOADTHING_SECRET, UPLOADTHING_APP_ID |
| Sentry | ❌ Optional | SENTRY_DSN, NEXT_PUBLIC_SENTRY_DSN |
Related Resources
Plans & Pricing
View integration availability by subscription tier
Admin Panel
Manage platform integrations from admin dashboard