M
1. Pick a tip amount
2. Compose your message AI composer
Blank cards are awkward. Tell the composer who you are and what you love, pick a tone, and it drafts a personal tip message for you. (Runs 100% in your browser — see “For judges” below.)
3. Pay with PayPal
Simulates order creation, buyer approval and capture locally — same UI states as the real flow.
How it works — notes for judges
- Pick an amount ($1 / $5 / $10 / $25 or custom). Amounts are validated (zero, negative and non-numeric values are rejected) before any payment starts.
- Compose with AI. The “AI Tip Message Composer” drafts a personal message from a tone + your name + a detail about the creator. It is a client-side smart composer (template + variation engine, 500 message combinations per tone, no repeats) so the demo needs zero API keys. A real LLM can be dropped into the single function
aiGenerateMessage()inpublic/app.jswithout touching anything else. - Pay with PayPal. Checkout uses the official PayPal JavaScript SDK and the standard Orders flow:
createOrderwith the tip amount (the message rides along incustom_id) andcaptureinsideonApprove. PayPal is the payment rail end-to-end — no cards or balances are handled by this app. - Dual path, honestly labelled. With a sandbox client-id in
public/config.jsyou get the real PayPal Checkout (sandbox). Without one, the app runs a Demo Mode that simulates the same created → approved → captured states with demo order IDs, so the full journey is testable with no credentials at all. - Close the loop. After capture, the success screen shows the order ID and the delivered message, and the creator gets an “AI Thank-You Reply” draft — because a tip that gets acknowledged publicly brings the next tip.
Run it: npm start, then open http://localhost:4174. Run the automated checks: npm run verify.