This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Every day, millions of independent tradespeople—electricians, plumbers, HVAC technicians, and mobile repair specialists—run their own side hustles and micro-businesses.
Yet their biggest daily productivity leak happens after the physical job is done: turning messy on-site notes into formal quotation documents.
A contractor might type a rushed note on their phone:
"Replace 3 switches, repair one electrical socket, labour 2500 rupees, switches cost 450 each and socket repair parts 800."
Turning that note into a professional quote usually takes 15 to 20 minutes of manual data entry, calculator arithmetic, and template formatting. Many tradespeople delay sending quotes, lose prospective clients to faster competitors, or make costly calculation mistakes.
Enter KadeQuote
KadeQuote is an open-source, local-first AI quotation maker that transforms rough trade shorthand into professional, itemized PDF quotations in seconds.
Key Value Propositions
- Instant Note Interpretation: Powered by Google’s open-weight Gemma 3 1B running locally on Ollama, KadeQuote extracts items, separates materials from labour, matches catalog prices, and flags missing values for human review.
- Zero Cloud Dependencies & Total Privacy: Customer names, phone numbers, and job addresses are stored exclusively in the browser's IndexedDB. No customer records ever touch external AI servers.
- Deterministic Financial Engine: Line totals, percentage/fixed discounts, transport charges, and estimated taxes are computed using strict 2-decimal arithmetic in TypeScript—never hallucinated by the LLM.
- Professional PDF Export: Produces high-contrast, printable PDF quotations complete with company branding, logo, payment terms, and signature acceptance lines.
- Completely Free for Solo Hustlers: No monthly SaaS fees, no cloud tokens to purchase, and works 100% offline once downloaded.
Demo
Watch the complete walk-through demo below:
Direct Video Link: https://youtu.be/WmtRW8GIm-g
What the demo shows:
- 0:00 – 0:30: Dashboard overview with live local AI connectivity status.
- 0:30 – 0:55: Configuring business profile, logo branding, and reusable price lists.
- 0:55 – 1:35: Live inference with Gemma 3 1B parsing messy job shorthand into itemized entries.
- 1:35 – 2:15: Interactive item review, adding custom materials, and configuring deterministic discounts and taxes.
- 2:15 – 2:50: Live document preview and downloading the finished vector PDF.
-
2:50 – 3:20: Local IndexedDB storage, sequential quotation numbering (
KQ-2026-0001), and JSON backup export.
Code
The complete source code is open source under the MIT License:
KadeQuote — Local-First AI Quotation Maker
Private, on-device AI quotation generator for electricians, plumbers, repair technicians, and small service businesses.
Built with Next.js (App Router) and Ollama running Gemma 3 1B. Customer data and quotations never leave your machine.
🌟 Key Features
-
Local-First AI Note Parser (
gemma3:1b):- Converts informal job notes (e.g., "Replace 3 switches, repair socket, labour 2500 rupees, switches 450 each and socket parts 800") into structured line items.
- Intelligent categorization (
material,labour,service,other). - Automatically cross-references your saved business price list.
- Strictly marks uncertain/unpriced items as requiring human review—no silent hallucination.
-
100% Offline & Private (IndexedDB via
idb):- Stores quotations, business profiles, and numbering sequences locally in the browser.
- Zero external cloud AI APIs (no OpenAI, no Anthropic, no telemetry).
- Works offline once the app and model are loaded.
-
Deterministic Financial Calculations:
- Strict 2-decimal…
Repository Link: https://github.com/Ahzem/kadequote.git
Repository Architecture
kadequote/
├── app/
│ ├── api/ai/parse-quotation/ # Server-side Route Handler interfacing with Ollama
│ ├── api/ai/status/ # Real-time health check for local Ollama & Gemma
│ ├── globals.css # Tailwind CSS styling tokens
│ ├── layout.tsx # Root app layout & metadata
│ └── page.tsx # Single-page application coordinator & reactive state
├── components/
│ ├── business/ # Business profile, logo upload & catalog manager
│ ├── dashboard/ # Real-time metrics computed from IndexedDB
│ ├── quotations/ # 5-step quotation wizard, table & preview modal
│ ├── settings/ # Ollama diagnostics, data backup & factory reset
│ └── ui/ # Accessible toast system & confirmation dialogs
├── lib/
│ ├── ai/ # Ollama client, JSON parser & few-shot prompts
│ ├── calculations/ # Deterministic 2-decimal rounded financial engine
│ ├── db/ # Browser IndexedDB persistence layer (idb)
│ ├── pdf/ # Printable PDF generator (jsPDF + autotable)
│ └── validation/ # Strict Zod schemas for AI, forms & backups
└── tests/ # 30 automated Vitest unit & live AI tests
How I Built It
KadeQuote was built from the ground up to demonstrate how lightweight open-weight models can power real-world, privacy-sensitive micro-tools:
1. Open-Weight AI Core: Gemma 3 1B on Ollama
-
Model Choice: Google’s
gemma3:1b(Q4_K_M quantized, ~815 MB). It is compact enough to run smoothly on everyday laptops and workstations without a dedicated GPU. -
Controlled Prompt Engineering: A structured system prompt with few-shot examples instructs the model to extract descriptions, quantities, units, unit prices, and categorize them into
material,labour,service, orother. -
Anti-Hallucination Guardrails: If an item price is unstated and not found in the technician's saved price list, Gemma returns
unitPrice: nulland flagsneedsReview: true. The prompt strictly forbids inventing customer names or addresses.
2. Robust JSON Sanitization & Parsing
LLMs can occasionally wrap JSON in explanatory text or markdown blocks. The extraction pipeline uses multi-stage parsing (direct JSON -> markdown code block regex -> outer brace matcher) validated through Zod (AIRawOutputSchema), ensuring the client never crashes on unexpected tokens.
3. Local-First Persistence with IndexedDB
Using the idb library, KadeQuote stores all records in kadequote_local_db:
- Quotations with status indexing (
draftvsfinalized) - Business branding, terms, and custom Base64 logos
- Atomic quotation numbering state (
KQ-2026-0001), preventing accidental duplicate quote numbers - Full offline JSON backup export and schema-validated restore
4. Deterministic Calculations (Zero AI Math)
Financial arithmetic should never be delegated to language models. A dedicated module (lib/calculations/quotation.ts) handles line totals, percentage or fixed discounts, additional transport charges, and user-configured tax rates with deterministic rounding (Math.round((val + Number.EPSILON) * 100) / 100).
5. Automated Testing
The codebase includes 30 automated tests in Vitest:
- 15 calculation tests (rounding, negative clamps, capped discounts, tax bases)
- 11 validation tests (Zod parsing, category normalization, backup structure)
- 2 numbering tests (sequence padding)
- 2 live integration tests verifying that local Ollama and
gemma3:1bparse real-world notes accurately
Why Does Open Innovation Matter?
Building KadeQuote with open innovation—specifically open-weight models and local inference—fundamentally changed what was possible:
- Absolute Data Privacy: Trade contractors deal with sensitive homeowner information: residential addresses, direct phone numbers, security gate codes, and proprietary labour margins. Uploading this to cloud APIs creates serious compliance, leakage, and data-mining concerns. Running Gemma 3 1B locally ensures that zero bytes of customer data leave the laptop.
- Eliminating the Micro-SaaS "Toll": For a solo electrician or plumber, paying a $29/month subscription for an invoicing tool is an unnecessary tax on their side hustle. Open-weight models empower developers to build free, zero-marginal-cost software that users can own forever.
-
True Offline Independence: Job sites (basements, remote properties, new constructions) frequently lack reliable mobile data. Because Ollama runs locally on
127.0.0.1, KadeQuote continues to function without internet connectivity. - Predictability and Durability: Closed APIs can deprecate endpoints, change pricing tiers, or alter model behaviors overnight. With open weights, the software you build today will run exactly the same way five years from now.
My Agent Session
This project was built pair-programming with Google DeepMind's agentic engineering assistant Antigravity.
The agent assisted throughout the entire software development lifecycle:
- Bootstrapping the Next.js 16 App Router architecture and configuring Tailwind CSS v4.
- Creating the robust Ollama HTTP bridge with strict timeout and fallback handling.
- Designing the deterministic financial calculation utilities and writing comprehensive Vitest suites.
- Resolving edge cases like React 19's
set-state-in-effectconstraints and Turbopack route caching rules. - Generating the comprehensive automated test suite and live Ollama integration test.
All 30 automated tests were executed and validated on Windows 11 with 100% test passes and zero lint errors.
My First User
To test KadeQuote against realistic real-world conditions, I shared the tool with a friend who operates a residential electrical repair and wiring side hustle.
The Real-World Test
He tested it with his usual messy job shorthand:
"Replace 3 switches, repair one electrical socket, labour 2500 rupees, switches cost 450 each and socket repair parts 800."
What He Said:
"Normally I write these down on a notepad in my van and then re-calculate everything at home in Excel or on WhatsApp. It usually takes me 15 minutes per quote, and sometimes I forget what I paid for the parts. With this, I pasted my shorthand, clicked generate, and had a clean PDF ready to send before I even drove away from the customer's house."
His favorite feature was the Saved Price List Reference: because his common replacement parts (switches, MCB breakers, standard hourly diagnostics) were pre-saved, Gemma 3 1B automatically filled in the default unit prices even when he forgot to write the cost down in his notes.
Prize Categories
- Primary Track: Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
-
Partner Categories:
- Open Innovation & Local-First AI
- Micro-SaaS & Developer Productivity
Built with Next.js 16, Ollama, Gemma 3 1B, and Tailwind CSS. Open-source under the MIT License.

Top comments (0)