Inspiration
Online shopping often involves searching through multiple websites, comparing products, checking prices, and deciding which option best matches our needs. This process can be time-consuming and confusing, especially when users have a specific budget or requirements.
We wanted to simplify this experience by building an intelligent shopping assistant that understands natural language, provides personalized product recommendations, and makes the shopping and payment process easier. This inspired us to create CartPilot AI – Intelligent Shopping & Payment Agent.
What it does
CartPilot AI is an AI-powered shopping assistant that helps users discover, compare, and purchase products through a conversational interface.
Users can simply describe what they are looking for, including their preferred category, budget, and requirements. The AI understands their intent and searches the product database to provide relevant recommendations.
Key features include:
- Natural Language Shopping: Understands shopping requests written in everyday language.
- Smart Product Recommendations: Finds and ranks products based on the user's budget and preferences.
- Product Comparison: Helps users compare products and understand their features.
- AI-Powered Assistance: Provides conversational explanations and answers follow-up questions.
- Cart Management: Allows users to add products to their cart and view the total.
- PayPal Sandbox Checkout: Enables users to proceed through a secure test payment flow using PayPal Sandbox.
- Payment Verification: Validates order details on the backend and confirms payment only after successful capture verification.
How we built it
We built CartPilot AI using a full-stack architecture that connects an interactive frontend, a backend API, an AI service, a product database, and a payment gateway.
Technologies used:
- Frontend: React.js, Vite, JavaScript, Axios, and CSS.
- Backend: Python and FastAPI.
- Database: SQLite with SQLAlchemy for storing and managing product information.
- AI Integration: Google Gemini API for understanding user requests, extracting shopping preferences, and generating conversational responses.
- Payment Integration: PayPal REST API Sandbox for order creation, buyer approval, and payment capture.
- Development Tools: Visual Studio Code, Git, and GitHub.
When a user enters a shopping request, Gemini helps understand the intent and extract relevant requirements. The backend then searches the actual product database, filters and ranks matching products, and returns recommendations to the frontend.
Users can compare products, add items to their cart, and proceed to checkout. Before creating a payment order, the backend independently validates product prices, availability, and the order total. PayPal Sandbox handles the test payment process, while the backend verifies the captured payment before confirming the transaction.
Challenges we ran into
During development, we faced several technical challenges:
- Understanding Natural Language: Converting different user shopping requests into structured product requirements was challenging.
- Accurate Recommendations: Ensuring that recommendations were based on real database products rather than AI-generated or invented product information required careful backend validation.
- Frontend and Backend Integration: Connecting the React frontend with FastAPI endpoints and handling API responses and errors required debugging.
- PayPal Integration: Understanding the PayPal Sandbox authentication, order creation, approval, and capture workflow took time.
- Payment Security: Ensuring that prices and payment amounts were calculated and validated on the backend was important to avoid trusting frontend values.
- End-to-End Testing: Testing the complete journey, from entering a shopping request to receiving payment confirmation, required attention to each stage.
Accomplishments that we're proud of
We are proud to have developed a working AI-powered shopping experience that brings product discovery, comparison, cart management, and payment into one application.
Our major accomplishments include:
- Built a conversational AI shopping assistant using Google Gemini.
- Implemented natural-language understanding for shopping requirements.
- Connected AI-based intent extraction with a real SQLite product catalog.
- Developed relevant product recommendations and product comparison functionality.
- Implemented cart management and automatic total calculation.
- Integrated PayPal Sandbox for the checkout and payment workflow.
- Added backend validation for product prices, stock availability, and payment details.
- Implemented payment capture verification before confirming successful transactions.
- Successfully integrated multiple technologies into one end-to-end full-stack application.
What we learned
Building CartPilot AI helped us gain practical experience in full-stack development and AI integration.
We learned how to integrate a generative AI model into a real-world application, convert natural-language requests into structured data, and use database-driven logic to provide reliable recommendations.
We also improved our understanding of REST APIs, FastAPI, React, SQLite, SQLAlchemy, environment variables, and third-party payment gateway integration. Working with PayPal Sandbox helped us understand the importance of server-side validation, secure payment handling, and transaction verification.
Most importantly, we learned how to connect different technologies to solve a practical problem and turn an idea into a functional application.
What's next for CartPilot AI – Intelligent Shopping & Payment Agent
We aim to make CartPilot AI a more intelligent, personalized, and scalable shopping platform.
Our future plans include:
- Live Product Integration: Connect with real e-commerce platforms and live product catalogs.
- Personalized Recommendations: Learn from user preferences and shopping history to improve recommendations.
- Advanced Product Comparison: Provide detailed comparisons of specifications, features, prices, and ratings.
- User Accounts: Introduce secure user authentication and personalized profiles.
- Order History: Allow users to track previous orders and payment records.
- Multiple Payment Options: Explore additional payment gateways and currencies.
- Smarter AI Assistance: Improve conversational understanding and provide more context-aware shopping suggestions.
Our long-term vision is to transform CartPilot AI into a reliable intelligent shopping companion that makes online shopping simpler, smarter, and more convenient.
Built With
- ai
- api
- axios
- gemini
- generative
- generative-ai
- git
- google-gemini-api
- javascript
- react
- rest
- rest-api
- sandbox