TrustCart AI – Your Personal AI Shopping Agent
Inspiration
Online shopping offers thousands of products, but finding the right one is not always easy. Customers often spend time comparing prices, checking specifications, reading product details, and deciding which option best matches their needs and budget.
I wanted to make this experience simpler by combining AI-powered assistance with secure digital payments.
This inspired me to build TrustCart AI, an intelligent shopping assistant that helps customers discover products, compare alternatives, understand recommendations, and proceed towards checkout with customer approval.
What it does
TrustCart AI is designed to make online shopping more conversational and convenient.
Instead of manually searching through multiple products, users can describe what they need in natural language.
For example:
"I need a laptop under ₹60,000 for Python programming, machine learning, and college projects."
The application helps users:
- Search for products based on their requirements.
- Compare available products and their specifications.
- Receive recommendations with explanations.
- Add selected products to their shopping cart.
- Proceed through a PayPal Sandbox checkout workflow.
- Access order-related information.
An important design principle is that the customer remains in control of every payment. The AI assistant must never independently authorize or capture a payment.
How we built it
I built TrustCart AI using a full-stack architecture.
Frontend
- React
- TypeScript
- Vite
- Tailwind CSS
Backend
- Python
- FastAPI
- Pydantic
- SQLite
AI and Payments
- Groq for AI-powered assistance and tool-based workflows.
- PayPal Orders API Sandbox for the payment workflow.
The frontend provides the shopping experience, while the FastAPI backend handles product operations, cart management, order processing, and payment-related operations.
The AI workflow is designed to connect natural-language requests with product-search and comparison tools. This makes the assistant more than a basic chatbot: it is intended to help users take meaningful steps in the shopping process.
For payments, the application follows a customer-approved checkout approach, with sensitive payment operations handled by the backend.
Challenges we faced
One of the main challenges was connecting multiple parts of the application while keeping their responsibilities separate.
Some important challenges included:
- Handling communication between the frontend and backend across different development ports.
- Making checkout cancellation update the correct application state.
- Ensuring product and cart operations behave consistently.
- Designing payment handling so that customer approval is required.
- Distinguishing simulated test scenarios from actual payment verification.
- Managing external AI and payment integrations that require API credentials.
During testing, we identified and fixed issues involving CORS configuration, checkout cancellation, and an inactive customer-avatar interaction. Regression tests were added to prevent these problems from returning.
The backend test suite currently passes 16 tests, and the frontend production build succeeds.
Live Groq responses and real PayPal Sandbox transactions still require credential configuration and end-to-end verification. We have documented these limitations rather than presenting unverified integrations as completed.
What we learned
Building TrustCart AI helped us understand how to develop a full-stack application that combines AI workflows with real-world business operations.
We learned about:
- Integrating frontend applications with REST APIs.
- Structuring backend services using FastAPI.
- Designing AI assistants around tools and application actions.
- Managing payment workflows with customer approval.
- Handling errors and validating application state.
- Writing regression tests and auditing application functionality.
- Building applications with security and user trust in mind.
Most importantly, we learned that an AI-powered application should not just generate answers. It should help users complete useful tasks while keeping important decisions, especially financial decisions, under their control.
What's next
Our next priorities are to complete live Groq and PayPal Sandbox verification, strengthen authentication and inventory concurrency handling, and continue improving the shopping experience.
TrustCart AI aims to make online shopping smarter, simpler, and more trustworthy – one customer-approved decision at a time.