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
| Field | Value |
|---|---|
| Brand | SermonWise AI |
| Domain | sermonwise.ai |
| Tagline | AI Sermon Outlines Aligned to Your Tradition |
| Codebase | churchwiseai-web (shared Next.js 16 app) |
| Deploy branch | main (Vercel) |
| Status | Live, fully functional, 0 paying SermonWise customers |
| Target audience | Pastors, 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
| # | Tradition | Source Table |
|---|---|---|
| 1 | Reformed / Calvinist | sai_theological_lenses |
| 2 | Baptist (SBC / General) | sai_theological_lenses |
| 3 | Methodist / Wesleyan | sai_theological_lenses |
| 4 | Lutheran | sai_theological_lenses |
| 5 | Anglican / Episcopal | sai_theological_lenses |
| 6 | Pentecostal / Charismatic | sai_theological_lenses |
| 7 | Roman Catholic | sai_theological_lenses |
| 8 | Eastern Orthodox | sai_theological_lenses |
| 9 | Non-Denominational Evangelical | sai_theological_lenses |
| 10 | Presbyterian (PCA / PCUSA) | sai_theological_lenses |
| 11 | Church of Christ / Restoration | sai_theological_lenses |
| 12 | Assemblies of God | sai_theological_lenses |
| 13 | Seventh-Day Adventist | sai_theological_lenses |
| 14 | African Methodist Episcopal | sai_theological_lenses |
| 15 | Mennonite / Anabaptist | sai_theological_lenses |
| 16 | Christian & Missionary Alliance | sai_theological_lenses |
| 17 | Universalist (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.
| Tier | Monthly | Annual | Savings | Sermon Limit | LLM |
|---|---|---|---|---|---|
| Free | $0 | -- | -- | 2/month | gpt-4o-mini |
| Pro | $19.95 | $199.50/yr | ~17% | 15/month | Higher-tier model |
Stripe Price IDs (Live Mode)
| Billing | Price ID | Notes |
|---|---|---|
| Monthly | price_1T99RtFaoK5IPzNoDWkdDMnA | |
| Annual (USD) | price_1TM4lUFaoK5IPzNoCXxFPUnr | Canonical — on prod_U7OEapCdCn42eJ |
| Annual (CAD) | price_1TWJiKFaoK5IPzNowVp6FyJF | $249/yr |
Archived:
price_1T99SiFaoK5IPzNoWXDIJVsEwas 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_yearinsermon_generation_usage)
Authentication
| Method | Details |
|---|---|
| Provider | Supabase Auth |
| Email/password | Standard signup with email confirmation |
| Google OAuth | One-click sign-in |
| Session | Supabase session cookie, validated by middleware |
| Route protection | Middleware redirects unauthenticated users from /sermons/app/* to /sermons/login |
| Subscription tier | Stored 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 tracking | profiles.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)
- 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. POST /api/sermons/checkoutcreates Stripe Checkout session withallow_promotion_codes: true(loyalty customers get an auto-applied family discount instead — both can't be set per Stripe rules).- User completes checkout → Stripe redirects to
/sermons/app?upgraded=1. - Webhook fast-path:
/api/stripe/webhookenqueues tostripe_webhook_inbox+ immediately schedulesprocessStripeEvent()via Promise microtask (Vercel Node.js keeps container alive until it settles). Drops typical processing lag from 30+ sec (cron-only) to ~1 sec. - Webhook fallback:
/api/cron/process-stripe-webhooks(every 60 sec) re-claims any inbox row not yetsucceeded. Both paths idempotent viastripe_event_idunique constraint onstripe_webhook_inbox. - Webhook side effects (in
src/app/api/stripe/webhook/route.ts, sermon_pro branch):- Upserts
user_subscriptions+ setsprofiles.subscription_tier='sermon_pro' - Resets
sermon_generation_usage.generation_count = 0for current month ifwasFreeTier(PR #382 — free-tier sermons should NOT count against new Pro allowance per founder policy) - Fires
sendSermonProWelcomeEmail()to customer (idempotent viauser_metadata.pro_welcome_email_sent_at) - Fires
sendNewSermonProSaleNotification()to FOUNDER_EMAIL (subject distinguishes coupon vs paid) - Captures PostHog
upgrade_completedevent — guarded byposthog_event_deduptable (atomic INSERT-then-fire) to prevent double-counting from inline + cron paths both running
- Upserts
- Realtime UI flip:
useProfileTierRealtimehook on dashboard + header subscribes topostgres_changesUPDATE onprofilesrow (filterid=eq.<userId>). When tier flips to'sermon_pro', both components refetch usage and re-render to show "15 of 15 left" within ~1 sec. - B2C reconciliation cron exclusion:
/api/cron/stripe-supabase-reconciliationskips B2C products (sermon_pro,social,ai_starter_kit, ShareWise variants) — they don't usepremium_churchesby 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.
| # | Event | Where it fires | Side |
|---|---|---|---|
| 1 | signup_form_submitted | SignupForm.tsx on form submit | Client |
| 2 | signup_email_confirmed | auth/callback/route.ts after successful PKCE exchange — server-side as of 2026-05-11 (client-side useEffect dropped event due to URL replacement) | Server |
| 3 | first_app_visit | /sermons/app page on first ever visit per user — server-side gated via POST /api/sermons/log-first-visit | Client (gated) |
| 4 | first_sermon_generated | /api/sermons/generate after successful generation | Server |
| 5 | upgrade_clicked | All 4 upgrade entry points (SermonUpgradeButton, SermonUpgradeNudge, SermonWizard limit-gate, DerivativePanel paywall) | Client |
| 6 | upgrade_completed | /api/stripe/webhook after sermon_pro activation completes — deduped via posthog_event_dedup | Server |
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
| Metric | Value |
|---|---|
| Paying customers | 0 |
| Registered users | Founder test accounts only |
| Sermons generated | Test data only |
| Stripe products | Created in both test and live modes |
| Build status | Passing (Vercel, main branch) |
| Known issues | None blocking launch |
Database Tables
| Table | Role |
|---|---|
sermons | All generated sermons (JSONB content, metadata, sharing status) |
sermon_generation_usage | Monthly quota tracking (user_id + month_year composite PK) |
profiles | User tier (free / sermon_pro), free tier limit |
sai_theological_lenses | 17 traditions + 1 universal lens (18 rows) |
sai_sermon_methods | 12 sermon methods with per-lens adaptation |
unified_rag_content | 290K+ RAG resources for context injection |
See Also
- SermonWise AI Features -- full feature breakdown, API catalog, components
- SermonWise PostHog Funnel -- event architecture, identity stitching, server-side capture pattern
- IllustrateTheWord Premium -- content source for RAG pipeline
- Chatbot Overview -- sibling AI product in churchwiseai-web
- Pricing (canonical) -- all Stripe IDs and billing rules
- Vision -- how SermonWise fits the company mission