SN
Soban Bin NadeemAI SYSTEMS ARCHITECT
BACK TO ALL 8 PRODUCTION SYSTEMS
VERIFIED PRODUCTION CODEBASE
Full-Stack AI / Voice Agent & E-Commerce AutomationMultilingual Voice AI

ThriftPulse

Internal Repository Tag:Thrift Sneaker OS

The intelligent operating system for thrift sneaker stores: automated browser-compressed order intake (~300KB), dual-write Google Sheets sync, 80mm thermal waybills, and Roman Urdu voice assistant.

ThriftPulse Interface
PRODUCTION INTERFACES & WORKFLOW VIEWS2 Captures
80mm Thermal Receipt Waybill & Mobile Buyer Order Interface
[01]80mm Thermal Receipt Waybill & Mobile Buyer Order Interface
Multi-Language WhatsApp Voice Notes & Owner Order Alerts
[02]Multi-Language WhatsApp Voice Notes & Owner Order Alerts
SYSTEM TELEMETRY & SPECIFICATIONProduction Architecture
RoleLead Systems Architect & Full-Stack AI Engineer
Primary FocusVoice-Enabled Order OS, Client-Side Compression & Thermal Waybills
Integrations
Groq WhisperFastAPISQLiteGoogle Sheets APIMeta WhatsApp APIfaster-whisper
[01]THE BUSINESS & TECHNICAL CHALLENGE

The Problem Context

Pre-loved sneaker & thrift fashion businesses operate through chaotic manual workflows across WhatsApp and Instagram. Store owners struggle with manual address transcription, phone number copying while on the move, searching through hundreds of unindexed shoe photos, and lack automated thermal waybills for dispatch riders.

⚠ Why This Was Technically Difficult:
  • ›Phone camera photos are often 8MB–15MB each, saturating mobile data and overwhelming backend upload bandwidth if not compressed client-side.
  • ›Voice notes sent by local store owners and riders mix colloquial Pakistani Urdu, Roman Urdu slang ('Ali k joote ki details do', '0312... kiska order hai'), and English product names, breaking standard single-language speech models.
  • ›Generating formatted 80mm roll thermal shipping labels directly from web payloads without native desktop driver dependencies.
  • ›Dual-write synchronization: maintaining an instant local/serverless SQLite store while keeping a live Google Sheets ledger updated in real time for non-technical team members.
[02]ARCHITECTURAL SOLUTION

Engineered Solution & Execution Graph

Engineered ThriftPulse as an end-to-end operating system. Designed a lightweight client-side Canvas compression pipeline that reduces multi-megabyte customer shoe photos to ~300KB in the browser before upload. Built a dual speech-to-text pipeline combining Groq Cloud Whisper (~300ms) with local faster-whisper fallback, paired with Groq LLM tool calling that understands Roman Urdu to query order statuses and send instant WhatsApp photo notifications.

Execution Sequence:

STEP 1Customer opens /order intake form and uploads sneaker photo; browser Canvas compresses image down to ~300KB JPEG without server CPU overhead.
STEP 2FastAPI stores order metadata in SQLite and dispatches real-time append row call to Google Sheets ledger.
STEP 3System compiles printer-ready 80mm thermal shipping waybill with barcode, customer COD tags, and one-tap Bluetooth print format.
STEP 4Meta WhatsApp Cloud API delivers instant notification containing customer name, COD total, delivery address, and attached shoe picture directly to store owner.
STEP 5Store owner sends text or voice notes in English, Urdu, or Roman Urdu via WhatsApp; audio is transcribed by Groq Whisper/faster-whisper and routed to Groq 120B LLM with search_orders_db tool calling.
[03]SYSTEM TOPOLOGY & DATA FLOW

Data Flow & Component Interactions

End-to-end pipeline covering client-side Canvas compression, dual-write persistence (SQLite + Google Sheets), 80mm thermal label generation, and Roman Urdu voice assistant via Groq Whisper.

thriftpulse // thrift-sneaker-os.v1
Dual STT: Groq Whisper Cloud + Offline Fallback
1. Order Intake & Physical Dispatch Pipeline
👟
/order Form
Browser Canvas JPEG compression (~300KB)
↓ Upload (~300ms) ↓
⚡
FastAPI Core
Pydantic validation & SQLite async store
↓ Dual-Write ↓
🖨️
80mm Waybill & Sheets
Bluetooth receipt print + Google Sheets row
2. Roman Urdu WhatsApp Voice & Text Query Engine
🎙️
Owner Voice Note
“Ali k joote ki details do”
⚡
Groq Whisper Cloud
~300ms ASR (local faster-whisper fallback)
🧠
Groq 120B NLU
Tool call: search_orders_db
💬
Meta WhatsApp Alert
Replies with customer info + shoe photo
95% Bandwidth Saved:Client-side Canvas compresses 10MB mobile camera photos to ~300KB before upload, eliminating server RAM spikes.
Roman Urdu Dialect NLU:Understands colloquial bilingual voice notes (“kiska parcel pending hai”) without rigid command syntax.
Zero-Cost AI Architecture:Leverages Groq Whisper Cloud API, OpenRouter free models, and local faster-whisper on CPU/GPU without cloud fees.
01Order Intake (/order)

Customer uploads photo; in-browser Canvas compresses ~10MB file to ~300KB JPEG.

02FastAPI & SQLite

Validates payload with Pydantic and writes record to SQLite async engine.

03Google Sheets Sync

Dual-writes row to cloud spreadsheet ledger for live business tracking.

0480mm Thermal Waybill

Generates rider shipping slip formatted specifically for 80mm receipt printers.

05WhatsApp Photo Alert

Meta Cloud API sends automated WhatsApp message with shoe photo to owner.

06Multilingual Voice Assistant

Owner voice notes (Roman Urdu/English) transcribed via Groq Whisper and resolved via LLM tool-calling.

[04]ENGINEERING DEEP DIVE

Key Technical Challenges

CHALLENGE 01

Client-Side High-Res Image Compression

Problem:Uploading 10MB mobile photos over 3G/4G connections causes failed submissions and server timeout.

✓ Engineering Solution:Implemented browser-side HTML5 Canvas resizing & JPEG compression to deliver sub-300KB crisp previews under 80ms.
CHALLENGE 02

Roman Urdu Audio Understanding

Problem:Standard ASR APIs misinterpret colloquial Roman Urdu and code-switched Pakistani phrases.

✓ Engineering Solution:Configured Groq Whisper with prompt conditioning and paired with a custom LLM system prompt that handles phonetic Roman Urdu tool-calling queries.
CHALLENGE 03

Offline & Cloud Whisper Redundancy

Problem:Cloud API outages or rate limits must not halt store operations.

✓ Engineering Solution:Engineered an automatic failover to local faster-whisper running directly on the host CPU/GPU without external API dependency.
[05]VERIFIED DEPENDENCY GRAPH

Technology Stack

Languages & Core
PythonFastAPIJavaScriptHTML5 / ESC-POS CSS
Backend Services
SQLite AsyncGoogle Sheets APIMeta WhatsApp Cloud APIPydantic Settings
AI & Orchestration
Groq Whisper (whisper-large-v3-turbo)Local faster-whisper FallbackGroq LLaMA / OpenRouter 120BUrdu & Roman Urdu NLUFunction Calling
Infrastructure
Vercel Serverless Ready80mm Bluetooth Thermal PrintingGitREST APIs
[06]PRODUCTION OUTCOME

Technical Results

  • &check;Engineered full thrift store OS with client-side compression (<300KB) and instant order intake.
  • &check;Built multilingual WhatsApp AI voice assistant supporting English, Nastaliq Urdu, and Roman Urdu.
  • &check;Implemented dual Groq Whisper Cloud API (~300ms) and offline local faster-whisper pipeline.
  • &check;Automated 80mm thermal receipt printing and real-time dual-write Google Sheets syncing.