Moonlitic
Product Backlog — User Stories
Internal Only — Not for Investor Distribution

User Story Backlog

Sprint-ready user stories broken down from each folder's epics. Every story follows standard Scrum format with acceptance criteria in Given/When/Then, story point estimates, and parent epic traceability.

11
Sections
34
Epics
115
User Stories
465
Story Points
01

First-Party Consent Engine

3 Epics · 12 User Stories · 46 SP
Epic: Patient controls consent per data category in real time
F01-001 Toggle individual consent category on/off
As a patient, I want to toggle each data category (Diagnoses, Medications, Labs, Imaging, Wearable, Genetic, Social Determinants) on or off independently so that I control exactly which types of my health data are available to buyers and clinicians.
Acceptance Criteria
Given I am on the My Data tab and all categories are toggled ON, When I click the Medications toggle, Then the toggle visually switches to OFF and a confirmation toast appears within 1 second.
Given I have toggled Medications OFF, When I navigate to the Data Value section, Then the Medications row shows "$0.00" and the total data value is recalculated excluding Medications.
Given I have toggled Medications OFF, When a marketplace buyer submits an Rx Utilization query, Then my data is excluded from the query results.
F01-002 View consent audit history
As a patient, I want to view a timestamped log of every consent change I've made so that I have a verifiable record of when I granted or revoked access to each data category.
Acceptance Criteria
Given I am on the My Data tab, When I click "Consent History," Then I see a chronological list showing category, action (granted/revoked), timestamp, and IP address.
Given I toggled Labs OFF 5 minutes ago, When I open Consent History, Then the most recent entry shows "Labs — Revoked — [timestamp]."
F01-003 Bulk consent grant/revoke all categories
As a patient, I want to grant or revoke all data categories at once with a single action so that I can quickly opt in or fully withdraw without toggling each category individually.
Acceptance Criteria
Given I am on the My Data tab with mixed consent states, When I click "Revoke All," Then all toggles switch to OFF, a confirmation dialog appears, and upon confirming, all categories are revoked and downstream systems are notified.
Given all categories are OFF, When I click "Grant All," Then all toggles switch to ON and the data value recalculates to include all categories.
F01-004 Consent expiration and auto-renewal
As a patient, I want to set an expiration date on each consent grant so that my consent automatically revokes after a time period I choose, and I'm prompted to renew.
Acceptance Criteria
Given I am granting consent for Diagnoses, When I select "Expires in 12 months," Then the consent record includes an expiration timestamp and a renewal reminder is scheduled for 30 days prior.
Given a consent is 30 days from expiration, When the scheduled check runs, Then I receive an email and in-app notification prompting me to renew or let it expire.
Given a consent has expired, When the expiration timestamp is reached, Then the category is automatically revoked and downstream systems are notified within 60 seconds.
Epic: State-specific consent rules auto-applied for jurisdictional validity
F01-005 Auto-detect patient jurisdiction from address
As a compliance officer, I want the system to auto-detect the patient's jurisdiction from their registered address so that the correct state-specific consent rules are applied without manual configuration.
Acceptance Criteria
Given a patient registers with a Texas address, When their profile is created, Then the consent engine applies TX HB 300 rules (explicit written consent required for electronic disclosure of PHI).
Given a patient registers with a California address, When their profile is created, Then CMIA rules are applied (consent must specify the nature and purpose of disclosure).
F01-006 Enforce HIPAA minimum necessary standard
As a compliance officer, I want every data access request validated against the HIPAA minimum necessary standard so that buyers and clinicians only receive the specific data elements their use case requires.
Acceptance Criteria
Given a buyer submits a Cohort query for "Diabetes prevalence by age," When the query is processed, Then only Diagnoses and Demographics data is included — Medications, Labs, and other categories are excluded even if consented.
Given a clinician opens a patient record, When the access is logged, Then the audit record includes the minimum necessary justification (treatment, payment, or operations).
F01-007 Consent rule version management
As a compliance officer, I want consent rule versions tracked so that when state laws change, new rules apply to future consents while existing consents remain valid under the version they were granted so that we maintain legal defensibility.
Acceptance Criteria
Given Texas updates HB 300, When I publish a new rule version, Then all new TX consents use the updated rules and existing consents show which rule version they were granted under.
Given an audit request, When I pull a patient's consent record, Then each consent entry shows the rule version, jurisdiction, and effective date.
Epic: Consent events propagate instantly to all downstream systems
F01-008 Real-time consent propagation to marketplace
As a platform operator, I want consent revocations to propagate to the marketplace query engine within 30 seconds so that revoked data is never included in buyer query results after the patient withdraws.
Acceptance Criteria
Given a patient revokes Medications consent, When a buyer submits an Rx query within 30 seconds, Then that patient's Rx data is not included in the results.
Given a consent revocation event fires, When the event bus processes it, Then a propagation receipt is logged with timestamp, affected systems, and confirmation from each downstream consumer.
F01-009 Real-time consent propagation to clinician portal
As a platform operator, I want consent changes to immediately update clinician portal access so that if a patient revokes a specific provider's access, Door 4 restricts that provider's view within 30 seconds.
Acceptance Criteria
Given a patient revokes clinician access, When the clinician refreshes the patient record, Then they see a "Patient has restricted access" message instead of clinical data.
Given a clinician has a patient record open, When the patient revokes access, Then a real-time notification appears and the data is hidden without requiring a page refresh.
F01-010 Real-time consent propagation to payouts engine
As a platform operator, I want consent revocations to stop future payout accruals for revoked categories so that patients only earn from data they've actively consented to share.
Acceptance Criteria
Given a patient revokes Labs consent, When a buyer query includes Labs data, Then that patient earns $0 from that query even if other categories are still consented.
Given a revocation occurs mid-billing-cycle, When the monthly earnings are calculated, Then the patient's earnings reflect the pro-rated amount up to the revocation date.
F01-011 Consent propagation failure handling
As a platform operator, I want failed consent propagations to retry with exponential backoff and alert ops if unresolved so that no revocation is silently dropped.
Acceptance Criteria
Given a consent event fails to propagate to the marketplace, When the first retry fails, Then it retries at 1s, 5s, 30s, 120s intervals before escalating to the ops dashboard.
Given a propagation has been in retry for 5 minutes, When the escalation threshold is hit, Then an ops alert fires and the affected data categories are temporarily blocked in the marketplace as a safety measure.
F01-012 Consent event email and SMS confirmation
As a patient, I want to receive an email and optional SMS confirmation every time I grant or revoke consent so that I have out-of-band proof that my consent action was recorded.
Acceptance Criteria
Given I toggle Diagnoses OFF, When the consent is recorded, Then I receive an email within 60 seconds with subject "Consent Updated: Diagnoses Revoked" and a summary of all current consent states.
Given I have SMS notifications enabled, When I revoke a category, Then I also receive an SMS reading "Moonlitic: You revoked access to [Category] on [Date]. Reply HELP for support."
02

Clinical Data Intelligence

3 Epics · 11 User Stories · 47 SP
Epic: AI-surfaced clinical deltas for clinicians
F02-001 Surface lab trend anomalies
As a clinician, I want the system to flag lab values trending outside normal ranges over the last 3 visits so that I can identify deteriorating conditions without manually comparing historical results.
Acceptance Criteria
Given a patient's HbA1c has risen from 6.2 to 7.1 to 8.4 over 3 visits, When I open their record, Then I see an amber "Trending Up" alert on HbA1c with a sparkline showing the trajectory.
Given all lab values are within normal range and stable, When I open the record, Then no alerts are shown and the labs section displays "No significant changes."
F02-002 Detect medication interaction risks
As a clinician, I want the system to cross-reference active medications against known interaction databases so that I'm alerted to potential adverse interactions before the patient visit.
Acceptance Criteria
Given a patient is on Warfarin and a new prescription for Amiodarone is added, When I open their medication list, Then a red "Severe Interaction" alert appears with the specific risk (increased bleeding).
Given a patient has no known interactions, When I view the medication list, Then a green "No Interactions Detected" indicator is shown.
F02-003 Imaging change summary between studies
As a clinician, I want a side-by-side comparison summary when new imaging is available versus the previous study so that I can quickly assess progression or improvement without reading full radiology reports.
Acceptance Criteria
Given a patient has a new chest CT and a prior CT from 6 months ago, When I open the imaging section, Then I see a delta summary highlighting key changes (e.g., "Nodule: 8mm → 12mm, growth detected").
Given no prior imaging exists for comparison, When I view the study, Then it displays "Baseline study — no prior available for comparison."
F02-004 Clinical delta notification preferences
As a clinician, I want to configure which types of clinical deltas I receive alerts for so that I'm not overwhelmed by low-priority notifications and can focus on what matters to my specialty.
Acceptance Criteria
Given I am an endocrinologist, When I configure my alert preferences, Then I can enable HbA1c, glucose, and thyroid panel alerts while disabling imaging and cardiac alerts.
Given I have disabled imaging alerts, When a patient gets new imaging, Then I do not receive a notification but the data is still accessible in the full record.
Epic: Plain-language health updates for patients
F02-005 Translate lab results to plain language
As a patient, I want my lab results explained in plain English with severity indicators so that I understand what each value means for my health without needing medical training.
Acceptance Criteria
Given my HbA1c result is 8.4%, When I view it on the Health Updates tab, Then I see "Your average blood sugar over 3 months is elevated" with a red severity indicator and a recommendation to discuss with my provider.
Given all my labs are normal, When I view Health Updates, Then I see "All results within normal range" with a green indicator.
F02-006 Medication change plain-language summary
As a patient, I want to see a clear summary when my medications change so that I understand what was added, removed, or adjusted and why.
Acceptance Criteria
Given my Metformin dose was increased from 500mg to 1000mg, When I view Health Updates, Then I see "Metformin dose increased — your provider adjusted this to help manage your blood sugar levels."
Given no medication changes occurred since my last visit, When I view Health Updates, Then the medications section shows "No changes since [last visit date]."
F02-007 Health update severity triage
As a patient, I want my health updates sorted by severity (critical, attention needed, informational) so that I see the most important items first.
Acceptance Criteria
Given I have a critical lab result and a routine medication refill, When I open Health Updates, Then the critical item appears at the top with a red banner, and the routine item appears below with a blue informational indicator.
Epic: Real-world evidence from consented longitudinal data for buyers
F02-008 Longitudinal data assembly for query results
As a data buyer, I want query results to include longitudinal patient histories (not just point-in-time snapshots) so that my models can track disease progression and treatment effectiveness over time.
Acceptance Criteria
Given I submit a Dataset query for "Type 2 Diabetes outcomes," When the results are assembled, Then each patient record includes chronological visits, lab trends, medication changes, and outcomes spanning the full consent window.
Given a patient revoked consent partway through, When their data is included, Then only the consented time period is present and a "Consent window: [start] to [end]" field is included.
F02-009 Data quality scoring per patient record
As a data buyer, I want each patient record scored for completeness and data quality so that I can filter for high-quality records and understand the reliability of my dataset.
Acceptance Criteria
Given a patient has labs, meds, diagnoses, and imaging all populated, When their record is scored, Then it receives a "High" quality score (90%+).
Given a patient only has diagnoses and no labs or meds, When their record is scored, Then it receives a "Low" quality score (below 50%) with a breakdown showing missing categories.
F02-010 De-identification verification for dataset exports
As a compliance officer, I want every dataset export to pass automated de-identification checks (Safe Harbor or Expert Determination) so that no PHI leaves the platform in identifiable form.
Acceptance Criteria
Given a Dataset query result is ready for export, When the de-identification pipeline runs, Then all 18 HIPAA Safe Harbor identifiers are removed or generalized and a certification report is attached.
Given a record contains a rare diagnosis that could be re-identifying in a small cohort, When the k-anonymity check runs, Then the record is suppressed if the cohort size falls below the k threshold (default k=5).
F02-011 Consent provenance metadata in query results
As a data buyer, I want each record in my query results to include consent provenance metadata so that I can demonstrate to regulators that every data point was collected with first-party consent.
Acceptance Criteria
Given I export a dataset, When I inspect the metadata, Then each record includes consent_granted_at, consent_version, jurisdiction, and categories_consented fields.
03

Payouts & Disbursement Engine

3 Epics · 10 User Stories · 38 SP
Epic: Patient receives 80% share via ACH within 5 business days
F03-001 Patient links bank account for ACH payout
As a patient, I want to securely link my bank account via Plaid or manual ACH entry so that my earnings are deposited directly into my bank account.
Acceptance Criteria
Given I am on the Earnings tab and have no bank linked, When I click "Link Bank Account," Then a Plaid modal opens allowing me to search and connect my bank, and upon success, a masked account number (****1234) is displayed.
Given I have linked a bank account, When a payout is triggered, Then the ACH transfer initiates and I see a "Processing" status that updates to "Deposited" within 5 business days.
F03-002 View pending and completed payouts
As a patient, I want to see a list of all my pending and completed payouts with amounts and dates so that I know exactly when money is coming and can reconcile with my bank.
Acceptance Criteria
Given I have 3 pending payouts, When I open the Earnings tab, Then I see each payout with: amount (my 80% net), source (marketplace query or trial), status (pending/processing/deposited), and expected deposit date.
Given a payout completes, When the ACH settles, Then the status updates to "Deposited" with the actual settlement date.
F03-003 Payout minimum threshold
As a patient, I want payouts to only trigger when my balance exceeds a minimum threshold (e.g., $10) so that I don't receive micro-deposits that clutter my bank statement.
Acceptance Criteria
Given my accrued balance is $7.20, When the weekly payout cycle runs, Then no payout is initiated and my balance carries forward with a note "Below $10 minimum — will roll to next cycle."
Given my balance reaches $14.80, When the next payout cycle runs, Then a $14.80 ACH deposit is initiated.
Epic: Automated 80/20 split, 1099-NEC, and payout orchestration
F03-004 Automatic 80/20 split at attribution time
As a platform operator, I want every attribution event to automatically calculate and record the 80% patient share and 20% Moonlitic fee at write time so that the split is immutable and auditable from the moment revenue is earned.
Acceptance Criteria
Given a Cohort query is billed at $350 gross, When the attribution event is written, Then the record shows patientNet=$280, moonliticFee=$70, and the split ratio is stored as metadata.
Given an Aggregate query is billed at $0, When the attribution event is written, Then no payout record is created (zero-value queries don't generate earnings).
F03-005 Annual 1099-NEC generation
As a platform operator, I want 1099-NEC tax forms auto-generated for any patient earning $600+ annually so that Moonlitic meets IRS reporting requirements and patients can file taxes accurately.
Acceptance Criteria
Given a patient's annual earnings reach $600, When January 31 of the following year arrives, Then a 1099-NEC is generated with their legal name, TIN, and total non-employee compensation, and filed electronically with the IRS.
Given a patient earned $450 for the year, When the 1099 generation runs, Then no 1099 is generated (below $600 threshold) but the income is still reported to the patient in their Earnings tab.
F03-006 Payout batch orchestration
As a platform operator, I want payouts batched weekly and processed through Velo Payments in a single batch so that disbursements scale efficiently and transaction fees are minimized.
Acceptance Criteria
Given 500 patients have pending balances above the minimum, When the weekly batch runs, Then all 500 ACH transfers are submitted in a single Velo Payments batch and a batch receipt is logged with total amount, count, and status.
Given 3 transfers in the batch fail (invalid account), When the batch completes, Then the 3 failures are flagged for retry, the patient is notified to update banking info, and the remaining 497 succeed.
Epic: Full audit trail from source transaction to payout
F03-007 End-to-end payout provenance trail
As a finance team member, I want every payout linked back to its source transaction (marketplace query ID or trial event ID) with a full chain of custody so that I can trace any dollar from buyer payment to patient deposit.
Acceptance Criteria
Given I click on a payout record, When the detail view opens, Then I see: source query ID, buyer name, gross amount, 80/20 split breakdown, Velo transfer ID, ACH settlement date, and patient bank (masked).
Given a payout consolidates earnings from 5 queries, When I expand the detail, Then each of the 5 source transactions is listed with individual amounts that sum to the total payout.
F03-008 Monthly earnings breakdown by source
As a patient, I want a monthly breakdown showing how much I earned from marketplace data, clinical trials, and licensing so that I understand where my income comes from.
Acceptance Criteria
Given I earned $120 from marketplace and $500 from a clinical trial in March, When I view the March earnings, Then I see two rows: "Data Marketplace: $120" and "Clinical Trial (Acme Pharma): $500" with a total of $620.
F03-009 Payout dispute and inquiry flow
As a patient, I want to flag a payout as incorrect and submit an inquiry so that discrepancies are investigated and resolved.
Acceptance Criteria
Given I see a payout that looks incorrect, When I click "Report Issue," Then a form opens where I describe the problem, and a support ticket is created with the payout details pre-attached.
Given I have submitted a dispute, When it is being reviewed, Then the payout shows "Under Review" status and I receive email updates as the investigation progresses.
F03-010 Failed payout retry and patient notification
As a finance team member, I want failed ACH transfers to auto-retry up to 3 times and notify the patient if unresolved so that payouts are recovered without manual intervention.
Acceptance Criteria
Given a payout fails due to "Insufficient funds" at the receiving bank, When the failure is detected, Then the system retries on the next business day (up to 3 attempts) and logs each attempt.
Given 3 retries have all failed, When the final retry fails, Then the patient receives an email saying "Your payout could not be completed — please update your bank details" and the amount is held in escrow.
04

Claims Engine

3 Epics · 10 User Stories · 49 SP
Epic: Automated X12 835/837 ingestion, normalization, and validation
F04-001 Ingest X12 837 professional claims
As a claims analyst, I want the system to ingest X12 837P (professional) claim files from the EDI gateway and parse them into structured records so that I can review and adjudicate claims in a human-readable format.
Acceptance Criteria
Given a batch of 100 837P files arrives from the clearinghouse, When the ingestion pipeline runs, Then all 100 are parsed into structured claim records with: patient ID, provider NPI, diagnosis codes (ICD-10), procedure codes (CPT), billed amount, and service dates.
Given a file has invalid segments, When parsing fails, Then the file is quarantined with an error report listing the specific invalid segments and line numbers.
F04-002 Ingest X12 835 remittance advice
As a claims analyst, I want the system to ingest X12 835 remittance files and match them to their corresponding 837 claims so that I can see payment decisions alongside the original claim.
Acceptance Criteria
Given an 835 file arrives, When it is parsed, Then each payment/adjustment is matched to the original 837 claim by claim ID, and the claim record is updated with: paid amount, adjustment reason codes, and patient responsibility.
Given an 835 references a claim not yet in the system, When the match fails, Then it is queued in an "Unmatched Remittance" holding area and re-matched on each subsequent 837 ingestion.
F04-003 Claim validation rules engine
As a claims analyst, I want every incoming claim validated against configurable rules (duplicate detection, date logic, code validity) so that invalid claims are flagged before adjudication.
Acceptance Criteria
Given a claim arrives with a service date in the future, When validation runs, Then the claim is flagged with "Invalid service date — future date detected" and routed to the exception queue.
Given a duplicate claim (same patient, provider, date, codes) already exists, When validation runs, Then it is flagged as "Potential duplicate" with a link to the original claim for manual review.
Epic: Real-time prior authorization workflows
F04-004 Trigger prior auth from claim submission
As a provider, I want prior authorization requests auto-triggered when a claim includes a procedure requiring pre-approval so that I don't have to manually initiate the auth process.
Acceptance Criteria
Given a claim includes CPT 27447 (knee replacement), When the claim is submitted, Then the system checks the payer's prior auth requirements and if required, auto-generates a prior auth request with the clinical documentation attached.
Given a procedure does not require prior auth, When the claim is submitted, Then it bypasses the auth workflow and proceeds directly to adjudication.
F04-005 Prior auth status tracking dashboard
As a provider, I want a dashboard showing all pending, approved, and denied prior auth requests so that I can track the status of each authorization and escalate delays.
Acceptance Criteria
Given I have 12 pending auths, When I open the Prior Auth dashboard, Then I see each with: patient name, procedure, payer, submitted date, days pending, and current status.
Given an auth has been pending for more than 14 days, When I view the dashboard, Then it is highlighted in red with an "Escalate" button that generates a follow-up to the payer.
F04-006 Prior auth denial appeal workflow
As a provider, I want to initiate an appeal when a prior auth is denied, with supporting clinical evidence auto-attached so that I can challenge denials efficiently.
Acceptance Criteria
Given a prior auth for MRI is denied, When I click "Appeal," Then the system generates an appeal letter template with the denial reason, relevant clinical notes, and lab results pre-attached.
Given an appeal is submitted, When the payer responds, Then the auth status updates to "Appeal Approved" or "Appeal Denied — Final" and I am notified.
Epic: HEDIS quality measures computed from claims
F04-007 Compute HEDIS measures from claims data
As a platform operator, I want HEDIS quality measures (e.g., Comprehensive Diabetes Care, Breast Cancer Screening) auto-computed from adjudicated claims so that value-based care reporting runs without manual chart review.
Acceptance Criteria
Given claims data for a population of 10,000, When the HEDIS engine runs, Then it calculates numerator/denominator for each applicable measure and produces a HEDIS scorecard with rates and benchmarks.
Given a measure is below the 50th percentile benchmark, When the scorecard is generated, Then it is flagged "Below Benchmark" with a gap analysis showing which patients are in the denominator but not the numerator.
F04-008 Patient care gap identification
As a clinician, I want to see care gaps for my patients based on HEDIS measures so that I can address missing screenings and preventive care during the next visit.
Acceptance Criteria
Given a diabetic patient hasn't had an HbA1c test in 12 months, When I open their record, Then a care gap alert shows "Overdue: HbA1c screening (Comprehensive Diabetes Care measure)."
F04-009 Claims-derived fraud signal detection
As a claims analyst, I want the system to flag claims with statistical anomalies (billing outliers, impossible service combinations, upcoding patterns) so that potential fraud is surfaced for investigation.
Acceptance Criteria
Given a provider bills 50 knee replacements in one day, When the anomaly engine runs, Then a "Volume Anomaly" flag is raised with the provider's billing pattern compared to peer averages.
Given a claim bills E&M level 5 (99215) for a 2-minute visit, When the upcoding detector runs, Then it flags "Potential Upcoding — high complexity code with minimal time."
F04-010 Claim status real-time lookup
As a provider, I want to look up the real-time status of any submitted claim so that I can answer patient billing questions and track revenue cycle performance.
Acceptance Criteria
Given I search by claim ID or patient name, When results appear, Then I see: submitted date, current status (received/in review/adjudicated/paid/denied), and if adjudicated, the payment amount vs. billed amount.
05

Reconciliation Engine

3 Epics · 10 User Stories · 41 SP
Epic: Auto-reconcile claims payments with variance detection
F05-001 Auto-match 835 payments to 837 claims
As a finance team member, I want remittance payments automatically matched to their corresponding claims so that I can see which claims are fully paid, partially paid, or unpaid without manual matching.
Acceptance Criteria
Given an 835 payment of $450 matches claim #12345 billed at $500, When auto-matching runs, Then the claim status updates to "Partially Paid" with variance of -$50 and the adjustment reason code is displayed.
Given 95% of payments match on first pass, When the batch completes, Then the 5% unmatched are routed to the manual review queue with suggested matches ranked by confidence score.
F05-002 Variance threshold alerts
As a finance team member, I want automatic alerts when payment variances exceed configurable thresholds so that significant underpayments or overpayments are flagged immediately.
Acceptance Criteria
Given I set the variance threshold at 10%, When a claim billed at $1,000 is paid $800 (20% under), Then an alert fires with "Variance exceeds threshold: -$200 (20%)" and the claim is added to the exception queue.
Given a payment matches within 2% of the billed amount, When reconciliation runs, Then no alert fires and the claim is marked "Reconciled."
F05-003 Marketplace revenue reconciliation
As a finance team member, I want marketplace query fees reconciled against buyer payments and patient payouts so that the 80/20 split balances correctly in the ledger.
Acceptance Criteria
Given $10,000 in marketplace queries were processed this month, When reconciliation runs, Then the ledger shows: $10,000 gross revenue, $8,000 patient payouts, $2,000 Moonlitic fees, and any unreconciled variance.
Given a buyer's payment of $350 failed, When the query was already attributed, Then the variance report shows "Uncollected revenue: $350" and the patient payout for that query is held pending collection.
Epic: Double-entry financial ledger with error reporting
F05-004 Double-entry journal for all transactions
As an auditor, I want every financial transaction recorded as a double-entry journal entry (debit + credit) so that the ledger always balances and every dollar is accounted for.
Acceptance Criteria
Given a buyer pays $350 for a Cohort query, When the payment is recorded, Then the journal shows: Debit Accounts Receivable $350, Credit Revenue $350; then Debit Revenue $280, Credit Patient Payable $280 (80% share); and Debit Revenue $70, Credit Platform Fees $70 (20% share).
Given the end-of-month close, When the trial balance runs, Then total debits equal total credits and any imbalance triggers an automatic investigation alert.
F05-005 Audit report generation
As an auditor, I want to generate a complete audit report for any date range showing all journal entries, adjustments, and reconciliation status so that I can conduct financial reviews and respond to regulatory inquiries.
Acceptance Criteria
Given I request an audit report for Q1 2026, When the report generates, Then it includes: all journal entries, summary by account, reconciliation status for each transaction, and any unresolved exceptions.
F05-006 Error classification and trending
As an auditor, I want reconciliation errors classified by type (underpayment, overpayment, duplicate, unmatched) and trended over time so that I can identify systemic issues.
Acceptance Criteria
Given 50 errors occurred in March, When I view the error dashboard, Then I see them grouped: 30 underpayments, 10 unmatched, 8 duplicates, 2 overpayments, with a 6-month trend chart showing if error rates are improving or worsening.
Epic: Reconciliation queues with retry logic and escalation
F05-007 Auto-retry failed reconciliation matches
As a platform operator, I want unmatched payments auto-retried on each new data ingestion so that timing mismatches between 835 and 837 files resolve automatically.
Acceptance Criteria
Given an 835 payment arrived before its 837 claim, When the next 837 batch is ingested, Then the system re-attempts matching and auto-reconciles if a match is found.
Given a payment remains unmatched after 30 days, When the aging threshold is hit, Then it escalates to the finance team with a "Stale Unmatched Payment" alert.
F05-008 Exception queue with priority ranking
As a finance team member, I want reconciliation exceptions ranked by dollar amount and age so that I resolve the highest-impact items first.
Acceptance Criteria
Given 25 exceptions are in the queue, When I open the exception dashboard, Then they are sorted by impact score (dollar amount x days outstanding) with the highest at the top.
F05-009 Payer-level reconciliation summary
As a finance team member, I want a payer-level summary showing total billed, total paid, and net variance per payer so that I can identify which payers are consistently underpaying.
Acceptance Criteria
Given I select "Q1 2026" and click "Payer Summary," When the report generates, Then each payer shows: total claims billed, total paid, variance percentage, and a trend arrow (improving/worsening vs. prior quarter).
F05-010 Manual adjustment with approval workflow
As a finance team member, I want to post manual adjustments (write-offs, corrections) with a dual-approval workflow so that no unilateral changes can be made to the financial ledger.
Acceptance Criteria
Given I submit a $200 write-off adjustment, When I click "Submit for Approval," Then a second finance team member receives a notification to approve or reject the adjustment before it posts to the ledger.
Given the approver rejects the adjustment, When rejection is submitted, Then the adjustment is not posted, I receive a notification with the rejection reason, and the exception remains open.
06

Demo & Validation Suite

3 Epics · 9 User Stories · 28 SP
Epic: One-click scenario seeder and walkthrough for investor demos
F06-001 Seed "Full Happy Path" demo scenario
As a founder, I want to click one button that seeds the Full Happy Path scenario across all 4 doors so that I can start an investor demo within 10 seconds.
Acceptance Criteria
Given I am on the Demo Data Generator, When I click "Full Happy Path" then "Seed Now," Then localStorage is populated for Door 2, Door 3, and Door 4, a status bar shows "Seeded: Full Happy Path," and all portal links are active.
Given the scenario is seeded, When I open Door 2, Then Maria Santos' profile appears with all consents ON, data values populated, and trial matches loaded.
F06-002 Walkthrough script timer and progress tracking
As a founder, I want a live timer and progress bar during the walkthrough so that I stay within the 12-minute target and know which steps I've covered.
Acceptance Criteria
Given I start the walkthrough timer, When 10 minutes elapse, Then the timer turns amber as a visual cue to start wrapping up.
Given I complete step 5 of 10, When I mark it done, Then the progress bar shows 50% and auto-scrolls to the next incomplete step.
F06-003 Reset to clean state between demos
As a founder, I want to clear all demo state with one click so that I can start fresh for the next investor meeting without leftover data from the previous demo.
Acceptance Criteria
Given a previous demo scenario is seeded, When I click "Fresh Start," Then all localStorage keys are cleared, the status bar shows "No scenario active," and all portals load in their default empty state.
Epic: Demo file verification and zero-trust audit scripts
F06-004 Pre-demo file integrity check
As a QA engineer, I want an automated check that verifies all demo HTML files are present, load without JS errors, and contain expected demo data hooks so that I can certify the demo environment is ready.
Acceptance Criteria
Given I run the pre-demo check, When all files are present and valid, Then I see a green "All Clear" status with a checklist of verified items (file count, JS syntax, localStorage hooks, link validity).
Given a file is missing or has a JS error, When the check runs, Then I see a red "Issues Found" status listing exactly which files failed and why.
F06-005 Audit trail for demo sessions
As a QA engineer, I want every demo session logged with scenario used, steps completed, duration, and any errors encountered so that I can review demo quality after each investor meeting.
Acceptance Criteria
Given a demo session completes, When I review the session log, Then I see: scenario name, start/end time, steps completed (7/10), any browser console errors, and seed log entries.
Epic: Reusable demo presets tailored to buyer personas
F06-006 Consent Revocation scenario preset
As a sales team member, I want a "Consent Revocation" preset that shows a patient revoking data access mid-demo so that I can demonstrate Moonlitic's real-time consent enforcement to compliance-focused buyers.
Acceptance Criteria
Given I seed the Consent Revocation scenario, When I open Door 2, Then Maria has 2 categories already revoked (Genetic, Wearable) and the marketplace queries on Door 3 reflect the restricted dataset.
F06-007 Mid-Approval scenario preset
As a sales team member, I want a "Mid-Approval" preset that shows a buyer partway through the 4-stakeholder approval gate so that I can demonstrate the governance workflow to compliance buyers.
Acceptance Criteria
Given I seed the Mid-Approval scenario, When I open Door 3, Then Acme Pharma shows 2 of 4 approvals complete (Legal and Compliance approved, Data Governance and DPO pending).
F06-008 Custom scenario builder
As a sales team member, I want to build custom demo scenarios by mixing and matching consent states, approval stages, and patient profiles so that I can tailor demos to any specific buyer's use case.
Acceptance Criteria
Given I open the custom scenario builder, When I select "All consents ON" + "3 of 4 approvals" + "Patient Journey focus," Then a custom scenario is generated and I can save it with a name for reuse.
Given I saved a custom scenario, When I return to the Demo Generator, Then my saved scenario appears in the preset list alongside the defaults.
F06-009 Demo scenario documentation auto-generation
As a sales team member, I want each preset to auto-generate a one-page scenario brief so that I can review the talking points before a demo without memorizing every detail.
Acceptance Criteria
Given I select "Full Happy Path," When I click "View Brief," Then a one-page summary appears with: scenario name, seeded data points, key talking points per door, and recommended demo duration.
07

Marketplace & Portal Suite

3 Epics · 11 User Stories · 39 SP
Epic: Guided buyer onboarding with 4-stakeholder approval gate
F07-001 Buyer self-service registration
As a data buyer, I want to register for a marketplace account with company info, use case description, and regulatory credentials so that my application can be reviewed by the approval gate.
Acceptance Criteria
Given I am a new buyer, When I complete the registration form, Then my application enters the 4-stakeholder approval queue and I receive a confirmation email with estimated review time.
Given I omit required fields (company name, use case), When I submit the form, Then validation errors highlight the missing fields and submission is blocked.
F07-002 4-stakeholder sequential approval workflow
As a platform operator, I want each buyer application to require sequential approval from Legal, Compliance, Data Governance, and DPO so that no buyer gets data access without all 4 stakeholders signing off.
Acceptance Criteria
Given Legal approves a buyer, When the approval is recorded, Then the application advances to Compliance and the Compliance officer is notified.
Given any stakeholder rejects the application, When the rejection is recorded, Then the workflow stops, the buyer is notified with the rejection reason, and the application status shows "Rejected at [stage]."
F07-003 Buyer approval status tracking
As a data buyer, I want to see the real-time status of my approval (which gates have been passed, which are pending) so that I know where my application stands.
Acceptance Criteria
Given Legal and Compliance have approved but Data Governance is pending, When I log in, Then I see a progress bar showing 2/4 complete with "Awaiting: Data Governance" displayed.
F07-004 Secured data pipe delivery
As a data buyer, I want query results delivered via encrypted SFTP or API endpoint so that data in transit is protected and I can integrate results directly into my analytics pipeline.
Acceptance Criteria
Given my query results are ready, When I choose "Deliver via SFTP," Then the data is encrypted with AES-256 and transferred to my registered SFTP endpoint, and a delivery receipt is logged.
Given I choose "Deliver via API," When I call the results endpoint with my API key, Then I receive the data over TLS 1.3 with a response header showing the dataset hash for integrity verification.
Epic: Patient portal with data value, consent, trials, and earnings
F07-005 Data value visualization by category
As a patient, I want to see the estimated value of each consented data category (with buyer count and projected earnings) so that I understand what my data is worth and can make informed consent decisions.
Acceptance Criteria
Given I have 5 categories consented, When I view the Data Value section, Then each category shows: estimated monthly value, number of active buyers, and a visual bar proportional to value.
Given I revoke a category, When the Data Value section refreshes, Then that category shows $0 and the total recalculates.
F07-006 Clinical trial match and accept/decline
As a patient, I want to see clinical trials I'm eligible for and accept or decline each one so that I can participate in research that interests me and earn compensation.
Acceptance Criteria
Given I have 3 matched trials, When I open the Clinical Trials tab, Then each trial shows: title, CRO, compensation, eligibility match score, and Accept/Decline buttons.
Given I click "Accept" on a trial, When the action is confirmed, Then my status changes to "Enrolled — Pending Screening" and the CRO is notified.
Given I click "Decline," When the action is confirmed, Then the trial is moved to a "Declined" section and I am not shown that trial again unless I reopen it.
F07-007 Patient login with MFA
As a patient, I want to log into my portal with email + MFA (SMS or authenticator app) so that my health data is protected by multi-factor authentication.
Acceptance Criteria
Given I enter a valid email, When I click "Continue," Then a 6-digit MFA code is sent to my phone and I must enter it within 5 minutes.
Given I enter an incorrect MFA code 3 times, When the third attempt fails, Then my account is temporarily locked for 15 minutes and I receive an email alert about the failed attempts.
Epic: Consent-gated clinician views with AI co-pilot
F07-008 Consent-gated patient record view
As a clinician, I want patient records to only show data categories the patient has consented to share with me so that I respect their data sovereignty while still delivering care.
Acceptance Criteria
Given a patient has consented to share Labs and Diagnoses but not Medications, When I open their record, Then I see Labs and Diagnoses sections but the Medications section shows "Access restricted by patient consent."
Given a patient grants Medications consent, When I refresh the record, Then the Medications section becomes visible within 30 seconds.
F07-009 AI co-pilot clinical summary
As a clinician, I want an AI-generated summary of the patient's recent clinical activity (consented data only) so that I can prepare for the visit in 30 seconds instead of reviewing pages of records.
Acceptance Criteria
Given a patient has 3 recent visits, When I click "AI Summary," Then a 3-5 sentence summary appears highlighting: key diagnoses, recent lab changes, medication adjustments, and any care gaps — using only consented data categories.
Given a patient has restricted Medications access, When the AI summary generates, Then it does not mention medications and includes a note "Partial view — some categories restricted by patient consent."
F07-010 Clinician HIPAA login with NPI verification
As a clinician, I want to log in using my NPI number + MFA with optional SSO (SMART on FHIR, Epic) so that my identity is verified against the NPI registry before I access any patient data.
Acceptance Criteria
Given I enter my email, NPI, and MFA code, When I click "Sign In," Then the system validates my NPI against the NPPES registry and grants access only if the NPI is active and matches my email domain.
Given I enter an invalid or deactivated NPI, When I attempt login, Then access is denied with "NPI not found or inactive — please verify your credentials."
F07-011 Clinician appointment list with consent indicators
As a clinician, I want my appointment list to show consent status icons next to each patient so that I know at a glance which patients have full, partial, or no data sharing before I open their record.
Acceptance Criteria
Given I have 8 appointments today, When I view the list, Then each patient shows a consent indicator: green (all categories shared), amber (partial), red (no consent / restricted).
S

Security & Compliance

4 Epics · 12 User Stories · 52 SP
Epic: HIPAA Technical Safeguards — Encryption, Access Control, Audit
SEC-001 End-to-end encryption for data at rest and in transit
As a security engineer, I want all PHI encrypted with AES-256 at rest and TLS 1.3 in transit so that data is protected even if storage or network is compromised.
Acceptance Criteria
Given patient data is stored in Azure Health Data Services, When I inspect the storage configuration, Then Azure-managed keys (or customer-managed keys) are enforcing AES-256 encryption and no unencrypted blobs exist.
Given a buyer calls the data delivery API, When I inspect the connection, Then TLS 1.3 is enforced and TLS 1.0/1.1 connections are rejected.
SEC-002 Role-based access control via Azure Entra ID
As a security engineer, I want all system access governed by Entra ID roles (patient, clinician, buyer, operator, admin) with least-privilege defaults so that each user can only access resources appropriate to their role.
Acceptance Criteria
Given a user authenticates as a "buyer" role, When they attempt to access patient-level records, Then access is denied with a 403 and the attempt is logged to the security audit trail.
Given a new role is created, When permissions are assigned, Then the role starts with zero permissions and each resource must be explicitly granted.
SEC-003 Comprehensive security audit logging
As a compliance officer, I want every PHI access, authentication event, and system change logged immutably with timestamp, user, action, and resource so that we can respond to any HIPAA audit inquiry within 24 hours.
Acceptance Criteria
Given a clinician views a patient record, When the access occurs, Then an audit entry is written with: user ID, patient ID, resource type, action, timestamp, IP address, and consent status at time of access.
Given an auditor requests logs for the last 90 days, When the query runs, Then results are returned within 30 seconds and logs cannot be modified or deleted by any user including admins.
Epic: Zero Trust Architecture — Network Segmentation & Threat Detection
SEC-004 Network segmentation between portal tiers
As a security engineer, I want each portal tier (patient, clinician, marketplace, admin) running in isolated network segments with no lateral movement so that a breach in one portal cannot reach another.
Acceptance Criteria
Given the marketplace portal (Door 3) is compromised, When the attacker attempts to reach the patient data store, Then all traffic is blocked by NSG rules and the intrusion attempt triggers an Azure Sentinel alert.
SEC-005 Automated vulnerability scanning
As a security engineer, I want automated vulnerability scans running weekly against all deployed services so that known CVEs and misconfigurations are detected before they can be exploited.
Acceptance Criteria
Given a weekly scan runs, When a critical vulnerability is detected, Then a Sev-1 ticket is auto-created, the security team is paged, and a 48-hour SLA for remediation begins.
Given no new vulnerabilities are found, When the scan completes, Then a "Clean Scan" report is generated and archived for compliance records.
SEC-006 DDoS protection and rate limiting
As a platform operator, I want Azure DDoS Protection and API rate limiting on all public endpoints so that the platform remains available under attack and API abuse is throttled.
Acceptance Criteria
Given a buyer API key exceeds 100 requests/minute, When the rate limiter fires, Then subsequent requests receive 429 Too Many Requests and the event is logged.
Epic: HIPAA BAA Chain & Compliance Certification
SEC-007 Execute BAA with Microsoft Azure
As a compliance officer, I want a signed Business Associate Agreement with Microsoft covering Azure Health Data Services so that our cloud infrastructure vendor is contractually bound to HIPAA requirements.
Acceptance Criteria
Given we provision an Azure tenant, When we accept the Microsoft Online Services BAA, Then the signed BAA is archived in our compliance vault and covers all HIPAA-eligible Azure services we use.
Given an auditor asks for our BAA chain, When we produce documentation, Then the chain shows: Moonlitic ↔ Microsoft Azure, Moonlitic ↔ Data Aggregator, Moonlitic ↔ Velo, Moonlitic ↔ Clear.
SEC-008 BAA with health data aggregator
As a compliance officer, I want a signed BAA with our data aggregator (Data Aggregator / 1upHealth) so that PHI flowing through the aggregator is covered under HIPAA.
Acceptance Criteria
Given we select an aggregator vendor, When contract negotiation begins, Then BAA execution is a prerequisite before any patient data flows and the BAA specifies data categories, retention, and breach notification obligations.
SEC-009 SOC 2 Type II readiness assessment
As a compliance officer, I want a SOC 2 Type II readiness assessment completed within 6 months so that enterprise buyers and health systems trust Moonlitic's security posture.
Acceptance Criteria
Given the readiness assessment begins, When gaps are identified, Then each gap has an owner, remediation plan, and target date, tracked in a compliance dashboard.
Given all gaps are remediated, When the external auditor begins the Type II observation period, Then all controls are operating effectively for a minimum 3-month observation window.
Epic: Incident Response & Breach Notification
SEC-010 Incident response playbook
As a security engineer, I want a documented incident response playbook with roles, escalation paths, and runbooks for common scenarios (data breach, unauthorized access, ransomware) so that the team responds within HIPAA's required timelines.
Acceptance Criteria
Given a potential breach is detected, When the IR process begins, Then the playbook defines: who is notified within 1 hour, containment steps within 4 hours, and HHS notification within 60 days if 500+ records are affected.
Given a tabletop exercise is conducted quarterly, When the exercise completes, Then lessons learned are documented and the playbook is updated.
SEC-011 Breach notification to affected patients
As a patient, I want to be notified within 60 days if my data is involved in a breach, with clear information about what was exposed and what steps I should take so that I can protect myself.
Acceptance Criteria
Given a breach affecting my data is confirmed, When the notification period begins, Then I receive a letter (and email) describing: what data was exposed, when it happened, what Moonlitic is doing, and what I should do (credit monitoring, etc.).
SEC-012 Penetration testing program
As a security engineer, I want annual third-party penetration testing against all portals and APIs so that vulnerabilities are identified by external experts before malicious actors find them.
Acceptance Criteria
Given the annual pen test is scheduled, When the test completes, Then all critical and high findings have remediation plans within 7 days and are resolved within 30 days.
Given the pen test report is finalized, When an enterprise buyer requests security documentation, Then a redacted executive summary is available showing test scope, methodology, and finding counts by severity.
I

Infrastructure & DevOps

3 Epics · 10 User Stories · 42 SP
Epic: Azure Cloud Foundation — Tenant, Networking, FHIR Store
INF-001 Provision Azure tenant and subscription structure
As a platform operator, I want an Azure tenant provisioned with separate subscriptions for dev, staging, and production so that environments are isolated and cost-tracked independently.
Acceptance Criteria
Given the Azure tenant is created, When I inspect the subscription layout, Then I see: moonlitic-dev, moonlitic-staging, moonlitic-prod, each with budget alerts at 80% and 100% of monthly allocation.
Given a developer deploys to dev, When they attempt to access prod resources, Then access is denied by Entra ID role boundaries.
INF-002 Azure Health Data Services workspace setup
As a platform operator, I want Azure Health Data Services provisioned with FHIR R4 server, de-identification service, and DICOM service so that clinical data flows have a production-grade home.
Acceptance Criteria
Given the workspace is provisioned, When I send a test FHIR Patient resource via REST, Then it is stored successfully and retrievable via FHIR search with Entra ID bearer token auth.
Given I run the de-identification service on a Patient resource, When the output is returned, Then all 18 HIPAA Safe Harbor identifiers are removed or generalized.
INF-003 Virtual network and private endpoints
As a platform operator, I want all Azure services connected via private endpoints within a VNet with no public internet exposure for data services so that PHI never traverses the public internet inside our infrastructure.
Acceptance Criteria
Given the FHIR server is deployed, When I check its network settings, Then public access is disabled and only private endpoint connections from the Moonlitic VNet are accepted.
Epic: CI/CD Pipeline & Deployment Automation
INF-004 GitHub Actions CI pipeline
As a developer, I want every PR to trigger automated linting, unit tests, security scan, and build so that broken code never reaches the main branch.
Acceptance Criteria
Given I push a PR, When the CI pipeline runs, Then it executes: lint, unit tests (90%+ coverage gate), SAST scan, dependency vulnerability check, and build — all must pass before merge is allowed.
Given a security vulnerability is found in a dependency, When the scan reports it, Then the PR is blocked with a clear message showing the CVE and affected package.
INF-005 Infrastructure as Code with Terraform
As a platform operator, I want all Azure infrastructure defined in Terraform with state stored remotely so that environments are reproducible, version-controlled, and auditable.
Acceptance Criteria
Given I run terraform plan against the production config, When no changes have been made, Then the plan shows "No changes. Infrastructure is up-to-date."
Given I need a new Azure resource, When I add it to Terraform and submit a PR, Then the plan output is attached to the PR for review before apply.
INF-006 Blue-green deployment pipeline
As a platform operator, I want blue-green deployments with automated rollback on health check failure so that production updates have zero downtime and automatic recovery.
Acceptance Criteria
Given a new version is deployed to the green slot, When health checks pass for 5 minutes, Then traffic is swapped from blue to green with zero dropped requests.
Given the green slot fails health checks, When the failure threshold (3 consecutive failures) is hit, Then traffic stays on blue, the deployment is marked failed, and the team is alerted.
Epic: Monitoring, Alerting & Disaster Recovery
INF-007 Application performance monitoring
As a platform operator, I want Azure Application Insights tracking response times, error rates, and throughput for all portals and APIs so that I can detect performance degradation before users notice.
Acceptance Criteria
Given Door 2 API response time exceeds 2 seconds (p95), When the threshold is breached for 3 consecutive minutes, Then an alert fires to the ops channel with latency breakdown.
INF-008 Uptime SLA monitoring dashboard
As a platform operator, I want a real-time dashboard showing uptime SLA per portal (target 99.9%) so that I can report availability to stakeholders and identify reliability trends.
Acceptance Criteria
Given I open the uptime dashboard, When the page loads, Then I see: current month uptime %, 90-day trend, incident count, and MTTR for each portal (Doors 1-4).
INF-009 Disaster recovery with geo-redundant backup
As a platform operator, I want daily encrypted backups with geo-redundant storage and a tested DR plan with RTO of 4 hours and RPO of 1 hour so that we can recover from a catastrophic failure.
Acceptance Criteria
Given the primary Azure region goes down, When the DR failover is initiated, Then all services are operational in the secondary region within 4 hours with no more than 1 hour of data loss.
Given a quarterly DR drill is scheduled, When the drill completes, Then actual RTO and RPO are measured and any gaps are documented with remediation plans.
INF-010 Cost monitoring and optimization
As a finance team member, I want Azure cost dashboards broken down by service, environment, and team so that I can track cloud spend against budget and identify optimization opportunities.
Acceptance Criteria
Given I open the cost dashboard, When I filter by "production," Then I see month-to-date spend, forecasted month-end, top 5 cost drivers, and comparison to prior month.
E

Integration Engineering

3 Epics · 10 User Stories · 44 SP
Epic: Health Data Aggregator Integration (Production Data Source)
INT-001 Aggregator API integration and patient data pull
As a platform operator, I want the aggregator API integrated so that when a patient authorizes data access, their FHIR R4 records are pulled and stored in Azure Health Data Services so that clinical data is available within minutes of patient authorization.
Acceptance Criteria
Given a patient completes Clear verification and grants consent, When the authorization token is sent to the aggregator, Then FHIR resources (Patient, Condition, MedicationRequest, Observation, DiagnosticReport) are pulled and stored in Azure FHIR within 5 minutes.
Given the aggregator returns partial data (e.g., EHR doesn't support Observation), When the pull completes, Then available resources are stored and missing categories are logged with the EHR source noted.
INT-002 Incremental data sync from aggregator
As a platform operator, I want incremental syncs running daily to pull new clinical data for all authorized patients so that patient records stay current without requiring manual re-authorization.
Acceptance Criteria
Given a patient had a lab result added at their EHR today, When the nightly sync runs, Then the new Observation resource appears in Azure FHIR by the next morning and the patient sees it in Door 2 Health Updates.
Given a patient has revoked aggregator authorization, When the sync runs, Then their data pull is skipped, existing data is retained per retention policy, and the patient is notified to re-authorize if they wish.
INT-003 FHIR resource mapping and normalization
As a platform operator, I want all aggregator data normalized to a consistent FHIR R4 profile with Moonlitic extensions so that downstream consumers (Folders 01-05, Doors 1-4) don't need to handle EHR-specific variations.
Acceptance Criteria
Given data arrives from Epic (via aggregator) using US Core profiles, When normalization runs, Then all resources conform to the Moonlitic FHIR profile with consent metadata extensions attached.
Given data arrives from a non-US-Core EHR with non-standard coding, When normalization runs, Then codes are mapped to standard terminologies (ICD-10, SNOMED, RxNorm, LOINC) and unmappable codes are flagged for manual review.
Epic: Identity & Payment Service Integrations
INT-004 Clear patient identity verification flow
As a patient, I want to verify my identity through Clear during registration so that my account is IAL2-verified and I can access my health data.
Acceptance Criteria
Given I click "Verify Identity" during registration, When I complete the Clear flow (photo ID + selfie), Then my Moonlitic account is marked IAL2-verified and I can proceed to link my health data.
Given Clear verification fails, When the failure is returned, Then I see a clear message with the reason and alternative verification options (in-person, phone support).
INT-005 Velo Payments patient onboarding
As a patient, I want Velo Payments onboarding embedded in my Earnings tab so that I can link my bank account and start receiving payouts without leaving the Moonlitic portal.
Acceptance Criteria
Given I am on the Earnings tab with no bank linked, When I click "Set Up Payouts," Then the Velo Payments onboarding flow opens in-context, collects my bank details and tax info, and upon completion I see my masked account number and "Ready for Payouts" status.
INT-006 Twilio MFA integration for all portals
As a platform operator, I want Twilio Verify integrated for SMS-based MFA on patient (Door 2) and clinician (Door 4) login so that all PHI access is protected by multi-factor authentication.
Acceptance Criteria
Given a patient enters their email on the login page, When they click "Continue," Then Twilio sends a 6-digit code to their registered phone and the code expires after 5 minutes.
Given Twilio SMS delivery fails (carrier issue), When the failure is detected, Then the user is offered a fallback (email code or authenticator app).
Epic: Notification & Communication Integrations
INT-007 SendGrid transactional email setup
As a platform operator, I want SendGrid integrated with branded email templates for consent confirmations, payout receipts, trial alerts, and system notifications so that all transactional emails are professional, deliverable, and trackable.
Acceptance Criteria
Given a patient revokes consent, When the confirmation email is sent, Then it arrives within 60 seconds, uses the Moonlitic branded template, and includes a summary of current consent states.
Given an email bounces, When SendGrid reports the bounce, Then the patient's communication preferences flag "Email undeliverable" and an in-app notification is used as fallback.
INT-008 Zoho CRM buyer pipeline integration
As a platform operator, I want Zoho CRM integrated with Door 3 buyer registration so that every new buyer application auto-creates a CRM deal, and approval stage changes sync bidirectionally.
Acceptance Criteria
Given a buyer submits a registration on Door 3, When the application is created, Then a Zoho CRM deal is auto-created with: company name, use case, contact info, and pipeline stage "Application Received."
Given a stakeholder approves in the platform, When the approval is recorded, Then the Zoho CRM deal stage advances accordingly (e.g., "Legal Approved" → "Compliance Review").
INT-009 Zoho Books invoicing integration
As a finance team member, I want marketplace query charges auto-generating Zoho Books invoices so that buyer billing is automated and reconciliation is seamless.
Acceptance Criteria
Given a buyer runs 10 Cohort queries in March, When the monthly billing cycle closes, Then a Zoho Books invoice is auto-generated for $3,500 (10 x $350) and emailed to the buyer's billing contact.
INT-010 ClinicalTrials.gov API integration for real trial matching
As a patient, I want my trial matches sourced from real ClinicalTrials.gov data matched against my clinical profile so that I see actual active trials I'm eligible for, not demo data.
Acceptance Criteria
Given my profile includes Type 2 Diabetes and I'm in Texas, When the trial matcher runs, Then I see active NCT studies for T2D with sites within 50 miles, ranked by eligibility match score.
Given ClinicalTrials.gov API is unavailable, When the sync fails, Then the last successful dataset is used and a "Data as of [date]" notice is shown.