Skip to main content

M04: Annotations — v0.4.0-alpha

Phase: P1: Core Reader Target: Weeks 13–17 Sprints: S6 (tail), S7, S8 (start) Release Tags: web/v0.4.0-alpha, auth/v0.1.0-alpha


Phase Context

Goal: A web app where users can read all LDS scriptures, navigate by book/chapter, search, and annotate (highlights, notes, bookmarks). The free tier of MVP.md § Free Tier.

Key constraint: This must be "genuinely better than Gospel Library" — the free tier IS the acquisition funnel.


ZenHub Configuration

FieldValue
MilestoneM04: Annotations
Due Date2026-07-05
Default PipelineProduct Backlog
Primary Epic(s)Auth Integration, Annotations & Study Tools

Prerequisites

PrerequisiteSource MilestoneWhat Must Be Complete
PostgreSQL annotation schemasM00: Tech Prepgl_highlights, gl_notes, gl_bookmarks, gl_reading_progress, gl_users, gl_user_devices tables created via migration framework
Reader shell with verse anchoringM03: Scripture ReaderScripture text display, verse rendering, chapter navigation — verse elements must support annotation anchoring

Epics

Epic: Auth Integration

Story AreaScopeSpec Reference
Clerk setupWeb app Clerk provider, sign-in/sign-up flowsTECH-SPEC.md § Authentication
Auth serviceClerk webhook handler, user sync to PostgreSQL (gl_users schema from M00)TECH-SPEC.md § Auth Service
Gateway JWTJWT validation middleware, X-User-Id injectionTECH-SPEC.md § Gateway Middleware

Issues — Auth Integration

IDTitleStatusNotes
M04-001Clerk Setup — Web App Authentication Provider✅ Doneimplemented in PR #901 (2026-04-03)
M04-002Auth Service — Clerk Webhook Handler & User Sync✅ Doneimplemented in PR #901 (2026-04-03)
M04-003Gateway JWT Validation Middleware & User Injection✅ Doneimplemented in PR #901 (2026-04-03)
M04-004Action Ring — Radial Verse Action Menu✅ Donecompleted (2026-04-03)
M04-005Highlight System — Doctrinal Colors & Color Picker✅ DoneCompleted in PR #962 (2026-04-13); gutter annotation panel opener wired
M04-006Notes — Verse-Anchored Notes with Markdown Editor✅ DoneCompleted in PR #962 (2026-04-13); My Notes list view panel added
M04-007Bookmarks — Double-Tap & Bookmark List✅ Donecompleted (2026-04-03)
M04-008Annotation CRUD API — Auth Service Endpoints✅ Donecompleted (2026-04-03)
M04-009User Data API — Gateway Routing for Annotations✅ Donecompleted (2026-04-03)
M04-010Reading History — Chapter-Level Progress Tracking✅ DoneCompleted in PR #962 (2026-04-13); chapter nav read/unread indicators added (Go tests still pending)

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


Issue Dependency Graph

M04-001 ──► M04-002
──► M04-003
──► M04-004
──► M04-005
──► M04-006
──► M04-007
──► M04-008
──► M04-009
──► M04-010
M04-002 ──► M04-003
──► M04-005
M04-003 ──► M04-005
──► M04-006
──► M04-007
──► M04-008
──► M04-009
──► M04-010
M04-004 ──► M04-005
──► M04-006
M04-005 ──► M04-008
M04-006 ──► M04-008
M04-007 ──► M04-008
M04-008 ──► M04-009

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)
BusinessLEGAL.md, POLICY-TERMS.md, executive summary, market research, GTMLaunch readiness, legal/compliance stories

Sprint Mapping

SprintWeeksPrimary Focus for M04
S715–16Auth integration (Clerk), annotations system (highlights, notes, bookmarks)

S6 (Weeks 13–14) is primarily M03 work (scripture display, reader chrome) but overlaps M04 start. S8 (Weeks 17–18) begins M05 search work.

Sprint Load Warnings

  • S6 (Weeks 13–14) compounds with scripture display + reader chrome + Quick Settings + density + dark mode + loading states + error patterns + accessibility + playground. May need to push some items to S7.

Release Info

ReleaseTagContains
v0.4.0-alphaweb/v0.4.0-alpha, auth/v0.1.0-alphaAuthentication + annotations

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


Relevant Risks

RiskImpactMitigation
Clerk/Stripe integration complexityDelays auth + billingStart integration in parallel with reader; use sandbox environments early
Solo founder velocity38-week plan too aggressiveFounding users at Week 22 provide feedback before full scope; cut P3 scope if needed

Cross-Cutting Concerns

Testing

LayerFrameworkWhenSpec Reference
Go unit (auth service)go test -race + table-drivenEvery PRTECH-SPEC.md § Testing
TypeScript unit (web app)VitestEvery PRTECH-SPEC.md § Testing
Component visualStorybook or playgroundP1+DESIGN-SYSTEM.md § Governance
Visual regressionPlaywright + pixelmatchP1+ (any packages/ui/ or apps/*/src/ change)DESIGN-SYSTEM.md § Visual Regression CI

Documentation

DocUpdate Trigger
API OpenAPI specsAuth service milestone
ADRsEach major technical decision

CI/CD

AdditionPhaseDetail
Nx affected test executionP1Vitest workspace already configured; needs per-project configs

Dependencies

Upstream (what M04 needs)

DependencySourceStatus
PostgreSQL migration frameworkM00: Tech PrepMust be complete
Initial PostgreSQL schemas (annotation + user tables)M00: Tech PrepMust be complete
Reader shell with verse anchoringM03: Scripture ReaderMust be complete
Gateway with reverse proxy + request IDM02: Content APIMust be complete (gateway extended with JWT middleware here)

Downstream (what depends on M04)

DependentMilestoneWhat It Needs From M04
Billing + subscriptionsM10: MonetizationAuth integration (user identity for subscriptions)
AI study assistantM09: AI Study AssistantAuth (user identity for session limiting)
All Scholar features (M06–M09)P2 milestonesAuthenticated user context for feature gating

Summary

MetricCount
Total Issues10
Sub-Issues0
Total Estimate (pts)58
SprintsS7
Dependencies (blocking)23
Dependencies (blocked by)23