Spike #121: Document client request flow (packages, projects, Stripe) #127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "spike/client-request-flow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Design spike documenting the client request flow — unified lifecycle for package changes and project requests, ServiceRequest data model, Stripe payment integration, and updated delivery phases.
Changes
docs/user-stories-auth.mdwith unified request flow for package changes and projectsTest Plan
Review Checklist
Related Notes
Closes #121
Spike output — five implementation tickets created:
PR #127 Review
DOMAIN REVIEW
Docs-only PR -- single file changed (
docs/user-stories-auth.md). No code, no migrations, no tests needed. Reviewing for internal consistency, data model correctness, and Mermaid syntax.Mermaid syntax: All four diagrams (role hierarchy, client request flowchart, ERD, delivery phases) use valid Mermaid syntax. Node definitions, arrow labels, and relationship cardinalities are well-formed.
Delivery phases: Match the stated board layout -- Phase 1: Auth Foundation, Phase 2: Roles & Tabs, Phase 3: Property Features, Phase 4: Multi-Tenancy, Phase 5: iOS Distribution. The note that ServiceRequest + Stripe spans phases 3-4 is a useful clarification.
Related tickets: Section lists #107, #115-#118, #121-#126. All referenced issues confirmed to exist in the tracker. Coverage is complete.
Open questions: Old #4 (client-property link) and old #5 (Stripe -- "separate ticket, not scoped here") are properly replaced with more specific questions (#4 pricing model, #5 Stripe webhooks vs polling, #6 photo storage). The old questions are resolved by the design in this doc and the new tickets.
BLOCKERS
None. This is a docs-only change with no code, so the standard BLOCKER criteria (test coverage, input validation, secrets, DRY auth) do not apply.
NITS
ServiceRequest
declinedstatus missing from prose lifecycle. The ERD defines six statuses:requested | quoted | paid | scheduled | completed | declined. But the My Property section (line 120) only lists five:requested -> quoted -> paid -> scheduled -> completed. Thedeclinedstatus should appear in the prose lifecycle to match the data model. Similarly, the client request flowchart has no branch for admin declining a request -- it flows linearly from review to quote. Consider adding adeclinedpath from the admin review node.Client photo upload vs permission matrix ambiguity. The Client role description box says "Pay via Stripe, upload photos" and the My Property section says "Photo upload for issues." However, the permission matrix row "Post questions/photos on properties" has Client = No. This appears intentional (that row covers crew communication, not client issue photos), but the role description box does not distinguish between these two photo upload contexts. Consider clarifying in the role box: "upload photos (via requests)" to avoid confusion with the crew communication photo feature.
"View service package + monthly price" breaks superset hierarchy. The role hierarchy is described as "Four roles, each a superset of the one below it." However, the permission matrix has Admin = Yes for "View service package + monthly price" but Crew Lead = No. If this is intentional (pricing is sensitive business data), the "each a superset" statement in the preamble needs a caveat. If Leads should see packages for properties they manage, the matrix needs updating.
PR body says #122-#126, Related section also includes #121. Minor -- the PR body "Related Notes" section says "five implementation tickets created: #122-#126" but the doc's Related Tickets section correctly also includes #121 (this spike itself). No action needed, just noting the PR body undercounts by one.
SOP COMPLIANCE
spike/client-request-flow-- does not follow{issue-number}-{kebab-case-purpose}convention. Expected:121-client-request-flow-spikeor similar with issue number prefix.PROCESS OBSERVATIONS
Clean docs spike. The unified ServiceRequest model is a sound design choice -- one table for both package changes and project requests avoids the complexity of two separate models with nearly identical lifecycles. The five implementation tickets (#122-#126) are well-scoped with clear boundaries.
The
declinedstatus omission from the prose and flowchart (nit #1) is the most important item to address before implementation tickets reference this doc as their spec -- developers reading the flowchart would miss that admin can decline requests, which affects UI and state machine design in #122 and #123.VERDICT: APPROVED
The nits are real inconsistencies worth fixing but none rise to BLOCKER level for a design doc. The data model, permission matrix, delivery phases, and ticket references are solid. Recommend addressing nit #1 (declined status) before #122 implementation begins, as it affects the state machine spec.