Inspiration 💡
High school and most college courses don't teach you how to invest and what stocks to buy. Yet everyone around you won't stop talking about how important it is to make financial investments. StockSwap is here to help students meet their financial goals by helping them choose stocks that meet their budget, showing them different portfolio strategies, and simultaneously preventing unnecessary expenditures. 💰
What it does 🚀
StockSwap is a Chrome extension that anyone can easily install. The user can enter their financial goals, and our application will keep track of their progress.
Whenever the user navigates to any online shopping platform (Amazon, eBay, etc.), StockSwap keeps track of products that the user may buy. When they click on the icon with the product's price on the top right of their screen, StockSwap will find similarly priced stocks that are suitable for the user to buy. Then, it will calculate potential profits that can be gained from investing in said stock, with different numbers based on varying portfolio strategies. 📈
How we built it ⚙️
StockSwap was built as a Chrome extension using HTML, CSS, and JavaScript with Manifest V3.
The extension integrates two powerful APIs: Cohere AI API for intelligent stock suggestions based on product categories, and RBC InvestEase API for real-time portfolio simulations and investment calculations.
The architecture includes:
- Content scripts that detect shopping sites like Amazon, eBay, and Walmart to extract product information 🛒
- Background service worker that handles API communications and data processing
- Modal UI that displays investment alternatives directly on shopping pages
- Chrome storage for persisting user data and API credentials 💾
Challenges we ran into 😅
One of the major challenges we encountered was having to discard our original project idea and start from scratch on the second day of Hack the North 2025. Our initial plan was to create a desktop application similar to Scratch but targeted towards adults rather than children. However, after encountering multiple issues with the library we used, such as many things being hardcoded, our team realized that pivoting was necessary. 🔄
Additionally, we faced significant technical challenges:
- API Integration Issues: The RBC InvestEase API had database consistency problems where portfolios would be created successfully, but couldn't be found by the simulation endpoints, requiring us to implement complex retry mechanisms and fallback strategies 🔧
- Chrome Extension Security: Working with Manifest V3's strict security policies while integrating external APIs required careful handling of permissions and content security policies 🔒
- Cross-Site Compatibility: Making the extension work reliably across different shopping sites (Amazon, eBay, Walmart), each with unique DOM structures and styling
- Real-time Data Processing: Parsing product information and generating contextually relevant stock suggestions in real-time while maintaining good performance ⚡
Accomplishments that we're proud of 🎉
We are very proud of completing and submitting a fully functioning project despite the pivot and technical challenges. We successfully created:
- A working Chrome extension that intelligently detects shopping behavior across major e-commerce sites ✨
- Smart AI integration with contextually relevant stock suggestions (e.g., suggesting NVDA and AMD for gaming products) 🤖
- Real-time portfolio simulations showing users exactly how their money could grow through investing instead of spending 📊
- Seamless user experience with floating action buttons and modal interfaces that don't disrupt shopping
- Robust error handling with graceful fallbacks when APIs fail, ensuring the extension always provides value 🛡️
- Educational content generation that explains investment concepts in beginner-friendly terms 📚
What we learned 🧠
- Chrome Extension Development: Manifest V3 architecture, content script injection, and cross-origin API communication
- Team Collaboration: Importance of staying flexible with project scope under pressure 🤝
- API Integration: Best practices for handling unreliable third-party services with retry mechanisms and fallback strategies
- Financial Technology: Portfolio theory, risk management, and making investment education accessible to beginners 💼
- UX Design: Designing non-intrusive, functional browser extension interfaces 🎨
What's next for StockSwap 🌟
We plan to expand StockSwap with several exciting features:
- Interactive Charts & Graphs: Visual representations of historical stock performance and projected growth trends 📈
- Personalized Spending Analytics: Track users' avoided purchases over time and show cumulative savings with portfolio growth projections 📋
- Social Features: Let users share achievements and compare strategies with friends 👥
- Advanced Investment Education: Interactive tutorials, risk quizzes, and personalized learning paths 🎓
- Mobile App Companion: Extend the experience beyond desktop browsing to mobile shopping apps 📱
- Real Brokerage Integration: Partner with platforms to execute investment suggestions 🔗
- Gamification Elements: Badges, streaks, and milestones to encourage smart behavior 🏆
- AI-Powered Financial Coaching: Smarter recommendations based on user spending patterns and goals 🎯
Our long-term vision is to transform StockSwap into a comprehensive financial wellness platform that helps young adults build wealth through conscious spending decisions and accessible investment education. 🌱
Built With
- cohereai
- css
- html
- javascript
- manifestv3
- rbcinvestease

Log in or sign up for Devpost to join the conversation.