Skip to main content

Knowledge > Products > SermonWise AI

SermonWise AI Overview

AI Sermon Outlines Aligned to Your Tradition Spend less time on the outline, more time in the Word.

SermonWise AI is an AI-powered sermon preparation SaaS that generates doctrinally faithful sermon outlines tailored to 17 theological traditions. Unlike generic AI tools, SermonWise ensures output matches the pastor's church doctrine, drawing from 327K+ curated theological resources via RAG.


Product Identity

FieldValue
BrandSermonWise AI
Domainsermonwise.ai
TaglineAI Sermon Outlines Aligned to Your Tradition
Codebasechurchwiseai-web (shared Next.js 16 app)
Deploy branchmain (Vercel)
StatusLive, fully functional, 0 paying SermonWise customers
Target audiencePastors, associate pastors, lay preachers, seminary students

Architecture: Hostname Rewrite

SermonWise AI does not have its own codebase. It lives inside churchwiseai-web and is served via a Next.js middleware hostname rewrite. The middleware intercepts all requests to sermonwise.ai and maps them into the /sermons route tree.

Middleware location: churchwiseai-web/src/middleware.ts (lines 64-80)

Rewrite Rules

sermonwise.ai/ --> /sermons
sermonwise.ai/pricing --> /sermons/pricing
sermonwise.ai/app --> /sermons/app
sermonwise.ai/app/* --> /sermons/app/*
sermonwise.ai/login --> /sermons/login
sermonwise.ai/signup --> /sermons/signup
sermonwise.ai/_next/* --> pass through (static assets)
sermonwise.ai/api/* --> pass through (API routes)

PKCE Auth Flow

User visits sermonwise.ai/login
--> Supabase Auth (email/password or Google OAuth)
--> PKCE callback
--> Redirect to /sermons/app after successful login

Middleware protects all /sermons/app/* routes, redirecting unauthenticated users to /sermons/login.


Key Differentiator: Theological Traditions

The core differentiator is doctrinal alignment. Generic AI (ChatGPT, Gemini) produces theologically flat output that may contradict a church's beliefs. SermonWise enforces tradition-specific vocabulary, hermeneutics, and application styles.

17 Supported Traditions

#TraditionSource Table
1Reformed / Calvinistsai_theological_lenses
2Baptist (SBC / General)sai_theological_lenses
3Methodist / Wesleyansai_theological_lenses
4Lutheransai_theological_lenses
5Anglican / Episcopalsai_theological_lenses
6Pentecostal / Charismaticsai_theological_lenses
7Roman Catholicsai_theological_lenses
8Eastern Orthodoxsai_theological_lenses
9Non-Denominational Evangelicalsai_theological_lenses
10Presbyterian (PCA / PCUSA)sai_theological_lenses
11Church of Christ / Restorationsai_theological_lenses
12Assemblies of Godsai_theological_lenses
13Seventh-Day Adventistsai_theological_lenses
14African Methodist Episcopalsai_theological_lenses
15Mennonite / Anabaptistsai_theological_lenses
16Christian & Missionary Alliancesai_theological_lenses
17Universalist (broad evangelical)sai_theological_lenses

Each tradition row in sai_theological_lenses contains vocabulary mappings, hermeneutic principles, and application style guidance that are injected into the generation prompt.


RAG Content Pipeline

Sermon generation draws from unified_rag_content (290,000+ records). Content types relevant to SermonWise include:

  • Sermon illustrations (from IllustrateTheWord corpus)
  • Commentary excerpts (tagged by book/chapter)
  • Theological vocabulary (per-tradition terminology)
  • Application patterns (per-audience, per-tradition)

The RAG fetch in sermon-prompt.ts selects content matching the requested scripture passage, theological tradition, and sermon method, then injects it as context for the LLM.


Pricing

Defined in churchwiseai-web/src/lib/sermon-pricing.ts.

TierMonthlyAnnualSavingsSermon LimitLLM
Free$0----2/monthgpt-4o-mini
Pro$19.95$199.50/yr~17%15/monthHigher-tier model

Stripe Price IDs (Live Mode)

BillingPrice IDNotes
Monthlyprice_1T99RtFaoK5IPzNoDWkdDMnA
Annual (USD)price_1TM4lUFaoK5IPzNoCXxFPUnrCanonical — on prod_U7OEapCdCn42eJ
Annual (CAD)price_1TWJiKFaoK5IPzNowVp6FyJF$249/yr

Archived: price_1T99SiFaoK5IPzNoWXDIJVsE was the annual price on the old split product (prod_U7OF3hRQYrSpar, archived 2026-05-12 per FA-002 closeout). Do not use in new code — both archived product and price have been superseded by the canonical product above.

Billing Rules

  • Free tier: 2 sermons/month, no credit card required
  • Pro: 14-day free trial, monthly or annual billing
  • Annual = pay for 10 months, get 12 (~17% savings)
  • Usage resets on the 1st of each month (keyed by month_year in sermon_generation_usage)

Authentication

MethodDetails
ProviderSupabase Auth
Email/passwordStandard signup with email confirmation
Google OAuthOne-click sign-in
SessionSupabase session cookie, validated by middleware
Route protectionMiddleware redirects unauthenticated users from /sermons/app/* to /sermons/login
Subscription tierStored in profiles.subscription_tier (free or sermon_pro). Realtime UPDATE subscription enabled — dashboard + header listen for live tier flips via useProfileTierRealtime hook (src/hooks/useProfileTierRealtime.ts).
First-app-visit trackingprofiles.first_app_visit_at (timestamptz, NULL until user's first /sermons/app load). Set via POST /api/sermons/log-first-visit (atomic UPDATE-WHERE-NULL). Gates the PostHog first_app_visit funnel event. Replaces broken localStorage gate.

Upgrade Flow (Free → Pro)

  1. User clicks "Upgrade to Pro" anywhere — DerivativePanel paywall, SermonUpgradeButton (header/dashboard/wizard), SermonUpgradeNudge (post-generation when remaining=0). All four paths fire PostHog upgrade_clicked.
  2. POST /api/sermons/checkout creates Stripe Checkout session with allow_promotion_codes: true (loyalty customers get an auto-applied family discount instead — both can't be set per Stripe rules).
  3. User completes checkout → Stripe redirects to /sermons/app?upgraded=1.
  4. Webhook fast-path: /api/stripe/webhook enqueues to stripe_webhook_inbox + immediately schedules processStripeEvent() via Promise microtask (Vercel Node.js keeps container alive until it settles). Drops typical processing lag from 30+ sec (cron-only) to ~1 sec.
  5. Webhook fallback: /api/cron/process-stripe-webhooks (every 60 sec) re-claims any inbox row not yet succeeded. Both paths idempotent via stripe_event_id unique constraint on stripe_webhook_inbox.
  6. Webhook side effects (in src/app/api/stripe/webhook/route.ts, sermon_pro branch):
    • Upserts user_subscriptions + sets profiles.subscription_tier='sermon_pro'
    • Resets sermon_generation_usage.generation_count = 0 for current month if wasFreeTier (PR #382 — free-tier sermons should NOT count against new Pro allowance per founder policy)
    • Fires sendSermonProWelcomeEmail() to customer (idempotent via user_metadata.pro_welcome_email_sent_at)
    • Fires sendNewSermonProSaleNotification() to FOUNDER_EMAIL (subject distinguishes coupon vs paid)
    • Captures PostHog upgrade_completed event — guarded by posthog_event_dedup table (atomic INSERT-then-fire) to prevent double-counting from inline + cron paths both running
  7. Realtime UI flip: useProfileTierRealtime hook on dashboard + header subscribes to postgres_changes UPDATE on profiles row (filter id=eq.<userId>). When tier flips to 'sermon_pro', both components refetch usage and re-render to show "15 of 15 left" within ~1 sec.
  8. B2C reconciliation cron exclusion: /api/cron/stripe-supabase-reconciliation skips B2C products (sermon_pro, social, ai_starter_kit, ShareWise variants) — they don't use premium_churches by design. Without this filter the cron fires false-positive P0 orphan alerts for every legit SermonWise customer.

PostHog Funnel Events

The 6 funnel events tracked end-to-end. Full architecture: knowledge/products/sermonwise/posthog-funnel.md. Canonical test: e2e/contracts/sermonwise-posthog-funnel.contract.spec.ts.

#EventWhere it firesSide
1signup_form_submittedSignupForm.tsx on form submitClient
2signup_email_confirmedauth/callback/route.ts after successful PKCE exchange — server-side as of 2026-05-11 (client-side useEffect dropped event due to URL replacement)Server
3first_app_visit/sermons/app page on first ever visit per user — server-side gated via POST /api/sermons/log-first-visitClient (gated)
4first_sermon_generated/api/sermons/generate after successful generationServer
5upgrade_clickedAll 4 upgrade entry points (SermonUpgradeButton, SermonUpgradeNudge, SermonWizard limit-gate, DerivativePanel paywall)Client
6upgrade_completed/api/stripe/webhook after sermon_pro activation completes — deduped via posthog_event_dedupServer

Sitemap

Marketing (public, indexed): /sermons (homepage), /sermons/pricing, /sermons/templates, /sermons/community, /sermons/showcase, /sermons/compare, /sermons/privacy, /sermons/terms

Auth-aware chrome (as of 2026-05-11): /sermons/titles, /sermons/templates, /sermons/community (and /sermons/community/[id] via the community layout) perform a server-side Supabase auth check on every render. Anonymous visitors receive the standard <SermonNav /> + marketing hero + sign-up CTA + <SermonFooter />. Signed-in users receive <CrossPromoBanner /> + <SermonAppHeader /> with no marketing hero, no sign-up CTA, and no footer — matching the /sermons/app/* app chrome. The tool content (TitleGeneratorTool, template grid, community feed) is rendered for both states. Shared auth helper: churchwiseai-web/src/lib/sermon-page-auth.ts.

Auth (noindex): /sermons/login, /sermons/signup, /sermons/forgot-password, /sermons/update-password

App (noindex, no-cache, authenticated): /sermons/app (dashboard), /sermons/app/new (wizard), /sermons/app/[id] (view/edit), /sermons/app/moderate (founder queue), /sermons/app/onboarding


Brand Configuration

Defined in churchwiseai-web/src/lib/sermon-brand.ts:

domain: sermonwise.ai
name: SermonWise AI
tagline: AI Sermon Outlines Aligned to Your Tradition
colors: primary (#4F46E5 indigo), accent, background
nav: Features, Pricing, Templates, Community
footer: Links to privacy, terms, ChurchWiseAI parent brand

Current State

MetricValue
Paying customers0
Registered usersFounder test accounts only
Sermons generatedTest data only
Stripe productsCreated in both test and live modes
Build statusPassing (Vercel, main branch)
Known issuesNone blocking launch

Database Tables

TableRole
sermonsAll generated sermons (JSONB content, metadata, sharing status)
sermon_generation_usageMonthly quota tracking (user_id + month_year composite PK)
profilesUser tier (free / sermon_pro), free tier limit
sai_theological_lenses17 traditions + 1 universal lens (18 rows)
sai_sermon_methods12 sermon methods with per-lens adaptation
unified_rag_content290K+ RAG resources for context injection

See Also