Build it

•

9 min read

Rohlik Smart Suggest

A Chrome extension that watches your grocery basket and suggests what you're probably missing, using Groq and Rohlik's own product catalog.

I built this because I kept forgetting things. I'd add pasta to my Rohlik basket, check out, and only realize at dinner that I had no sauce. The fix felt obvious: when I add something, tell me what I'm probably missing.

The extension does exactly that. Add an item to your basket, and a small card appears bottom-right with one suggestion pulled from Rohlik's live product catalog. It dismisses on its own after 18 seconds. It doesn't block the product you just added. I've been using it since I built it and I find myself clicking through to add the suggestion roughly half the time, which is more than I expected.

The problem

Online grocery shopping has no spatial memory. In a physical store, you walk past the pasta shelf and the sauce catches your eye. Online, you work from a list and the list has gaps. Rohlik surfaces promotions and category pages but nothing context-aware at the moment you're building a meal in your head.

How I worked

I came up with the idea and wanted to test whether it was actually buildable. This was my first time combining a Chrome extension with an AI-powered feature, so I built it in a conversation with Claude Code. I directed every product decision: no Rohlik sign-in required inside the extension, one confident suggestion not a list, the popup out of the way. Claude Code wrote the implementation.

The code authorship is worth naming honestly. I described what I wanted, challenged approaches I didn't like (we scrapped a version that required Rohlik authentication and simplified), and verified the result worked on the actual site. The product thinking was mine. The TypeScript was not.

How it works

When you add an item to your basket, Rohlik's frontend makes a POST request to their cart API. A script injected into the page intercepts that network call and extracts the product name. That name goes to a Node.js backend, which asks Groq's Llama 3.1 8B: "Someone is buying tomatoes. Name one thing they most likely also need." Groq replies in under 300ms.

The backend then calls Rohlik's MCP server with that suggestion. The MCP server searches Rohlik's live catalog and returns the real product: name, image, and price. That's what appears in the popup. If the MCP call fails, it falls back to a direct rohlik.cz search. If that fails, it shows the AI suggestion with a link to search manually.

The hard part

Getting the Groq integration running took longer than expected. I originally planned to use the Anthropic API since I pay for Claude Pro, but the Claude Pro subscription doesn't include API access. It's a chat product. The API is separate, with separate billing. I switched to Groq because it has a free tier and the key is available immediately.

Once I had a key, the actual integration was straightforward. The friction was understanding the billing structure of AI providers, which is genuinely confusing the first time you hit it.

What I'm proud of

The response time is under two seconds end to end. That covers the network interception, the Groq call, the MCP catalog lookup, and rendering the card. It's fast enough that the popup feels like part of the shopping experience rather than an afterthought dropped onto the page.

The placement took some tuning. Bottom-right, fixed, auto-dismissing after 18 seconds. An earlier version dismissed after 8 seconds, which was too short to read and click. 18 gives you time to actually look at the suggestion and decide. It also doesn't fight with Rohlik's own cart UI, which lives at the top right.

What's next

Right now the extension suggests one product. I'd like to show three in a small row below the "you added X" notice. One suggestion is clean and confident, but three would let you scan and pick the one that fits what you're cooking. The architecture supports it already: increase the limit on the MCP search call and render the extra cards.

The other thing worth testing is using Rohlik's order history through the MCP. The current prompt is generic. With history, the suggestion for pasta could be different for someone who cooks Italian regularly versus someone buying it for the first time.

© 2026 Petr Ševcovic.

© 2026 Petr Ševcovic.

Create a free website with Framer, the website builder loved by startups, designers and agencies.