Integrations
Sits beside your stack. Every module named, no module hidden.
ReplyIQ is composed from a small set of capability modules — payment, communications, data, auth, and AI. Each one owns an explicit slice of the surface and exposes a single seam, so the platform never grows an unseen dependency: no vendor SDK is added to the repo, no provider key ever lands in the source, and every named module is replaceable.
Capability modules
What each module owns — and how it connects
Stripe billing
Stripe billing
- Owns. Hosted checkout via createCheckoutSession from @/lib/stripe-billing/client — fixed one-time amounts, server-computed cart pricing, and recurring subscriptions with interval 'month' or 'year'; tier-aware fulfillment helpers at src/lib/stripe-billing/fulfillment.ts define what happens after each payment lands.
- Seam. Checkout and the fulfillment round-trip both run through the Polsia HTTP API, so the app never imports the Stripe SDK and never carries STRIPE_SECRET_KEY.
Polsia email proxy
Polsia email proxy
- Owns. sendEmail from @/lib/email/send dispatches to POLSIA_EMAIL_PROXY_URL; reply templates in @/lib/email/templates compose welcomeEmail, notificationEmail, escalationNoticeEmail, leadCapturedEmail, capWarningEmail, and subscriptionTierWelcomeEmail, and replyToEmailId threads a follow-up against an inbound id.
- Seam. One transport and one to/subject/html/text envelope — templates live in the repo so copy stays owned by the brand, not the proxy.
Prisma persistence
Prisma persistence
- Owns. Multi-file schema under prisma/schema/ — _base.prisma composes auth.prisma, billing.prisma, and feature-specific files; app code queries through @/lib/db so every model rides one client.
- Seam. feature/*.prisma files co-locate schema with behavior, and one prisma migrate deploy applies them — feature work ships with its own data shape, no out-of-band migration script.
better-auth admin auth
better-auth admin auth
- Owns. auth() from @/lib/auth exposes the session; requireAuth() and requireAdmin() gate per-user and admin routes; the POLSIA_OWNER_EMAIL user is granted role: 'admin' on create.
- Seam. Auth composes against the same Prisma client the rest of the app uses, so user and policy rows share one DB and one migration history.
Built-in AI primitives
Built-in AI primitives
- Owns. chat, generateObject, and analyzeImage from @/lib/ai/client route every call through POLSIA_AI_BASE_URL — the same primitives ReplyIQ uses to score sentiment, draft policy-bound replies, and read a screenshot.
- Seam. Customer code passes messages and gets structured shapes back; the proxy carries the API key, so no OpenAI or Anthropic SDK and no vendor secret ever sail into the repo.
Ready when you are
Wire a channel. Start onboarding.
Onboarding is self-serve — pick a channel, import merchant policies, and review a sandbox of AI replies before going live.
Start onboarding