DEV Community

Cover image for ๐Ÿงพ Munshi โ€” Turning Everyday Grocery Orders into Bills with Local AI
Pratyush Mishra
Pratyush Mishra

Posted on

๐Ÿงพ Munshi โ€” Turning Everyday Grocery Orders into Bills with Local AI

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission ๐Ÿ’ธ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

Munshi โ€” Local AI Grocery Billing is a grocery billing assistant that converts natural-language orders into itemized bills using locally running AI.

Small grocery and snack shops often handle orders informally, then manually search for products, enter quantities, and calculate totals. Munshi aims to simplify this workflow.

With Munshi, a shopkeeper can enter an order in everyday language. The application extracts product details, matches them against a CSV-based price catalog, and generates a bill containing product names, quantities, prices, and the final total.

The goal is to help small businesses simplify repetitive billing without making a hosted AI API a requirement.

โœจ Key Features

  • ๐Ÿ—ฃ๏ธ Natural-language order processing: Describe an order in everyday language.
  • ๐Ÿค– Local AI inference: Uses Ollama with Qwen 3.5 4B for order extraction.
  • ๐Ÿ›’ Catalog-based product matching: Matches extracted products against a CSV price list.
  • ๐Ÿงฎ Automatic bill calculation: Calculates quantities, rates, line totals, and the final amount.
  • โš ๏ธ Unmatched-product handling: Identifies products that need review.
  • ๐ŸŒ Interactive web interface: A Streamlit UI makes the workflow accessible.
  • ๐Ÿงช Automated testing: Includes tests for billing, catalog matching, extraction, and order processing.

The intended users are small grocery shops, snack shops, and independent shopkeepers who want a simpler billing workflow.

๐Ÿ‘€ Product Walkthrough

Here is the workflow, from opening the application to reviewing a generated bill.

1. Start with a clean order screen

Munshi grocery billing interface before an order is entered

The clean interface gives the shopkeeper a starting point to enter an order and begin the billing workflow.

2. Enter an order for snacks

A natural-language snack order entered into the Munshi billing application

The shopkeeper describes the requested items in ordinary language. Munshi uses its local AI model to extract the order details and attempts to match the products against the available catalog.

The key interaction is that the user describes the order naturally instead of manually building every line of the bill.

3. Generate and review the bill

Munshi itemized grocery bill showing product quantities, prices, and the final total

The application displays the matched products, quantities, prices, and calculated total. Products that cannot be matched confidently should be reviewed before the bill is accepted.

This is the core idea behind Munshi: turn an ordinary sentence into a structured bill through a practical combination of AI and conventional application logic.

Demo

Munshi currently runs locally using Streamlit and Ollama.

To launch the application, run:

python -m streamlit run app.py
Enter fullscreen mode Exit fullscreen mode

Then open http://localhost:8501 in your browser.

The three screenshots in this post demonstrate the interface, order entry, and generated bill. Munshi is currently a local application, so I am sharing the source code rather than claiming a publicly deployed demo.

Code

GitHub Repository: munshi-smart-grocery-billing

The repository contains the Streamlit application, order-processing modules, product price catalog, dependency list, and automated tests.

Contributions and suggestions for improving product matching, multilingual order entry, and local AI reliability are welcome.

How I Built It

Munshi combines an open-weight language model with conventional Python application logic.

Technology Stack

  • Python โ€” application and order-processing logic
  • Streamlit โ€” interactive web interface
  • Ollama โ€” local model runtime
  • Qwen 3.5 4B โ€” open-weight model for extracting order information
  • Pandas and CSV โ€” product catalog management
  • Pytest โ€” automated testing

How the System Works

  1. The shopkeeper enters a grocery order in natural language.
  2. Qwen 3.5 4B, running locally through Ollama, extracts structured order details.
  3. The application matches extracted product names against the CSV catalog.
  4. Python billing logic calculates the line totals and final amount.
  5. Streamlit displays the generated bill for review.

A key design decision was to use AI for understanding the order and ordinary application code for catalog matching and arithmetic. This keeps billing calculations testable rather than relying on the language model to calculate prices correctly.

During development, the project's test suite passed 14 tests locally.

Why Does Open Innovation Matter?

A small-shop billing tool should not necessarily require a paid AI API, a constant internet connection for model inference, or sending order text to a third-party model provider.

Open-weight models and local inference make another approach possible.

By using Ollama with Qwen 3.5 4B, Munshi can perform its order-extraction workflow on the shopkeeper's own computer without requiring a hosted LLM API. This makes experimentation more accessible and gives developers greater control over the model and deployment environment.

Open innovation also allows other developers to inspect, modify, and extend the project. They could adapt the catalog to local products, improve fuzzy matching, add regional-language support, or introduce printable receipts and billing history.

Local inference does not automatically guarantee privacy or perfect accuracy, and product matches still need appropriate validation. However, it provides a useful foundation for building practical AI tools without making hosted inference a requirement.

For me, open innovation is about more than accessing a model's weights. It is about using accessible technology to build tools that solve everyday problems.

Prize Categories

Submitting Munshi to the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

๐Ÿš€ What's Next?

There is plenty of room to grow Munshi:

  • ๐ŸŒ Support more regional and Indian-language grocery orders.
  • ๐Ÿ” Improve product matching for misspellings and locally used product names.
  • โœ๏ธ Add editable quantities and a bill-confirmation step.
  • ๐Ÿงพ Introduce printable receipts and persistent billing history.
  • ๐Ÿ“Š Evaluate extraction accuracy against a collection of realistic grocery orders.
  • ๐Ÿ› ๏ธ Make setup easier for shopkeepers who are not technical users.

The long-term vision is to build a simple, affordable, local-first billing assistant that helps small shops spend less time on repetitive manual entry.

๐Ÿ™Œ Final Thoughts

Building Munshi helped me explore how an open-weight model can fit into a practical application rather than remain just a chat interface.

The interesting part was not simply connecting an LLM. It was combining natural-language understanding with a product catalog, predictable calculations, a usable interface, and automated tests.

That is the kind of practical open-source AI I want to keep building: useful, inspectable, and accessible to more people.

If you have suggestions for improving local AI billing, I'd love to hear them!

Explore the code: munshi-smart-grocery-billing

Top comments (0)