Knowledge > Products > SermonWise AI > Features
SermonWise AI Features
Complete feature catalog for SermonWise AI, covering the generation pipeline, supplemental materials, community sharing, templates, dashboard analytics, and all API routes.
1. Core Sermon Generation
The flagship feature. A multi-step wizard guides the user through inputs, then streams a fully structured sermon outline aligned to their theological tradition.
| Item | Value |
|---|---|
| UI Route | /sermons/app/new |
| Component | SermonWizard (src/components/sermons/SermonWizard.tsx) |
| API | POST /api/sermons/generate |
| Auth | Required (Supabase session) |
User Flow (SermonWizard Steps)
Step 1: Scripture Passage — free-text (e.g., "Romans 8:28-30"), validated against sai_scripture
Step 2: Theme (optional) — free-text, influences prompt framing
Step 3: Theological Tradition — 17 traditions via LensSelector component
Step 4: Sermon Method — 12 methods from sai_sermon_methods OR legacy style picker
Step 5: Target Audience — Mixed Congregation, Youth, Young Adults, Seniors, etc.
Step 6: Voice Style (opt) — tone, language, illustration frequency, application emphasis
Step 7: Generate — streams NDJSON progress events with stage labels
AI Generation Pipeline (Pseudocode)
function generateSermon(input):
// 1. Validate quota
usage = fetchUsage(user_id, current_month_year)
if usage.generation_count >= tierLimit: return QUOTA_EXCEEDED
// 2. Fetch inputs
scripture = query sai_scripture WHERE book/chapter/verse match (WEB translation)
ragContext = query unified_rag_content matching passage + lens, LIMIT 20
lens = query sai_theological_lenses WHERE id = input.lens_id
method = query sai_sermon_methods WHERE id = input.method_id
// 3. Assemble prompt (sermon-prompt.ts)
prompt = assemblePrompt(scripture, ragContext, lens.vocabulary,
lens.hermeneutics, method.structure, method.lens_adaptations[lens],
input.audience, input.voiceStyle)
// 4. Stream LLM response
model = tier == 'sermon_pro' ? 'higher-tier' : 'gpt-4o-mini'
stream = callLLM(model, prompt)
for chunk in stream: yield { event: 'progress', stage, content }
// 5. Persist
INSERT INTO sermons (...) VALUES (...)
UPSERT sermon_generation_usage SET generation_count += 1
return parseSermonOutline(stream.fullText)
Output Structure
interface SermonOutline {
title: string
sections: { id: string; title: string; content: string;
scriptures: string[]; illustration: string | null }[]
applications: string[]
prayerSuggestions: string[]
metadata: { theologicalLens: string; method: string; style: string;
audience: string; wordCount: number;
ragContentUsed: string[]; idealLengthMinutes: number }
}
Rate Limiting
| Constraint | Value |
|---|---|
| Per-user burst | 2 requests per 30 seconds |
| Monthly quota (Free) | 2 sermons |
| Monthly quota (Pro) | 15 sermons |
| Quota reset | 1st of each month (keyed by month_year column) |
2. Title Generator
Lightweight standalone tool for sermon title brainstorming. Top-of-funnel SEO feature.
| Item | Value |
|---|---|
| UI Route | /sermons/titles |
| API | POST /api/sermons/titles |
| Auth | Not required |
| Rate limit | 5 per 60s per IP |
| Output | 8-10 title suggestions (JSON array) |
| LLM | gpt-4o-mini, temperature 0.8 |
| Cost | Free, no quota consumption |
Saved Titles
Authenticated users can bookmark titles from the generator. Saved titles are stored in
saved_sermon_titles (one row per title, user_id-scoped) and visible in two places:
- Title Generator page (
/sermons/titles): A "Show/Hide Saved Titles" toggle reveals the user's bookmarks with Use This → and Remove actions. Component:TitleGeneratorTool. - Dashboard (
/sermons/app): TheSavedTitlesSectioncomponent fetches saved titles on mount and renders them after the All Sermons grid — visible only when the user has at least one saved title (silent empty state). Each card shows the title, angle, style pill, scripture, theme, and tradition; Use This → pre-fills the sermon wizard; Remove is optimistically instant with snap-back on failure. PostHog events:saved_title_usedandsaved_title_removed(both withsource: 'dashboard').
| Saved Titles API | Method | Purpose |
|---|---|---|
/api/sermons/titles/saved | GET | Fetch user's saved titles |
/api/sermons/titles/saved | POST | Save a new title |
/api/sermons/titles/saved?id= | DELETE | Remove a saved title |
3. Sermon Derivatives (Supplemental Materials)
After generating a sermon, users derive supplemental materials saved as
sermon_derivative records linked to the parent sermon.
| Item | Value |
|---|---|
| UI Route | /sermons/app/[id] (Materials tab) |
| Components | DerivativePanel, MaterialsTab |
| API | POST /api/sermons/derive |
| Tier gate | Pro only (sermon_pro) |
| Monthly cap | 60 per user per month (added 2026-05-11) |
Monthly Derivative Cap (2026-05-11)
Pro users are capped at 60 derivative generations per calendar month. This protects margins — at the cap, worst-case LLM spend ≈ $2.10/user vs the $19.95/mo plan price.
Rationale: 15 sermons × 3 derivative types = 45 + 33% retry headroom = 60.
Implementation:
sermon_generation_usagetable gains aderivative_count INTEGER NOT NULL DEFAULT 0column.- Two new Supabase RPCs:
increment_derivative_usage_capped(user_id, month_year, limit)anddecrement_derivative_usage(user_id, month_year). - Route reserves the slot atomically BEFORE the LLM call and refunds on any failure path (no LLM response, JSON parse failure, DB save failure, unhandled exception).
- Cap returns HTTP 429 with
{ error, limit, current }.DerivativePanelsurfaces a pastoral "monthly limit reached" banner (dismissible) rather than a raw error string. getSermonUsage()now returnsderivativeCount,derivativeLimit,derivativeRemainingfields for Pro users so the dashboard can surface remaining budget.
Migration: churchwiseai-web/migrations/2026-05-11-derivative-monthly-cap.sql
Derivative Types
| Type | Description | Length | max_tokens |
|---|---|---|---|
| Children's Sermon | Age-appropriate retelling (5-7 min) | ~500 words | 6144 |
| Small Group Discussion Guide | 8-10 questions with leader notes | ~800 words | 4096 |
| Social Media Snippets | Instagram (150-300 words) + Twitter (280 chars) + Bulletin (2-3 sentences) + JSON structure | ~400 words | 5120 |
| Slide Deck Outline | Slide titles, bullets, scripture refs | ~400 words | 4096 |
max_tokens rationale: social_media was originally 2048 (too small — caused JSON truncation and parse failures for Pro users in production). Bumped to 5120 on 2026-05-11. children needs 6144 because it generates a multi-field structured JSON (story + activity + prayer + object lesson). small_group at 4096 handles 6-8 discussion questions with leader notes comfortably. Route: src/app/api/sermons/derive/route.ts.
function generateDerivative(sermon_id, type):
// 1. Pro-tier gate — 403 if free user
// 2. Atomic cap check — 429 if derivative_count >= 60
sermon = query sermons WHERE id = sermon_id AND user_id = current_user
result = callLLM('claude-haiku', buildDerivativePrompt(sermon.content, type))
// On failure: refund derivative_count via decrement RPC
INSERT INTO sermons (status='derivative', parent_sermon_id, ...) VALUES (...)
return result
4. Community Sharing & Showcase
Community (User-Submitted)
| Item | Value |
|---|---|
| UI Route | /sermons/community |
| API | GET/POST /api/sermons/community |
| Auth | Browse: no, Submit: yes |
Features: search by keyword/scripture/theme, filter by tradition, sort by
newest/viewed/reviewed. Moderation queue at /sermons/app/moderate (founder-only).
Users can post star ratings and text reviews.
Sharing restrictions (2026-05-11): Derivative sermons (status='derivative') — children's
sermons, small group guides, social media posts — cannot be shared to the community. The API
returns 400 with a clear error. The "Share to Community" button is hidden in SermonWorkspace
when sermonStatus === 'derivative'. Attempting to share a derivative would fail at the DB
layer because shared_sermons.scripture_reference is NOT NULL and derivatives have
scripture_reference=null.
Showcase (Pre-Generated)
| Item | Value |
|---|---|
| UI Route | /sermons/showcase |
| Components | ShowcaseBrowser, ShowcaseCompare |
Pre-generated sets showing one passage across all 17 traditions side by side. Demonstrates the key differentiator without signup. PDF export available.
5. Sermon Templates
18 free, pre-generated templates for special occasions. No auth required. SEO content designed to attract organic traffic and convert to signups.
| Item | Value |
|---|---|
| UI Route | /sermons/templates |
| Component | TemplateClientView |
Categories
| Category | Templates |
|---|---|
| Life Events | Funeral, Wedding, Baptism, Baby Dedication |
| Church Calendar | Advent, Christmas, Epiphany, Lent, Easter, Pentecost |
| Cultural Holidays | Thanksgiving, New Year, Independence Day |
| Church Milestones | Ordination, Church Anniversary, Building Dedication |
Each includes: title, suggested scriptures, full outline, applications, prayer suggestions.
6. Dashboard & Analytics
Route: /sermons/app (authenticated). Component: SermonDashboard.
| Section | Content |
|---|---|
| Stats Row | Time saved (~5 min/sermon), total sermons, total materials, traditions explored (x/17), usage remaining |
| Bible Book Chart | Donut chart by Bible book (BibleBookChart component) |
| OT/NT Balance | Visual ratio of Old vs New Testament sermons |
| Traditions Progress | Progress bar: x of 17 traditions explored |
| Quick Actions | New Sermon, Title Ideas, Browse Community |
| Sermon Grid | Searchable, filterable, tagged by tradition/method |
| Saved Titles | SavedTitlesSection — visible after the sermon grid when user has ≥1 saved title; silent empty state; Use This → pre-fills wizard; optimistic Remove |
function getDashboardStats(user_id):
sermons = query sermons WHERE user_id AND status != 'deleted'
materials = query sermon_derivative WHERE parent_sermon_id IN (ids)
usage = query sermon_generation_usage WHERE user_id AND month_year = current
return { totalSermons, totalMaterials, timeSaved: count * 5,
traditionsExplored: DISTINCT(lens_id).count, usageRemaining,
bibleBooks: GROUP BY book, otNtRatio }
7. Compare Page (Marketing)
Route: /sermons/compare. Conversion page showing generic AI vs SermonWise output.
| Passage | Tradition | What It Shows |
|---|---|---|
| Romans 8:28 | Reformed | Sovereignty emphasis, TULIP alignment |
| Matthew 28:19 | Baptist (SBC) | Believer's baptism, Great Commission focus |
| Acts 2:1-4 | Pentecostal | Holy Spirit empowerment, gifts activation |
| John 6:53 | Roman Catholic | Eucharistic theology, Real Presence |
Each shows a "Generic AI" column (bland, vague) next to "SermonWise" (tradition-specific vocabulary, proper hermeneutics).
8. Sermon Methods
12 structured methods in sai_sermon_methods with section templates and per-lens adaptation.
| # | Method | Description |
|---|---|---|
| 1 | Textual Exposition | Verse-by-verse through the passage |
| 2 | Topical Development | Theme-driven with supporting texts |
| 3 | Narrative Arc | Story structure (tension, climax, resolution) |
| 4 | Doctrinal Teaching | Systematic unpacking of a doctrine |
| 5 | Application-Driven | Starts with life situation, works back to text |
| 6 | Dialogical | Question-and-answer format |
| 7 | Inductive Discovery | Observation, interpretation, application |
| 8 | Redemptive-Historical | Places passage in salvation history arc |
| 9 | Liturgical Reflection | Tied to lectionary / church calendar |
| 10 | Pastoral Care | Addresses suffering, doubt, pastoral needs |
| 11 | Evangelistic Appeal | Outreach-focused, clear gospel presentation |
| 12 | Prophetic Challenge | Social justice, kingdom ethics, prophetic voice |
Each method adapts per tradition (e.g., "Textual Exposition" for Reformed emphasizes covenant theology and word studies; for Pentecostal, Spirit illumination and experience).
Library: churchwiseai-web/src/lib/sermon-methods.ts
9. Database Schema
sermons
| Column | Type | Notes |
|---|---|---|
id | UUID PK | |
user_id | UUID FK profiles | Owner |
title | TEXT | Generated title |
scripture_reference | TEXT | e.g., "Romans 8:28-30" |
theme | TEXT | Optional |
theological_lens_id | UUID FK sai_theological_lenses | |
sermon_style | TEXT | Legacy: expository/topical/narrative/devotional |
method_id | UUID FK sai_sermon_methods | Structured method |
target_audience | TEXT | |
content | JSONB | Full SermonOutline object |
status | TEXT | draft/published/shared/deleted/derivative |
is_shared, author_name, view_count | — | Community sharing fields |
created_at, updated_at | TIMESTAMPTZ |
sermon_generation_usage
Composite PK: (user_id, month_year). Tracks generation_count, last_generation_at,
and (as of 2026-05-11) derivative_count INTEGER NOT NULL DEFAULT 0 for the monthly
derivative cap. Two Postgres RPCs manage the derivative counter atomically:
increment_derivative_usage_capped and decrement_derivative_usage.
sermon_derivative
| Column | Type | Notes |
|---|---|---|
id | UUID PK | |
parent_sermon_id | UUID FK sermons | |
type | TEXT | children_sermon/discussion_guide/social_media/slide_deck |
content | JSONB | |
created_at | TIMESTAMPTZ |
profiles (relevant columns)
subscription_tier (free/sermon_pro), free_tier_sermon_limit (default 2).
10. API Route Catalog
All under churchwiseai-web/src/app/api/sermons/.
| Route | Method | Auth | Purpose |
|---|---|---|---|
generate | POST | Yes | Generate sermon (streams NDJSON) |
titles | POST | No | Title suggestions |
list | GET | Yes | User's sermons |
usage | GET | Yes | Monthly quota |
stats | GET | Yes | Dashboard statistics |
[id] | GET/DELETE | Yes | Sermon CRUD |
[id]/derivatives | GET/POST | Yes | Materials |
checkout | POST | Yes | Stripe checkout session |
community | GET/POST | Mixed | Browse/submit shared sermons |
community/[id] | GET | No | View shared sermon |
community/[id]/reviews | POST | Yes | Submit review |
community/moderate | POST | Founder | Approve/reject submissions |
lectionary | GET | No | Lectionary readings |
methods | GET | No | Sermon methods list |
portal | GET | Yes | Multi-endpoint batch fetch |
derive | POST | Yes | Derive supplemental materials |
11. Key Library Files
All in churchwiseai-web/src/lib/.
| File | Purpose |
|---|---|
sermon-pricing.ts | Tier definitions, Stripe price IDs, trial config |
sermon-brand.ts | Brand config (domain, colors, tagline, nav) |
sermon-usage.ts | Quota enforcement, usage tracking |
sermon-prompt.ts | Prompt assembly, RAG fetch, scripture, vocabulary |
sermon-methods.ts | 12 methods, section templates, per-lens adaptation |
sermon-voice-style.ts | Voice style customization (tone, language, illustrations) |
sermon-export.ts | Export to Word (.docx) and Markdown |
sermon-lectionary.ts | Lectionary calendar data, date-to-reading mapping |
12. Component Inventory
All in churchwiseai-web/src/components/sermons/.
| Component | Purpose |
|---|---|
SermonWizard | Multi-step generation form |
SermonResult | Displays generated outline |
SermonWorkspace | Full-page sermon editor (view/edit/materials) |
SermonNav | Top navigation bar |
SermonFooter | Footer with legal links and branding |
SermonHero | Marketing hero section |
SermonUpgradeButton | Free-to-Pro upgrade CTA |
LensSelector | 17-tradition picker |
BibleBookChart | Donut chart by Bible book |
VocabularyHighlighter | Highlights tradition-specific terms |
DerivativePanel | Generate supplemental materials |
MaterialsTab | Lists derivatives for a sermon |
ShowcaseBrowser | Browse showcase entries |
ShowcaseCompare | Side-by-side tradition comparison |
TemplateClientView | Renders free templates |
CrossPromoBanner | Promotes ChurchWiseAI voice/chatbot |
OnboardingGate | New user onboarding flow |
InlineTitleGenerator | Embedded title widget |
SermonBreadcrumb | Breadcrumb navigation |
SavedTitlesSection | Dashboard section — saved title cards, Use This → wizard link, optimistic remove |
13. SEO & Caching Headers
| Route Pattern | Robots | Cache |
|---|---|---|
/sermons (homepage) | index, follow | ISR |
/sermons/pricing | index, follow | Cached |
/sermons/templates | index, follow | Cached |
/sermons/community | index, follow | Revalidate |
/sermons/showcase | index, follow | Cached |
/sermons/compare | index, follow | Cached |
/sermons/privacy, /terms | index, follow | Cached |
/sermons/login, /signup | noindex | No cache |
/sermons/app/* | noindex | No cache, private |
14. Cross-Promotion
SermonWise surfaces ChurchWiseAI products via CrossPromoBanner:
- Appears on dashboard and post-generation
- Promotes Voice Agent and Chatbot to engaged pastors
- Links to churchwiseai.com pricing, dismissible per-session
Reverse: ITW illustration pages link to SermonWise for full generation. ChurchWiseAI blog posts about sermon prep link to sermonwise.ai.
See Also
- SermonWise AI Overview -- product identity, pricing, architecture
- IllustrateTheWord Premium -- content source for RAG pipeline
- Chatbot Tools -- tool architecture pattern (similar to derivatives)
- API Catalog -- full API inventory across all products
- Strategy -- how SermonWise fits go-to-market