A time last year January, after arriving in Kigali for schooling, I went to the supermarket to get some stuff, now the first supermarket I went to sold a particular item for RWF 22,000, it was a lot, so I decided to visit another supermarket that was close by to check for same item. It was cheaper at RWF 20,000, but then again, I figured I could still check one more supermarket, which was a bit far but still walkable, so I went. It turned out that the item was being sold at this last supermarket at RWF 18,000, which was way cheaper than the first 2, causing me to save RWF 4,000 compared to the first supermarket. This experience taught me a lot about what to consider before going to the supermarket, unfortunately that was the only time I had to move from one supermarket to the other to get an item at a cheaper rate because it wasn't something I could continue doing considering my nature of work and studies and seeing there was no other way be it online or manually to go about product price and availability discovery, I figured I could build a platform powered by AI to make the supermarket experience more cost-effective.
Cartna transforms grocery shopping into a seamless, AI-driven experience. Customers can speak, type, or even enter their entire shopping list. The system then uses a Natural Language Processing(NLP) engine to extract product details from the input. Once processed, it searches a comprehensive MongoDB-backed database of products aggregated from various supermarket branches using Atlas Search, ensuring that even informal queries or handwritten lists yield accurate matches.
For each requested item, the platform compares prices across local supermarkets and automatically selects the cheapest option, adding it to the user’s cart. This not only saves customers time and money but also provides valuable data insights for supermarkets on competitive pricing and consumer demand. In essence, our solution simplifies the shopping process, making it faster, smarter, and more cost-effective for everyone involved.
We built it using modern, open-source technologies that work seamlessly together. Our backend is developed in Node.js with Express.js, while our product data is stored in MongoDB on Atlas. We leverage MongoDB Atlas Search to index and query our comprehensive products collection, ensuring fast and accurate retrieval even with informal natural language queries.
On the user input side, we integrated multiple free services. For text queries, we use an NLP engine (nlp.js) to extract keywords and price constraints. For voice commands, we utilize the Web Speech API to transcribe spoken words into text. Once the input is processed, we query the products database, sort results by price, and automatically add the cheapest items to the cart. Our frontend is built with Next.js, React, and custom CSS, providing a responsive and intuitive experience for Rwandan users.
The challenges we encountered were mostly figuring out how to implement a speech recognition system and interact with the database to get the desired results based on the user query. However, we were able to overcome these challenges with contextual prompting for solutions and services thanks to both David and myself. One major challenge we has was getting the cart functionality to work, at first we made the updating of a cart item to be connected to the backend which in turn was affecting the value of other items in the cart, thankfully David figured we could handle the updating of a cart item locally and the cart item value only updates on the database when the user proceeds to checkout, an approach that work perfectly well for us.
Getting the user's typed query successfully processed by an NLP engine and returning the desired results, and getting the speech recognition system working.
One major learning from working on this project is the fact that things can be done in as much as one puts their mind into doing them. We had our doubts at first about being able to build this product, we figured it would be difficult and considering our little experience, we wouldn't be able to do much, but we did anyways, and we got the major parts of the product working with perfect collaboration between myself and David, with me focusing on the development majorly and David on the research and pitch deck. Honestly, thanks to the organizers of this hackathon for helping us realize this.
Cartna's next step is to contact local supermarkets for partnerships, fully develop the supermarket front end, incorporate localization for the buyer's end by allowing transcription from Kiryanwand to English and vice versa.

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