Inspiration

AI can help people decide what to buy, but spending money requires clear boundaries and human control. Relay began with a question: What if you could describe a goal, set a budget, and let AI assemble a thoughtful purchase plan—while you approve the payment?

I also wanted to demonstrate that a working AI commerce prototype could be built without paid AI APIs or hosting.

What it does

Relay turns a goal into a budget-aware bundle from a curated demo catalog of digital products.

Users describe what they want to accomplish, set a spending limit, and receive product recommendations with an AI-generated explanation. Relay displays the total and remaining budget before opening PayPal sandbox checkout for approval.

After PayPal confirms a completed capture, Relay displays a verified receipt that users can export.

How I built it

I built Relay with Node.js, HTML, CSS, and browser-native JavaScript, without npm dependencies.

Ollama, running llama3.2:3b locally, interprets the user’s goal and recommends products. The server validates every selection against its catalog, rejects duplicates, calculates prices, and enforces the budget.

PayPal Orders v2 handles sandbox order creation, buyer approval, and server-side capture. Relay verifies the capture status, amount, and currency before issuing a receipt.

The responsive interface brings together the planner, catalog, connection status, and transaction history. Credentials remain in an ignored local environment file.

Challenges I ran into

The main challenge was connecting flexible AI output to precise payment requirements. AI recommendations needed independent validation before becoming a payable order.

Another challenge was making the experience transparent. Relay clearly labels its keyword-based Simulation mode separately from Local AI and reports missing connections instead of silently substituting simulated results.

Testing also required completing the entire sandbox lifecycle: authentication, order creation, buyer approval, capture, and receipt verification.

Accomplishments that we're proud of

Relay completed a working end-to-end test:

  • Local AI recommended a $93 bundle within a $150 budget.
  • A PayPal sandbox buyer approved the purchase.
  • PayPal completed the capture, and Relay displayed the verified receipt.
  • Repeating receipt verification returned the existing receipt without creating a duplicate.

The automated budget and catalog validation tests passed. The prototype uses no paid services, and sandbox testing moved no real money.

What I learned

AI-assisted commerce works best when responsibilities are clear: the model recommends, application code enforces constraints, the user approves, and PayPal confirms the payment.

Building Relay also showed me that local AI can power a useful prototype without a paid inference API. Installation, model availability, and clear onboarding are essential parts of making that experience usable.

What's next for Relay — AI Purchasing Copilot

Relay currently runs as a single-user local prototype with a sample catalog. Next, I would add merchant catalog integrations, editable purchase plans, richer user constraints, and webhook-based payment reconciliation.

The goal is to help people move from intent to purchase with clear reasoning, enforced budgets, and control over every payment.

Built by Viraj Gundewar.

Built With

Share this project:

Updates

Submission history