Inspiration
Every group trip has two people in it. One friend can't afford the plan but stays quiet, and either overspends or drops out. Another friend books everything on their own card and spends weeks chasing everyone to pay them back.
Existing tools only help after the money is spent: they split bills and send reminders. None of them help a group reach a plan everyone can afford before anyone pays, without forcing someone to say "I can't afford that" out loud.
I wanted to fix the moment before booking: let friends agree privately, and commit together so nobody fronts the money.
What it does
Pact is a group trip planner with three ideas at its core:
- Private budgets that shape the choice. Each friend privately shares their max budget, must-haves, nice-to-haves and available dates. Nobody else sees them, not even the organizer. Everyone pays the same share; a person's budget only decides which stays the group considers. A low budget can make the group pick a cheaper stay, but it can never push costs onto others.
- A private AI negotiator. When no stay fits everyone, Pact works out the smallest change that would unlock a plan and asks just the right person, privately. For example: "If you're okay with a shared room, the group can get the villa with the pool you wanted." The person accepts or declines. Nobody learns who compromised. Must-haves are never negotiated.
- Commit together with PayPal. Each person approves a PayPal hold for their share. Money is reserved, not taken, until every share is secured. Then the organizer books and Pact captures every hold. If someone drops out or the trip is cancelled, holds are voided and any captured payments are refunded. Someone who needs more time can be covered by a friend, through a private, two-person agreement with a repayment plan.
There's also Ask Pact, a friendly group assistant that answers questions about the trip but refuses to reveal anyone's private details.
How I built it
- Frontend: React, Vite, Tailwind, React Router. A pixel-art design system, a group dashboard, and a trip workspace with Overview / Plan / Commit / Ask Pact tabs that open on your next action and update live.
- Backend: Node.js and Express with PostgreSQL (Neon), zod validation on every request, httpOnly session cookies, rate limiting, and membership checks on every route.
- PayPal (sandbox): Orders v2 with intent AUTHORIZE for holds and CAPTURE for immediate payments, plus Payments v2 to capture, void and refund. The server creates every order with server-computed amounts, verifies approval and amount with PayPal before recording anything, and sends a
PayPal-Request-Idon every POST so retries can't double-charge. - AI (Google Gemini): used only where language is needed:
- turning each person's free text into structured requirements (one person at a time),
- explaining proposals,
- phrasing private negotiation questions,
- answering Ask Pact.
The AI never sees anyone's budget and never touches money.
- Deterministic core: filtering, equal-split math, the date window, ranking, the negotiation solver and all money decisions are plain, tested code.
The design rule: the AI proposes, the code checks, PayPal enforces.
Privacy and consent
- Private inputs, shares, payments and negotiations are returned only to their owner, enforced on the server and covered by tests.
- A leak checker blocks any AI message that contains a member's budget or a phrase from their private text, falling back to a safe template.
- An eval script attacks Ask Pact with direct and indirect questions ("who has the smallest budget?", repeated questions, "ignore your rules…"). The latest run: 0 leaks.
- Consent is specific: agreeing to stretch your budget for one stay can't be reused for another, and nobody can be charged more than they explicitly accepted.
- Planning is versioned, so outdated questions expire and two plans can't overwrite each other.
Challenges I ran into
- Making the AI essential without trusting it with money. Early versions let the AI choose too much. I moved every decision that affects money or eligibility into deterministic code and kept the AI for language.
- Fairness. My first split let others quietly cover a friend with a lower budget, which a "free rider" could exploit. I switched to equal shares where private budgets only shape which stays qualify.
- Payment edge cases: a hold isn't escrow, and a captured payment can't be voided. I built explicit failure handling: a "needs attention" state if a capture fails, voids for drop-outs, and refunds for cancellations.
- Concurrency: two plans running at once, or someone answering a question that had already been replaced. Solved with plan versions, row locks and a consent snapshot check.
- Free-tier AI quotas: caching, a mock mode for development, and never retrying on quota errors.
Accomplishments I'm proud of
- A complete, working flow from private inputs to private negotiation, voting, PayPal holds and booking.
- Privacy and consent enforced by the server, not just hidden in the UI.
What I learned
- How PayPal authorizations differ from captures, and why voids, refunds and honor periods matter in real payment design.
- How to design AI features that are useful without being trusted blindly.
- That privacy is an architecture decision, not a UI detail.
What's next
- Repayment automation for covered friends via partial refunds, and PayPal Pay Later as an option for people who need more time.
- Paying hosts directly through PayPal's platform payments, so Pact never holds funds.
- Real stay inventory through a booking partner API.
- "Log in with PayPal" instead of demo accounts.
- Early-commitment perks, like first pick of rooms.
Honest notes for judges
- All payments run in PayPal sandbox. A sandbox merchant account stands in for the stay provider.
- Stays are mock listings. Pact demonstrates the agreement and payment coordination layer, not real booking.
- Login uses demo accounts so you can try it instantly.
AI and tools used
- Google Gemini: requirement extraction, proposal explanations, negotiation phrasing, Ask Pact. It never receives budgets, never selects or prices stays, and never calls PayPal.
- PayPal Orders v2, Payments v2, JavaScript SDK (sandbox): holds, captures, voids, refunds and payments.
- Render: hosting.
- Claude Code: used as a development assistant while building.
Built With
- express.js
- google-gemini
- javascript
- jwt
- neon
- node.js
- paypal
- paypal-javascript-sdk
- paypal-orders-api
- paypal-payments-api
- postgresql
- react
- react-router
- supertest
- tailwindcss
- vite
- vitest
- zod