DEV Community

Deepak Sharma
Deepak Sharma

Posted on

StitchCraft AI: Offline Tailor Job Ticket Generator Powered by Local Gemma

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝


 This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built StitchCraft AI, an offline, privacy-first assistant for my sister, who runs a local tailoring boutique.

Every day, she receives dozens of messy, unstructured WhatsApp messages and audio notes from customers (e.g., "Bhaiya stitch an anarkali kurti, chest 38, waist 34, length 42, 3/4 sleeves, deep neck back with tassels. Needs by this Thursday urgent, fabric provided by customer. Advance paid 500 total 1200.").

This informal intake creates constant friction:

Critical body measurements get lost inside long message histories.

Hand-writing workshop slips wastes hours of productive stitching time.

Delivery deadlines and balance payments easily slip through the cracks.

StitchCraft AI allows her to paste raw conversational order text and instantly generate a standardized, print-ready "Tailor Job Ticket" featuring structured measurements, deadline indicators, design requirements, and balance calculations in seconds.

Demo

Here is the tool parsing a real-world chaotic WhatsApp message into a workshop slip:

Clicking the print button activates built-in @media print styling to isolate only the job card for paper/thermal printing:

Code

đź§µ StitchCraft AI - Tailor Job Slip Generator

Built for Hacktoberfest 2026 Weekend Challenge: "Build for a Friend"
An offline, private, open-source AI assistant designed for neighborhood tailors and boutique owners to turn chaotic WhatsApp messages and voice transcripts into clean, printable workshop slips.


đź’ˇ The Problem

Small boutique tailors receive dozens of unformatted, casual customer orders over WhatsApp every week:

"Bhaiya stitch an anarkali kurti, chest 38, waist 34, length 42, 3/4 sleeves, deep neck back with tassels. Needs by this Thursday urgent, fabric provided by customer. Advance paid 500 total 1200."

Key body measurements get lost in chat histories, delivery deadlines slip, and manually handwriting paper tickets takes away creative sewing time.

🛡️ Why Open-Source AI?

  • 100% Data Privacy: Body measurements and personal customer contact numbers never leave the local workshop device.
  • Zero API Costs: Micro-businesses operate on tight margins and cannot afford monthly proprietary token subscriptions. Running…

The project is built as a self-contained single-file Streamlit application (app.py) for lightweight local execution.

How I Built It

StitchCraft AI is powered entirely by an open-source AI core:

Open-Weight Core: The system runs Google's Gemma 2 (2B) locally via Ollama (http://localhost:11434/api/generate).

Structured JSON Parsing: The application feeds raw conversational inputs into a strict zero-shot extraction prompt, enforcing a typed schema covering customer details, 8+ body measurements, fabric sources, deadlines, and pricing.

Resilient Sanitation: A regex cleaning layer strips formatting artifacts or markdown fences to guarantee consistent JSON deserialization.

Single-Page UI & Print Pipeline: Built with Streamlit and customized CSS with @media print rules, allowing the user to print or save the ticket as a PDF directly via standard browser print dialogs (window.parent.print()) without external PDF libraries.

Why Does Open Innovation Matter?

Neighborhood artisans and small business owners face specific constraints where closed-source APIs fail:

Client Privacy: Customer body measurements and personal contact details never leave the boutique's machine, keeping personal customer data completely private.

Zero Operating Cost: Independent tailors operate on thin margins and cannot sustain monthly proprietary API bills or recurring subscriptions. Open-weight models offer zero ongoing software expenses.

True Offline Independence: Workshop spaces often encounter intermittent internet connectivity. An open-source model running on local consumer hardware guarantees uninterrupted daily work without an active internet connection.

My Agent Session

The project was scaffolded, debugged, and styled interactively directly inside the VS Code terminal using the Claude Code CLI paired with an Ollama cloud model runner (ollama launch claude --model gpt-oss:20b-cloud), allowing rapid end-to-end iteration from architecture prompt to production-ready script in under a day.

Prize Categories

Best Use of Gemma

Top comments (0)