-
-
Preflight before spending: the soccer camp needs approval, with the agreement clause and page cited.
-
Gemini extracts each expense rule with a verbatim quote and page number. A rule whose quote is not in the PDF cannot be confirmed.
-
The other parent approves from one email link with a one-time code. No app to install, no account.
-
Settlement through PayPal: Orders v2 capture to the platform, Payouts to the owed parent, confirmed by verified webhooks
-
Every expense in an AG Grid ledger with its clause, approval and payment status, filters and CSV export.
-
178 unit and 221 integration tests, Playwright journeys on phone and desktop, and twelve invariants checked in CI.
Inspiration
A parenting agreement often says exactly how a child's costs are shared: medical 50/50, activities 60/40, written approval above $200. Court forms expect parents to use it before spending. The Kansas Agreed Shared Parenting Plan asks parents to consult each other "before the expense is incurred". But the agreement is a PDF, and the co-parenting apps we reviewed handle an expense after it is logged. So the check tends to happen after the money is gone, when it is already an argument.
We wanted the check to happen first.
What it does
Two Homes Preflight checks a child expense against the family's own agreement before anyone spends, gets the other parent's approval with one link, and settles the share through PayPal.
- Agreement to rules. A parent uploads the agreement. Gemini extracts the expense rules, each with a verbatim quote and page number. The app verifies every quote against the PDF text, and a rule whose quote cannot be found cannot be confirmed. The parent reviews every rule.
- Preflight. Before buying, the parent enters the expense, or types it in plain words. A deterministic rules engine, not the AI, returns a verdict with the clause and page: Eligible, Needs approval, Missing evidence, Not covered, Late or Needs review.
- Approval with one link. The other parent gets an email, enters a one-time code, and approves, approves part, or declines with a reason. No app to install, no account.
- Receipt. Gemini reads the receipt, the parent confirms the numbers, and the app checks it against the approval: over the approved amount, bought before approval, late, or a duplicate.
- Settlement through PayPal. The paying parent pays the platform with PayPal Orders v2, and the platform pays the owed parent with PayPal Payouts. Verified webhooks move the claim from Paid to Settled. Parents connect with Log in with PayPal, and the Family plan is a PayPal subscription.
- Ledger. Every expense in an AG Grid ledger with its clause, approval and payment status, filters and CSV export.
How we built it
- Next.js 16, React 19, TypeScript, Tailwind and shadcn, hosted on Render.
- Firebase Auth and Cloud Firestore. All writes happen on the server; the browser only reads its own family's data through live listeners.
- Gemini 2.5 Flash for rule extraction, receipt reading and plain-text expense entry. Every output is validated with zod.
- PayPal Orders v2, Payouts, Subscriptions, Log in with PayPal and verified webhooks. Orders and Subscriptions use PayPal's Server SDK, written with APIMatic's PayPal context plugin and skills in Claude Code.
- AG Grid Community for the ledger. Cloudinary private storage for receipts. Resend for email from our own domain.
Correctness first. Every approval and payment state change goes through one transition function. Twelve invariants, such as "at most one successful payout per claim", are checked by a script. Every PayPal call carries an idempotency key. We have 178 unit tests, 221 integration tests, Playwright journeys on phone and desktop with axe accessibility checks, and a full journey in the PayPal sandbox that finished with zero invariant violations.
Why the AI never decides. A Stanford study found that commercial legal AI tools gave incorrect or misgrounded answers in 17% to 33% of queries. So Gemini only extracts and reads. Every value must trace to a verified quote, a person confirms it, and the verdict comes from tested code.
Safety by design. Family law professionals report that expense requests can be used to pressure a former partner. So the app writes neutral request wording itself, declining is as easy as approving, requests are limited per day, a declined expense cannot be re-sent for 7 days, and links expire, are stored only as hashes and need an emailed code.
Evidence we built on
| Finding | Source | Strength |
|---|---|---|
| 13.9 million US custodial parents raise 22.2 million children whose other parent lives elsewhere; 37.3% had a legal child support agreement in 2022, down from 55.1% in 2003 | US Census Bureau, P60-285 | Official data |
| Court forms ask parents to consult before an expense is incurred and set receipt deadlines | Kansas Agreed Shared Parenting Plan, Ohio Form 20 | Official forms |
| Legal AI tools gave incorrect or misgrounded answers in 17% to 33% of queries | Magesh et al., Stanford | Peer-reviewed |
| Expense requests can be used to intimidate a former partner; co-parenting apps can enable ongoing coercive control | Smyth et al., 2023, Irving and Boxall, 2026 | Peer-reviewed |
| Parents want this tool | None yet | Not validated: we have not interviewed users |
How it compares
Much of this already exists, and we did not invent it: expense tracking, receipt scanning, custom splits, approvals after an expense is logged, and paying without installing an app. What we saw on public product pages in November 2026:
| Product | What we saw |
|---|---|
| OurFamilyWizard | Expense log; the other parent approves or refuses a request; a future purchase date can be entered. We did not see a check against the family's agreement or a cited clause |
| FairSplit | Approve, partially approve or dispute through a browser link. Its site says it does not determine whether an expense is legally owed |
| SupportPay, TalkingParents, Blended, AppClose | Expense tracking, splits and payments, with different feature sets |
| Ramp (corporate) | Checks spending against a written company policy before it happens and cites the policy. This is the pattern we brought to co-parenting |
What we combine, and did not find in the pages we reviewed: a clause-and-page-cited eligibility check before the purchase, built from the family's own agreement, with the same approval carried through the receipt and the PayPal payout. We reviewed public pages, not every product or paid tier, and products change quickly. So this is the result of our research, not a claim that nobody has done it.
What parents say about current tools
These are individual public reviews, quoted as opinions. They show what is at stake, not that our app fixes it, and they are not representative: when we checked, OurFamilyWizard had a 4.6 rating from about 57,000 ratings on the App Store.
- "If someone rejects there is no note section for a reason why. You have to send a message instead" (App Store review, June 2024). In our app a decline can carry a reason on the expense itself.
- "We've both had to revert to tracking expenses manually in separate systems, which completely defeats the purpose of using this app." (Trustpilot, August 2025)
- "BUT it's expensive and often co-parents do not have the financial situation which makes choosing this tough" (App Store review). In our app the co-parent never pays for an account.
We also looked for Reddit discussions but could not verify any thread, so we quote none.
Challenges we ran into
- Paying the other parent. Orders v2 with the other parent as payee failed with PAYEE_NOT_CONSENTED, and seller onboarding is not available for personal accounts. We moved to a pass-through model: payer to platform with Orders v2, platform to receiver with Payouts.
- Keeping AI output honest. Quotes come back with curly quotes, broken lines and hyphens, so verification normalises text and falls back to a strict fuzzy match.
- Many moving states. Approvals, receipts, captures, payouts and webhooks that arrive out of order. One state machine and the invariants kept this manageable.
Accomplishments we're proud of
- The full loop works in the PayPal sandbox, from PDF to settled payout, with every step tied to a clause.
- Zero invariant violations in the full sandbox journey.
What we learned
- For anything involving money, AI should extract and people should confirm; rules should decide.
- Webhooks arrive late, twice, or before the API response. Idempotency is not optional.
Scope: what we did not build
This is a focused hackathon build, not a full co-parenting suite. It does not include messaging, custody calendars, child-support calculation, legal advice, multiple families per account, currencies other than USD, partial payments, native mobile apps or live PayPal payments. Messaging and a shared calendar exist in other products and were not our focus.
Limitations
- Sandbox only. Collecting money from one parent and paying another is likely money transmission. A real launch needs PayPal approval for this model and legal review.
- Not legal advice. The app shows what the agreement text says.
- Synthetic data. The agreement, people and receipts in the demo are fictional.
- Demand not validated. No user interviews yet.
- Guest receivers. A co-parent without an account who is owed money cannot connect PayPal from an email link yet.
What's next
- Talk to separated parents and family mediators before building more.
- Messaging or a shared calendar only if parents ask for them.
- Live PayPal only after a compliance review.
Built With
- ag-grid
- apimatic
- cloud-firestore
- cloudinary
- firebase
- github-actions
- google-gemini
- next.js
- paypal
- paypal-payouts
- paypal-subscriptions
- playwright
- react
- render
- resend
- tailwindcss
- typescript
- vitest
