DEV Community

Rohan Sonu Bablani
Rohan Sonu Bablani

Posted on

Stocklytics AI: An Open-Weight AI Assistant for Small Retail Businesses

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

Small retail businesses have to manage inventory, billing, customer records, stock alerts, and sales analytics—often across disconnected tools.

What if a shop owner could manage these operations in one place and ask questions about their business in plain language?

That's the problem Stocklytics AI is designed to solve.

It's a retail operations platform for small and medium-sized stores, combining everyday business workflows with an AI assistant grounded in store data.

What can it do?

  • Inventory management: Create products, adjust stock, and monitor reorder thresholds.
  • Billing: Record transactions and update inventory when products are sold.
  • Customer management: Keep customer profiles and purchase histories together.
  • Smart alerts: Surface low-stock products, expiry risks, high-demand items, and products that aren't selling.
  • Analytics: Explore sales trends, product performance, and customer insights.
  • AI retail assistant: Ask operational questions and receive answers grounded in inventory, transactions, customers, alerts, and analytics.

Instead of manually checking multiple screens and records, a store operator can ask questions such as:

  • Which products are running low?
  • What should I consider restocking?
  • Which products are performing best?
  • Are any items approaching their expiry dates?
  • What has changed in the business?

The goal is to make useful business intelligence more accessible to retailers who don't have an enterprise software budget or a dedicated data team.

Who would pay for it?

The intended customers are independent shop owners, small grocery and convenience stores, and specialist retailers.

A potential business model is a subscription priced per store, with different tiers for inventory size, analytics, or multiple locations.

This is a proposed business model, not a claim that Stocklytics AI already has paying customers. The next step would be to validate the workflow and pricing with real shop owners.

Demo

🎥 Demo video: https://youtu.be/e9IBF1SQq4Q

🌐 Deployed application: https://stocklytics-frontend-hpcb3ng5ra-el.a.run.app/

Code

💻 Repository for this submission:

GitHub logo Golixco / StocklyticsAI

Stocklytics AI is a retail operations platform for small and medium stores. It combines inventory management, billing, customer records, alerts, analytics, and a grounded AI assistant in one workspace built for day-to-day store operations.

Stocklytics AI

Stocklytics AI is a retail operations platform for small and medium stores. It combines inventory management, billing, customer records, alerts, analytics, and a grounded AI assistant in one workspace built for day-to-day store operations.

The project is implemented as a modular monolith backend with a modern Next.js frontend, and it is designed to run well on Google Cloud using Firestore, BigQuery, Cloud Run, and local Gemma open models.

Project Links

Table of Contents

Hackathon Journey

The Genesis: Google Solution Challenge

Stocklytics AI was originally built for the Solution Challenge by Hack2skill and Google. In its initial version, the platform relied heavily on cloud-based AI, specifically…

📂 Primary project repository referenced in the README: https://github.com/ShreyData/Stocklytics-AI

The codebase is organized into a Next.js frontend, a FastAPI backend, retail domain modules, AI services, tests, and deployment resources.

How I Built It

Stocklytics AI combines a modern web application with a retrieval-grounded AI workflow.

The technology stack

Frontend

  • Next.js 15
  • React 19
  • TypeScript
  • Tailwind CSS

Backend

  • Python and FastAPI
  • Pydantic for request and response validation
  • Firebase Authentication
  • Cloud Firestore for operational records
  • BigQuery for analytics and vector-search workflows

Open-weight AI

  • google/gemma-4-4b-it for AI response generation
  • sentence-transformers/all-MiniLM-L6-v2 for embeddings

How the AI assistant works

The assistant is designed around the store's actual operational context rather than functioning as a generic chatbot.

At a high level, its workflow is:

  1. Detect the intent behind the user's question.
  2. Load the relevant operational context.
  3. Retrieve supporting evidence from store records and analytics.
  4. Construct a prompt using that evidence.
  5. Generate a response with the configured Gemma model.
  6. Normalize and persist the response and conversation history.

For example, a question about restocking should be answered using the available stock levels and relevant business context—not simply from the model's general knowledge.

This grounding is important because retail decisions need to be connected to actual business records.

Why use a small open-weight model?

A retail assistant does not necessarily need a large, expensive, general-purpose hosted model for every question.

Using a compact open-weight model creates room to control the inference environment, experiment with model configurations, and potentially keep AI inference costs predictable as the product grows.

The application still uses cloud infrastructure for its operational data and deployment. Using an open-weight model does not automatically make the entire application offline or keep all business data on a shop owner's laptop.

Why Does Open Innovation Matter?

For a small business, AI is only useful if it is affordable, dependable, and practical to operate.

A powerful assistant can become difficult to sustain if every business question depends on a paid external AI API with costs and terms controlled by another provider.

Open-weight models offer a different path.

1. More control over costs

The developer can choose where to run inference and optimize the model and hardware configuration around the workload. That gives the product more options than relying exclusively on a third-party hosted model.

2. Less dependence on a closed AI provider

A model can potentially be replaced or reconfigured without redesigning the entire retail platform. This creates more flexibility as models, infrastructure, and business requirements change.

3. More control over AI behaviour

An open-weight model gives developers opportunities to experiment with prompting, retrieval, evaluation, and model customization for retail-specific tasks.

4. A more accessible starting point

Small retailers don't need to build their own machine-learning infrastructure. An application can bring AI-assisted workflows into the tools they already use to manage their business.

For Stocklytics AI, open innovation is about making the AI layer more adaptable and giving the product room to evolve without being tied entirely to a single closed-model API.

The objective isn't to use AI just because it's available. It's to use it where it can make a real operational task easier.

Prize Categories

Best Use of Gemma — the repository documents the use of Google's Gemma open-weight model for the retail assistant.

Closing Thoughts

A small shop may not need an enterprise data team, a complicated analytics platform, or an expensive AI subscription to begin getting value from its own business data.

It needs practical answers to practical questions.

Stocklytics AI explores how inventory management, billing, analytics, and a data-grounded open-weight AI assistant can work together to support those everyday decisions.

The long-term goal is simple: make useful AI-assisted business operations accessible to the retailers who could benefit from them.

Top comments (0)