Inspiration

Older adults and teenagers are frequent targets of payment scams. Families usually end up with two bad options: trust blindly, or take over the person's money entirely. We wanted a middle path that keeps the person in control while giving a trusted family member a say on risky payments.

What it does

Family Safety First has two sides:

  • A Guardian (for example, a son or daughter) writes payment rules in plain English, such as: "Grandma can pay up to $80 on her own. Anything over $250 is blocked. She can always pay [email protected]."
  • A Member (for example, a grandparent) pays through the app.

Every payment is checked before it reaches PayPal:

  • Normal payments go straight through.
  • Risky payments are held. The Guardian sees the reasons on a dashboard and approves or declines, and the Member sees a kind, plain-language explanation.
  • Clearly unsafe payments are blocked.

Every event is saved in an activity timeline, so the family always knows what happened.

How we built it

  • PayPal Orders API (sandbox): OAuth token, create order, and capture order. An order is created only after the safety checks, or the Guardian, allow the payment.
  • AI, used two ways:
    1. Plain-English rules are converted into structured rules by an AI model, then validated in code before use.
    2. A second AI check reviews each payment for scam patterns that keyword rules miss (for example, a tax-scam note sent to a trusted friend) and writes a short, kind explanation.
  • Safety by design: the AI can only make a decision stricter, never looser. Payment notes are treated as untrusted data, and if the AI is unavailable, the normal rules still apply.
  • Stack: Node.js, Express, plain HTML/CSS/JavaScript, Anthropic Claude API, PayPal Orders API.

Challenges we ran into

  • Reliable AI output. When we tested a scam note that tried to give the AI instructions, the AI's reply broke our JSON parsing. We fixed it by making the parser tolerant, asking the AI to avoid quotation marks, and falling back to the normal rules if anything still fails.
  • Keeping the AI from loosening decisions. We designed the logic so the AI can only add caution, which means a tricked or broken AI can never move money on its own.
  • Sandbox quirks. PayPal's sandbox can be slow, so we built the Member page to update automatically when the Guardian decides.

Accomplishments that we're proud of

  • A complete, working flow from plain-English rules to a real PayPal sandbox order, with a Guardian approval step in the middle.
  • An AI layer that catches scams a keyword list misses, while normal payments still go through without delay.
  • In a small test of 20 hand-written payments (12 scams, 7 normal, 2 harmless payments to a new person), rules alone stopped 5 of 12 scams and rules plus AI stopped 12 of 12. All 7 normal payments went through, and the results matched across two runs. This is a small test we wrote ourselves, not a measure of real-world accuracy. The script and results are in the repo (test-set.js, test-results.txt).
  • A design that treats safety as a requirement: AI can only tighten decisions, notes are treated as untrusted data, and the app falls back to the rules if the AI is down.

What we learned

  • Simple rules and AI work best together: rules are fast and predictable, and AI catches creative scams.
  • When money is involved, everything the AI returns must be validated in code.
  • Honest limits and small, repeatable tests build more trust than big claims.

What's next for Family Safety First

This is a sandbox prototype. Next steps:

  • Login and accounts so only the real Guardian can change rules or approve payments.
  • Saved rules and history in a database, instead of in memory.
  • Real notifications (text or email) so the Guardian is alerted the moment a payment is held.
  • A larger, independent test set to measure how well scam detection works.
  • Support for more payment flows beyond the ones made through this app.

Built With

Share this project:

Updates

Submission history