Stacha — Know what to buy. Know what comes next.

Try Stacha | GitHub

Stacha homepage

Inspiration

Sometimes you know what you need, but you're unsure exactly what to buy.

Setting up an office, replacing equipment, or preparing a new workspace can involve hours of research. You have to understand the requirements, compare products, stay within budget, and coordinate with suppliers.

Things can also change after a purchase has been arranged. A supplier might run out of stock, leaving you with an incomplete order and another purchasing decision to make.

We wanted to build a tool that helps throughout this process, from figuring out what to buy to handling changes along the way.

That's how Stacha started.

What it does

Stacha is an AI-assisted purchasing workspace that combines product research, purchase planning, PayPal payments, and supplier coordination.

Describe what you need

The buyer describes a purchasing need in their own words and provides a deadline and, optionally, a budget.

Stacha uses AI to suggest products, quantities, and specifications. The buyer can review those suggestions before proceeding.

Creating a purchasing request

Find products and compare options

Stacha searches real product listings and prepares a suggested purchasing plan based on the buyer's requirements.

Buyers can compare prices, review product details, visit retailer websites, and identify anything that still needs to be confirmed.

Product research and recommendations

Pay with PayPal

For eligible products in Stacha's test-merchant catalog, buyers can complete a payment through PayPal Sandbox.

In our demonstration, we purchased four test office monitors for a total of $540 USD.

Stacha verifies the transaction with PayPal and saves the payment details, allowing the buyer to return to the purchase later.

Verified PayPal Sandbox payment

The test catalog is separate from the retailer listings used for product research. Sandbox purchases involve no real money or physical fulfillment.

Handle supplier changes

What happens when a supplier can no longer deliver part of an order?

Stacha includes an interactive supplier recovery scenario. When a fictional supplier reports a shortage, the buyer can see which quantities are missing, compare replacement offers, review the budget, and approve a new arrangement.

Suppliers have their own workspace for reporting availability, submitting quotes, and acknowledging orders.

Supplier recovery and replacement offers

This scenario uses fictional suppliers and simulated financial operations.

How we built it

We built Stacha using JavaScript, Node.js, Express, and PostgreSQL.

The AI processes purchasing requests into structured requirements. A product research service retrieves actual listings, which Stacha uses to prepare recommendations based on the buyer's needs and budget.

For payments, we integrated the PayPal Orders API v2 to handle order creation, buyer approval, payment capture, and transaction verification.

The backend calculates payment amounts and verifies the merchant, currency, purchased items, and capture status directly with PayPal.

Payment attempts and transaction events are stored in PostgreSQL. We also implemented safeguards against duplicate payment requests and uncertain transaction outcomes.

The supplier recovery workflow tracks quantities, commitments, replacement offers, and budget changes so the buyer can understand the impact of each decision.

Challenges we ran into

Understanding purchasing requests. People describe their needs in different ways, and important specifications are often missing. We had to structure AI responses carefully and give buyers the opportunity to review the results.

Product compatibility. Finding a product at the right price does not guarantee it meets every requirement. We needed to account for incomplete product information when preparing recommendations.

Payment verification. Integrating PayPal checkout required handling interrupted requests, verifying transaction details, preventing duplicate operations, and preserving payment records.

Supplier disruptions. Replacing an unavailable product affects quantities, budgets, and existing commitments. We built a recovery workflow that keeps track of these details while the buyer evaluates alternatives.

Accomplishments that we're proud of

We completed a working purchasing experience that starts with a natural-language request, retrieves actual product listings, and supports verified PayPal Sandbox payments.

We also built a supplier recovery workflow where buyers and suppliers can interact from separate workspaces.

Seeing a successful PayPal transaction recorded in Stacha and still available after an application restart was an important milestone for the project.

What we learned

Building Stacha helped us understand where AI can make purchasing easier and where buyers need to remain involved.

We learned that product recommendations depend heavily on the quality of the available information, especially when compatibility and delivery requirements matter.

Working with PayPal taught us how to handle payment verification, interrupted requests, and persistent transaction records.

We also discovered how important it is to preserve purchasing context when supplier availability changes. A buyer should be able to resolve a shortage without rebuilding the entire purchase.

What's next for Stacha

We want to connect real suppliers to Stacha and expand its purchasing capabilities.

Our next steps include:

  • Real supplier onboarding and quotations.
  • Improved product compatibility and availability checks.
  • Purchase monitoring and fulfillment tracking.
  • Payment recovery workflows through PayPal.
  • Support for recurring business purchases.

We want Stacha to become a tool businesses can use for everyday purchasing, from their first request through delivery.

Share this project:

Updates

Submission history