Skip to main content

M10: Monetization

Phase: P3: Launch Target: Weeks 29–34 Sprints: S14 (Weeks 29–30, shared with M09), S15 (Weeks 31–32), S16 (Weeks 33–34) Release: billing/v0.1.0-alpha


Phase Context

Goal: Subscription billing, Come Follow Me integration, polish, and founding-user onboarding. Ship the product.

Key constraint: Billing/entitlement must be rock-solid. A user who pays must immediately get access. A failed payment must immediately revoke.


ZenHub Configuration

FieldValue
MilestoneM10: Monetization
Due Date2026-11-01
Default PipelineProduct Backlog
Primary Epic(s)Billing & Subscriptions, Come Follow Me, Social Sharing

Prerequisites

PrerequisiteSourceWhy Needed
M04: Auth integrationP1User identity (Clerk + JWT) required for subscriptions — must know who is paying
M02: GatewayP0Entitlement middleware extends the gateway's middleware stack
M00: PostgreSQL schemasP0gl_subscriptions, gl_stripe_events tables created in M00; billing service adds the API layer
M05: Staging environmentP1Stripe sandbox testing requires staging deployment

Epic: Billing & Subscriptions

7 story areas. Stripe subscription flow with Scholar entitlement gating.

Story AreaScopeSpec Reference
Billing serviceStripe webhook handler, subscription CRUD, entitlement checksTECH-SPEC.md § Billing Service
PostgreSQL tablesSubscriptions, entitlements, idempotency keysTECH-SPEC.md § PostgreSQL Schema
Stripe checkoutWeb checkout flow → Stripe Checkout → webhook confirmTECH-SPEC.md § Billing
Entitlement middlewareGateway checks plan tier before routing to Scholar endpointsTECH-SPEC.md § Gateway Middleware
Subscription UIPlan comparison, checkout trigger, billing portal linkDESIGN-SYSTEM.md § Subscription Boundaries
Diamond indicatorsPremium feature markers (◇) in UI, warm unlock momentsDESIGN-SYSTEM.md § Subscription Boundaries
Free trial14-day Scholar trial on signupMVP.md § Freemium

Issues — Billing & Subscriptions

IssueTitleStatusNotes
M10-001Billing Service — Stripe Webhook Handler & Subscription CRUD🔶 Partialplans.yaml exists but webhook.go, subscription service missing
M10-002PostgreSQL Tables — Subscription & Entitlement API Layer🔶 Partial2 migration files exist but repository methods missing
M10-003Stripe Checkout — Web Checkout Flow✅ DoneImplemented in PR #961
M10-004Entitlement Middleware — Gateway Feature Gating✅ DoneImplemented in PR #961
M10-005Subscription UI — Plan Comparison, Checkout Trigger & Billing Portal✅ DoneImplemented in PR #975
M10-006Diamond Indicators — Premium Feature Markers✅ DoneImplemented in PR #975
M10-007Free Trial — 14-Day Scholar Trial on Signup✅ DoneImplemented in PR #975

Epic: Come Follow Me

3 story areas. Come Follow Me integration for weekly scripture reading.

Story AreaScopeSpec Reference
CFM schedule dataWeekly schedule mapping (year → week → passages)MVP.md § Feature #6
CFM integrationSurface current week's reading on home/dashboardMVP.md § Feature #6
Whisper cardSingle contextual insight card per readingMVP.md § Feature #13, DESIGN-SYSTEM.md § Whisper Cards

Issues — Come Follow Me

IssueTitleStatusNotes
M10-008CFM Schedule Data — Weekly Reading Plan Mapping✅ DoneImplemented in PR #973
M10-009CFM Integration — Surface Current Week's Reading on Home✅ DoneImplemented in PR #973
M10-010Whisper Card — Contextual Insight Card per Reading✅ DoneWhisperCard in @gospelib/ui; whisper-engine + whisper-storage + ReaderWhisperCard wrapper in apps/web

Epic: Social Sharing

2 story areas. Scripture card generation and sharing.

Story AreaScopeSpec Reference
Scripture card generatorSelect verse → generate styled image cardMVP.md § Feature #11, DESIGN-SYSTEM.md § Scripture Cards
Share targetsImage export, deep link, clipboardDESIGN-SYSTEM.md § Sharing

Issues — Social Sharing

IssueTitleStatusNotes
M10-011Scripture Card Generator — Verse-to-Image Card Creator✅ DoneImplemented in PR #973
M10-012Share Targets — Image Export, Deep Link & Clipboard✅ DoneImplemented in PR #973

Progress: 10 Done · 2 Partial · 0 To Do (83%)


Issue Dependency Graph

M00-002 ──► M10-002 ──► M10-001 ──► M10-003 ──► M10-005 ──► M10-006
M00-003 ──► M10-002 │ │ ▲
M00-003 ──► M10-001 │ ▼ │
M04-002 ──► M10-001 ├──► M10-004 ──► M10-005 ──────────────┘
│ ├──► M10-006
│ ▼
├──► M10-007 ──► M11

M10-005 ──► M10-006

M02 ──► M10-008 ──► M10-009 ──► M10-010
M02 ──► M10-009
M02 ──► M10-010
M02 ──► M10-011
M02 ──► M10-012

M04-001 ──► M10-003
M04-003 ──► M10-004
M04-004 ──► M10-011 ──► M10-012

Legend: A ──► B means A blocks B (B is blocked by A)


Document References

DocContainsUse When Writing Stories For
MVP.mdFeature scope, tier breakdown, success criteria, budgetAcceptance criteria, scope boundaries
TECH-SPEC.mdArchitecture, service boundaries, data stores, API catalogTechnical implementation details
GOSPELIB-SCHEMAS.mdAll 7 schema families, node/edge types, validation rulesData models, Pydantic models, graph schema
GOSPELIB-INGEST-SPEC.md7-stage pipeline, Cypher templates, batch strategy, CLIIngest pipeline stories
DESIGN-SYSTEM.mdVisual identity, component catalog, reader modes, tokensUI component stories
DESIGN-SYSTEM.md §§ 13, 21–23Footnotes (§13), subscription boundaries (§21), sharing (§22), onboarding (§23)UX flow stories
Deployment & OperationsEnvironments, K8s, CI/CD, migrations, secrets, DRInfrastructure and deployment stories
REPO-MAP.mdDirectory structure, naming conventions, dependency rulesAll stories (coding standards)
business/LEGAL.mdLegal compliance, church disclaimer, trademarkCFM integration compliance
business/POLICY-TERMS.mdPrivacy policy, terms of service draftsSubscription/billing terms

Additional Spec References for M10


Sprint Mapping

SprintWeeksPrimary Focus
S1429–30AI routes + caching + UI (M09 overlap), beginning of P3 billing work
S1531–32Billing service (Stripe), entitlement middleware, subscription UI
S1633–34CFM integration, scripture card sharing, free trial flow

Sprint Load Warnings

⚠️ S15 (Weeks 31–32) includes full Stripe billing integration — historically one of the most complex third-party integrations. Allow buffer or start Stripe sandbox integration earlier.

Additional considerations:

  • Stripe webhook handling requires idempotency key management and careful error handling — this is where billing bugs cost real money.
  • Entitlement middleware is a security-critical path: a bug here means users get free access or paying users get locked out.

Release Info

ReleaseTagTriggerContains
v0.10.0-alphabilling/v0.1.0-alphaM10 completeBilling + CFM + sharing

Tags follow <component>/v<semver> per release-please-config.json.

Note: This is the first release of the billing service (billing/v0.1.0-alpha).


Entitlement Gating: M09→M10

This milestone adds Scholar entitlement gating for features that shipped ungated in earlier milestones:

FeatureShipped InUngated UntilGated By
AI study assistantM09M10 billing goes liveBilling & Subscriptions — entitlement middleware
Interlinear + lexiconM06M10 billing goes liveBilling & Subscriptions — entitlement middleware
JST interlinearM07M10 billing goes liveBilling & Subscriptions — entitlement middleware
Constellation viewM08M10 billing goes liveBilling & Subscriptions — entitlement middleware

During the window between each Scholar feature shipping and M10 completion, all authenticated users have Scholar-level access. Once the entitlement middleware is live, only users with an active Scholar subscription (or active free trial) can access these endpoints.


Relevant Risks

RiskImpactMitigation
Clerk/Stripe integration complexityDelays auth + billingStart integration in parallel with reader; use sandbox environments early
AI cost overrunsMonthly API costs exceed budgetSession limiting, prompt caching, Anthropic's caching API, cost monitoring
Solo founder velocity38-week plan too aggressiveFounding users at Week 22 provide feedback before full scope; cut P3 scope if needed
Missing specification documentsDESIGN-SYSTEM.A1.md doesn't exist (referenced by M10/M11 UX flows)Write DESIGN-SYSTEM.A1.md before P3 or merge content into DESIGN-SYSTEM.md

Cross-Cutting Concerns

Testing

LayerFrameworkWhenSpec Reference
Go unitgo test -race + table-drivenEvery PR (billing service, gateway middleware)TECH-SPEC.md § Testing
TypeScript unitVitestEvery PR (subscription UI, CFM, sharing)TECH-SPEC.md § Testing
Component visualStorybook or playgroundP1+DESIGN-SYSTEM.md § Governance
E2EPlaywright (activated in P3)Pre-release
Visual regressionPlaywright + pixelmatchP1+ (any packages/ui/ or apps/*/src/ change)DESIGN-SYSTEM.md § Visual Regression CI

Documentation

DocUpdate Trigger
API OpenAPI specsBilling service endpoints added
ADRsStripe integration decisions, entitlement model

CI/CD

AdditionPhaseDetail
E2E testsP3Playwright E2E tests activated for critical user journeys (subscription flow)
Production CD pipelineP3Release tag → approval gate → deploy (preparation for M11)

Dependencies

Upstream (what M10 needs)

DependencyMilestoneDetail
Auth integration (Clerk + JWT)M04User identity required for subscription management
Gateway with middleware stackM02Entitlement middleware extends the existing gateway middleware
PostgreSQL schemas (billing tables)M00gl_subscriptions, gl_stripe_events tables must exist
Staging environmentM05Stripe sandbox testing on staging
AI service deployedM09Entitlement gating wraps AI endpoints
Scholar features deployedM06–M09All Scholar features must exist to be gated

Downstream (what depends on M10)

DependentMilestoneDetail
M11 production deploymentM11Billing must be operational before production launch
M11 onboarding flowM11Onboarding references subscription plans and trial
M11 analyticsM11Subscription conversion tracking as leading indicator

Summary

MetricCount
Total Issues12
Sub-Issues0
Total Estimate (pts)63
SprintsS14–S16
Dependencies (blocking)13
Dependencies (blocked by)24