Order Ledger: WhatsApp order chats to a clean order book, offline
What they built
Home bakers, tiffin services, tailors and small shops take orders over WhatsApp and copy them into a notebook, and a week later nobody remembers who paid the advance. Order Ledger takes a pasted or exported chat and extracts the customer, phone, items, quantities, delivery date and time, total, amount paid and status.
The seller checks the result on a review screen and saves it. The app then shows a schedule grouped by day with today and overdue markers, a pending-payments view with a button that copies a polite WhatsApp reminder, and an all-orders table with CSV export for the accountant.
Customer names, numbers and prices are private, so everything runs on the seller's own laptop: the server listens only on 127.0.0.1 and orders live in a local JSON file. The author built it for the Hacktoberfest Open-Source AI Challenge and published it under the MIT license.
Setup
- Ollama serving qwen2.5:7b (4.7 GB) by default, llama3.2:3b for comparison
- Node.js with no packages (built-in http and fetch), one HTML file for the UI, a JSON file for storage
- A small evaluation harness (evaluate.mjs) over 18 hand-labelled synthetic chats
How it works
- Pipeline: convertChat() turns a WhatsApp export into C:/S: lines, annotateDates() rewrites words like kal or nale into ISO dates, Ollama extracts the order at temperature 0 with JSON-schema output, and clean() validates phone, units and dates on the server.
- Ollama's format field holds a JSON schema with enums for unit and status, so the reply always parses and uses only allowed values.
- Relative-date arithmetic and phone-number cleanup were moved into code because the small model was unreliable at both.
Results & numbers
- qwen2.5:7b on the 6 fresh chats: 5/6 orders correct, 96% of fields, after the date fix (3/6 before)
- llama3.2:3b got only 42% of items right on the 12-chat set, so it was not shipped
- About 14 seconds per order with the 7B once loaded (about 50 s for the first order); the 3B takes about 7 s
- At temperature 0, re-running an unchanged prompt gave identical results, so every prompt change could be A/B tested
Gotchas
- Adding a fourth few-shot example dropped the 7B from 10/12 to 7/12 correct, and made the 3B invent a pineapple cake order
- A date table in the prompt listing next Tuesday made the model answer the wrong date for today and tomorrow
- The schema guarantees the shape, not correctness, which is why the review screen exists
- The author tuned on both test sets and calls the numbers indicative, not a benchmark
“The schema guarantees the shape of the answer, not that it's right.”— Khushighosh
Do it yourself
- ollama pull qwen2.5:7b
- Clone the repo and run node server.mjs (nothing to npm install)
- Open http://localhost:3000 and paste a WhatsApp chat or export
- Review the extracted order, fix any field, and save it
ollama pull qwen2.5:7b
git clone https://github.com/Khushighosh/Order-Ledger.git
cd Order-Ledger
node server.mjs # then open http://localhost:3000Related
Offline menu description writer for small restaurants with Gemma 3 4B
A one-button Streamlit app where a tea shop or restaurant owner types a dish name in English and Tamil plus a short note, and Gemma 3 4B in Ollama writes a two-sentence English menu description in about 20 seconds, with no internet.
A 4B local model on a 4 GB laptop GPU as a PASS/FAIL test evaluator
Qwen3 4B Instruct in Ollama (Docker, WSL2) grades a Spring Boot app's root-cause answers against expected ones, returning a JSON verdict, with every speed and memory number measured on a 4 GB Quadro T1000.
Auto-tagging documents in Paperless-ngx with Ollama
Since version 3.0, Paperless-ngx suggests titles, senders, document types and tags, and can chat with your documents, using a local Ollama model.
Home Assistant Voice PE with a local LLM instead of Echo
A $60 Voice Preview Edition, an N100 box and an optional RTX 3060 replace every Echo and Nest in the house. It keeps working with the internet unplugged.