Giftly – AI-Powered Gift Shopping & Smart PayPal Checkout
Inspiration
Finding the perfect gift is often harder than it sounds. People frequently struggle to choose something meaningful because they do not know what to buy, how to match a gift to someone's interests, or how to stay within a specific budget.
Traditional online shopping platforms usually require customers to browse through hundreds of products, compare prices, and make decisions themselves. We wanted to make this experience more personal, intelligent, and convenient.
That inspired us to build Giftly, an AI-powered gift shopping assistant that transforms a simple description of a person into personalized gift recommendations and a streamlined checkout experience.
Our goal was to bring together conversational AI and digital payments to demonstrate how shopping can become more intuitive when AI helps customers make purchasing decisions.
What It Does
Giftly allows customers to describe the person they are buying a gift for, including their interests, preferences, and budget.
Using Google Gemini AI, Giftly generates personalized gift recommendations based on the available product catalogue. It helps customers discover relevant products and choose gift combinations that fit their budget.
The application includes several key capabilities:
- AI-Powered Gift Recommendations: Customers can describe the recipient and their interests in natural language. Gemini AI helps generate relevant recommendations from the available catalogue.
- Budget-Aware Shopping: Customers can specify a spending limit and receive recommendations designed around their budget.
- Product Catalogue: Giftly provides a curated catalogue containing products across categories such as technology, books, art, fitness, food, photography, travel, and lifestyle.
- Gift Bundle Selection: Customers can select recommended products and purchase them together as a gift bundle.
- Secure Checkout with PayPal Sandbox: Customers can proceed to PayPal checkout, approve a test payment, and return to Giftly after payment capture.
- Seller Dashboard: Sellers can access a password-protected workspace to review orders, monitor sales analytics, and manage product settings.
- AI-Generated Seller Insights: Gemini AI also supports the seller experience by generating insights from business and order information.
- Product Accounting: Sellers can configure product purchase costs and tax settings. Giftly uses these settings for server-side order calculations and seller accounting views.
How We Built It
We built Giftly as a web application using Node.js and Express for the backend, with HTML, CSS, and JavaScript powering the frontend.
The project combines two important technologies: Google Gemini AI for intelligent shopping assistance and the PayPal REST API for payment processing.
AI Integration – Google Gemini
We integrated Google's Gemini API using the @google/genai SDK.
Gemini powers the gift recommendation experience, interpreting customers' requests and helping match their requirements with products in Giftly's catalogue.
The AI integration also supports the seller dashboard by generating business insights from available order and accounting information.
This allows AI to contribute to both sides of the shopping experience: helping customers choose gifts and helping sellers understand their business.
Payment Integration – PayPal Developer Platform
We integrated the PayPal REST API using the PayPal Sandbox environment.
The payment workflow includes:
- A customer selects a gift or recommended bundle.
- Giftly validates the selected product IDs and quantities on the backend.
- The server calculates product prices, applicable demo taxes, and the final checkout total.
- Giftly authenticates with PayPal using server-side Sandbox credentials.
- The backend creates a PayPal order.
- The customer is redirected through PayPal's approval experience.
- Giftly captures the approved order through PayPal.
- The application records the successfully captured order for seller-side reporting.
An important design decision was to perform product validation and price calculations on the server rather than trusting totals submitted by the browser.
This helps prevent customers from manipulating product prices or checkout totals through frontend requests.
Seller Authentication and Business Management
We implemented a password-protected seller area using Express middleware.
Seller passwords are verified using Node.js crypto.scrypt with timing-safe comparison. Sessions use HTTP-only cookies, and state-changing seller requests are protected with CSRF tokens.
The seller workspace provides order history, analytics, product accounting settings, and AI-generated insights.
Data Storage
For this hackathon prototype, we used JSON-file persistence for orders and product accounting settings. This keeps the application straightforward to configure, run, and evaluate.
API credentials and sensitive configuration values are managed through environment variables using dotenv.
Challenges We Ran Into
One of our main challenges was connecting AI-powered product recommendations with a reliable payment workflow.
An AI recommendation should not automatically be treated as a valid transaction. The selected products, quantities, prices, and final total must be independently validated before payment processing.
We addressed this by separating the recommendation experience from the backend checkout logic. Gemini helps customers discover products, while the server independently validates selections and calculates the amount sent to PayPal.
Another challenge was coordinating PayPal's order creation, buyer approval, and payment capture stages. We needed to ensure that an order was recorded as paid only after a successful capture response.
We also worked on implementing seller authentication and protecting sensitive seller operations. Password hashing, HTTP-only session cookies, and CSRF protection helped strengthen the security of the seller workspace.
Finally, making the customer and seller experiences work together required us to think beyond a simple shopping interface. We wanted to demonstrate both the purchasing journey and the operational information that a seller needs after an order is completed.
What We Learned
Building Giftly helped us understand how AI and payment infrastructure can work together in a practical application.
We learned that AI is most useful when it is connected to a real workflow rather than being an isolated chatbot. Gemini can help users make decisions, but important commercial operations such as price calculation, product validation, and payment capture must remain controlled by the backend.
We also gained practical experience with the PayPal Developer Platform, including Sandbox authentication, order creation, buyer approval, and payment capture.
Another important lesson was that a useful commerce application needs to consider both the customer experience and the seller's operational needs.
What's Next for Giftly
Giftly is currently a functional hackathon prototype using PayPal Sandbox and a curated product catalogue.
There is considerable room to extend the platform:
- Integrate larger and more diverse product catalogues.
- Improve personalization using customer preferences and shopping history.
- Introduce more advanced AI-powered bundle recommendations.
- Expand seller analytics and business forecasting.
- Replace JSON-file persistence with a production-grade database.
- Introduce production-ready authentication, payment monitoring, and deployment infrastructure.
- Explore more conversational shopping experiences where customers can refine recommendations through natural language.
Our vision is to make gift shopping less stressful and more personal by combining intelligent recommendations with a straightforward payment experience.
Giftly brings AI-powered discovery and PayPal-powered checkout together to make giving easier.
Built With
- ai
- api
- application
- artificial
- assistant
- css
- dotenv
- e-commerce
- express.js
- gemini
- generative
- html
- integration
- intelligence
- javascript
- json
- node.js
- payment
- paypal
- rest
- shopping
- web