DEV Community

Dhamith Kumara
Dhamith Kumara Subscriber

Posted on

GemMate AI - A Local AI Sales Assistant for Gemstone Sellers

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

GemMate AI — A Local AI Sales Assistant for Gemstone Sellers

GemMate AI is a local-first AI sales-content assistant built for independent gemstone sellers and small gem businesses.

Gemstone sellers already know the important facts about their stones, but turning those facts into professional content for Facebook, Instagram, WhatsApp, and their websites can be repetitive and time-consuming.

GemMate lets a seller enter the gemstone information once:

  • Gem type
  • Weight
  • Origin
  • Color
  • Clarity
  • Cut
  • Shape
  • Treatment
  • Certificate information
  • Price
  • Additional notes

It then uses Gemma 3 4B running locally through Ollama to generate:

  • Facebook listing
  • Instagram caption
  • WhatsApp sales message
  • Website product description
  • SEO title
  • SEO description

The idea is simple:

Enter the facts once → get professional sales content for multiple channels.

The part I care about most: Fact Guard

AI-generated gemstone content has a serious problem: an AI can confidently invent claims.

For gemstones, an invented claim about treatment, origin, certification, authenticity, rarity, quality, or value can be problematic.

That's why GemMate includes a deterministic Fact Guard layer.

After Gemma generates the content, Fact Guard checks the generated text against the facts provided by the seller.

If it finds an unsupported or contradictory claim, GemMate sends the correction back to Gemma and gives it one opportunity to fix the content.

If it still fails the check, the content is rejected instead of being presented as safe.

The principle is:

AI can write the listing, but the seller's facts remain the source of truth.

GemMate AI interface

Demo

Enter gemstone information

Review the six generated content formats

The demo shows the complete workflow:

  1. Enter gemstone information
  2. Generate content using local Gemma 3 4B
  3. Review the six generated content formats
  4. Fact Guard checks the generated content
  5. Copy the content for the desired sales channel

Note: Gemma 3 4B runs locally, so generation can take a couple of minutes on lower-end hardware.

Code

GitHub: https://github.com/bdhamithkumara/gemmate-ai

GemMate AI is open source.

The repository contains the Next.js application, Gemma/Ollama integration, gemstone validation schemas, Fact Guard, generation API, UI components, and automated tests.

How I Built It

GemMate is built with:

  • Next.js 16
  • TypeScript
  • Tailwind CSS
  • shadcn/ui
  • Zod
  • Vitest
  • Ollama
  • Gemma 3 4B

The core generation flow is:

Gemstone details
       ↓
   Zod validation
       ↓
  Generation API
       ↓
  Local Ollama
       ↓
    Gemma 3 4B
       ↓
 Structured JSON
       ↓
   Zod validation
       ↓
    Fact Guard
       ↓
   ┌───────────────┐
   │ Safe?         │
   └───────┬───────┘
       Yes │ No
           │
       Show result
           │
       Retry once
           │
       Fact Guard
           │
      Pass / Reject
Enter fullscreen mode Exit fullscreen mode

Gemma 3 4B is not just an optional AI feature. It is the core generation engine of the application.

The model runs locally through Ollama rather than sending generation requests to a commercial AI API.

I also kept the AI provider behind an abstraction so the generation layer can be extended with other local models or providers later.

The project uses multiple validation layers:

  1. Validate the seller's gemstone information with Zod.
  2. Ask Gemma to return structured JSON.
  3. Validate the generated response.
  4. Run the generated content through Fact Guard.
  5. Retry once when Fact Guard finds a violation.
  6. Reject the result if it still fails.

This keeps the model responsible for writing, while deterministic application logic remains responsible for checking.

Why Does Open Innovation Matter?

GemMate explores what becomes possible when a small business tool can use an open-weight model locally instead of depending entirely on a closed cloud AI API.

A gemstone business may work with information such as inventory details, prices, certificate information, origin information, and internal product notes.

With local inference, that information does not have to be sent to a commercial AI API simply to generate a product description.

Open innovation also gives me more control.

Because Gemma can run locally through Ollama, I can:

  • Experiment with different models.
  • Modify the prompts.
  • Inspect the application logic.
  • Build domain-specific validation.
  • Run the AI without a per-request commercial API.

This makes it possible for a small developer to build a focused AI product for a specific industry without first building an entire AI infrastructure.

For GemMate, the important distinction is:

Seller → Cloud AI API → Pay for every request
Enter fullscreen mode Exit fullscreen mode

versus:

Seller → Local application → Local Gemma model
Enter fullscreen mode Exit fullscreen mode

Local inference still requires suitable hardware, but it gives the application more control over data, model choice, and operating costs.

That's what open innovation made possible for this project.

Prize Categories

Best Use of Gemma

Gemma 3 4B is the core AI generation engine of GemMate.

It runs locally through Ollama and transforms structured gemstone information into platform-specific sales content.

The use of Gemma is not decorative — local AI is part of the product's value proposition.

Top comments (0)