-
-
All whatsapp chat in one place, fully categorize( confirmed,cancelled, dispatched)
-
All orders in one Excel sheet, extraced by AI
-
Automatic Profit calculation
-
Data, local sotrage, backup, importing files
-
Admin, profile and privacy settings
-
Data extracted through selected chats in respective category
-
Landing Page, features, working, benefits, sgin-up
Orderly
Your WhatsApp orders, finally in order.
Inspiration
In Pakistan, a very large share of small retail is run through WhatsApp. A shopkeeper selling clothes, accessories or home goods usually takes orders in a chat: the customer writes "2 black kurtas, medium", the shopkeeper replies with a price, the customer sends an address, changes their mind, and eventually confirms or disappears. The same shopkeeper then copies all of this by hand into a notebook or a spreadsheet, tries to remember which orders were confirmed, which were dispatched, and at the end of the month has no reliable idea of how much profit was made.
The pain is real and it has three parts. Orders are buried in long, informal conversations written in English, Urdu script, Roman Urdu and Punjabi, often mixed in the same message. Mistakes are expensive, because a missing address or a misread quantity means a failed delivery. And the shopkeeper has no simple view of confirmed orders, dispatched orders and profit.
Most existing tools ask the shopkeeper to leave WhatsApp, pay for a full e-commerce platform, or hand all their customer data to a central server. We wanted the opposite. Orderly keeps the shopkeeper inside the chat they already use, puts a dashboard on top of it, and keeps the shopkeeper's business data on the shopkeeper's own device.
What it does
Orderly takes a customer's WhatsApp message all the way to an Excel file and a profit report, with the shopkeeper in control at every step. The AI drafts. The shopkeeper decides.
- Receive. A customer writes to the WhatsApp number. Meta delivers the message to our FastAPI backend by webhook. The backend verifies the signature, rejects duplicates and places the message in a temporary queue, so nothing is lost if the dashboard is closed.
- Sync. When the dashboard is open, it polls the queue, saves the messages into the shopkeeper's browser (IndexedDB), and only then acknowledges them so the server can delete them.
- Select and extract. The shopkeeper chooses which chat to send to the AI. Only that chat is sent, and nothing is ever sent automatically. The AI returns items, size, quantity, delivery address, agreed price, missing information, a risk level and a dispatch note.
- Review. The result appears in an editable table. Missing information is highlighted. The shopkeeper corrects anything that is wrong.
- Confirm. The shopkeeper presses Send Buyer Confirmation. The message goes out only inside WhatsApp's 24-hour window. The chat turns yellow.
- Buyer reply. A reply of YES turns the chat green, a change request turns it orange, and a cancellation marks it cancelled. Common agreement words such as "haan ji", "theek hai" and "bilkul" are recognised by a fixed rule without calling the AI at all.
- Export. Confirmed orders are exported to an Excel workbook with separate WhatsApp Orders and Call Orders sheets. Rows with missing information are highlighted.
- Dispatch and profit. The shopkeeper marks orders as dispatched, with warnings for high-risk, incomplete or unconfirmed orders. A purchase-price list then produces order-wise and daily profit.
Orders taken by phone call are supported too. The seller types the customer, phone number and call notes, and the order joins the same flow at the extraction step.
How we built it
Architecture
The system has four parts: a React dashboard, a FastAPI backend, Supabase, and the browser's own IndexedDB.
- The frontend is React with Vite, TypeScript and Tailwind CSS, with Framer Motion for animation, TanStack Table for the editable tables, Dexie for IndexedDB and ExcelJS for building and reading Excel files in the browser.
- The backend is Python with FastAPI and Pydantic v2. It verifies Meta's webhook signature, runs the queue, calls Meta to send messages, calls the AI providers, and performs all arithmetic.
- Supabase provides Google sign-in and stores only platform metadata: accounts, roles, the connection record, the temporary queue, welcome-message records, audit events and AI usage counts.
- IndexedDB in the shopkeeper's browser holds the business data itself: messages, orders, addresses, purchase prices and the audit history.
This split is the most important design decision in the project. Meta cannot deliver a message to a browser, so a server must receive it. But that server only holds a message briefly. An event is deleted as soon as the dashboard acknowledges it, and an undelivered event expires after 48 hours. We never build a central database of shopkeepers' customers and addresses. That protects the shopkeeper's privacy and keeps our responsibility small.
A queue that cannot lose a message on our side
The sync protocol is deliberately simple and safe. The dashboard polls for pending events, saves them all to IndexedDB in one transaction, and only after the transaction succeeds does it send an acknowledgement. If the acknowledgement fails, the events come back on the next poll and are ignored as duplicates, because messages are keyed by their WhatsApp message id. Duplicate delivery from Meta is handled the same way, through a unique key on the owner and message id. The dashboard shows an honest sync status at all times: Connected, Synchronizing, Synced, Sync delayed, Connection lost or Recovery required.
We do not claim perfect recovery. If our backend itself is offline, Meta may retry its delivery, but that is not guaranteed, and we say so.
The AI only reads. Python does the math.
The language model has a narrow job: extract and classify text. It never sends a message, never decides to confirm or dispatch an order, and never does arithmetic. Models are unreliable at arithmetic and a wrong total on an order is a real financial error, so all calculation is done in Python with exact decimal arithmetic.
For an order with per-item pricing:
$$\text{line_total}_i = \text{unit_price}_i \times \text{quantity}_i, \qquad \text{order_total} = \sum_i \text{line_total}_i$$
For a price agreed for the whole order, the order total is the agreed price and no line totals are produced. If the price or quantity is missing or unclear, totals are left empty and the order shows Price not agreed, instead of guessing.
Profit is under the shopkeeper's control. The default formula is
$$\text{profit} = \text{selling_total} - \text{purchase_cost}, \qquad \text{purchase_cost} = \sum_i \text{quantity}_i \times \text{purchase_price}_i$$
and the shopkeeper can add delivery cost, packaging cost and discount, or write their own formula. That formula is evaluated by a safe parser built on Python's abstract syntax tree that allows only numbers, the named variables, the four arithmetic operators and parentheses. We never use eval or exec. Items are matched to the purchase-price list by exact comparison after lowercasing and trimming, with no fuzzy matching, so a wrong match can never silently produce a wrong profit. If a price is missing, the profit shows Not calculated with the reason.
Three AI providers with fallback
Extraction runs through Google Gemini first, then Groq, then Mistral, three different companies so that one outage or rate limit does not stop the shop. Each call uses JSON output mode, temperature 0 and a timeout, and every answer is validated against a strict Pydantic schema. If a provider times out, hits a limit or returns invalid JSON, the next one is tried. If all three fail, the dashboard shows Retry and Enter manually, so the shopkeeper is never blocked. Shopkeepers do not need their own AI accounts or keys.
We also minimise what the AI sees. It receives only timestamps, whether the sender is the customer or the shop, and the message text. It never receives phone numbers or WhatsApp profile names. Customer text is wrapped in delimiters and treated as untrusted input, and the system prompt tells the model never to follow instructions found inside a conversation. This matters because a customer message is exactly where a prompt-injection attempt would appear.
Language
Customers write in English, Urdu script, Roman Urdu and Punjabi, often mixing them. The extraction prompt explicitly covers all of these, including number words such as ek, do, teen and char, and it requires item names and addresses to be copied exactly as written and never translated.
Excel as a two-way tool, without false promises
Shopkeepers already live in spreadsheets, so Excel is a first-class feature. The export has 19 fixed columns, with the Order ID column holding a unique row id so every spreadsheet row can be matched on import. The workbook is built in the browser, so order data never passes through a server.
A downloaded file is a snapshot, so real-time two-way sync is impossible and we do not pretend otherwise. Instead, the dashboard is the source of truth. A shopkeeper can edit in Excel, upload the file, review a preview, and confirm. Every export carries a version and a last-updated time per row. If a row changed in both places, the preview marks a Conflict and the shopkeeper chooses which value to keep. Nothing is overwritten silently. Import validation rejects unknown Order IDs, duplicate IDs, non-positive quantities, invalid payment values and malformed phone numbers, and an invalid row can never overwrite a valid record. Every applied change is written to an audit history.
Backup that never touches our servers
Because business data lives in the browser, a cleared cache or a lost phone could erase it. The Data page lets the shopkeeper download a full backup file to their own device and restore it later through the same preview-and-confirm path. A banner reminds them after 7 days without a backup, and a permanent warning explains the risk. The backup never passes through our server or Supabase.
Design
Orderly follows a deliberate visual identity: a forest green and emerald palette on a warm off-white background, Space Grotesk for headings and DM Sans for interface text. The logo is a chat bubble whose tail becomes a checkmark, which is the whole product in one image: a message becoming a confirmed order. Status is never shown by colour alone, every chip carries its text label, motion respects the reduced-motion setting, and the layout works from 360 px wide upwards so it is usable on a phone.
Challenges we faced
The real integration takes longer than a hackathon. The full product would let a shopkeeper keep their existing WhatsApp Business number through Meta's Coexistence feature, with Embedded Signup. That requires business verification, App Review, Tech Provider approval and confirmation that Coexistence works for numbers in Pakistan, which is still unverified. None of that can be completed in a hackathon window. Rather than fake it, we connected through Meta's official test number and kept everything else real: the webhook, the signature check, the queue, the AI extraction, the Excel files and the profit calculation. Coexistence is on the roadmap, and we state that plainly.
The test number changes the workflow. The test number has no WhatsApp Business app attached, so the messages a seller types on their phone never arrive as echoes. We redesigned that step so the agreed price comes from a reply written in the dashboard or from call notes.
Meta's 24-hour rule. Free-form messages can only be sent within 24 hours of the customer's last message. We built this rule into the interface, so the confirmation button is disabled with an explanation once the window closes, rather than letting the seller hit an error.
Keeping data with the shopkeeper while still receiving webhooks. A browser cannot receive a webhook, and a dashboard can be closed at any time. The temporary queue with acknowledgements, duplicate detection and a 48-hour expiry was our answer, and it took several iterations to get the protocol safe in the failure cases.
Trusting AI output. We handled this by making the model do as little as possible: strict schema validation, no arithmetic, no sending, rule-based handling of obvious replies, untrusted-input delimiters, and a human review step before anything reaches a customer.
Privacy rules in code, not just in a policy. Customer message text, phone numbers and addresses are never allowed in server logs, audit records, error messages or usage records. Phone numbers are masked in the chat list.
Scope discipline. Our first plan used SQLite and passwords. We changed to Google sign-in, IndexedDB for business data, a queue, a three-provider AI fallback and a backup system, and each change had a stated reason. We also wrote down what is out of scope, including billing, cloud sync of orders, multi-device sync, real staff accounts, group chats and media messages, so that the prototype shows only what can really be finished.
What we learned
- Putting a human review step between the AI and the customer is what makes AI usable for real businesses. The AI saves time without ever taking away the shopkeeper's control.
- Privacy is an architecture decision, not a settings page. Choosing where data lives early made many later decisions simple.
- Honest limits build trust. Saying what the prototype does not do, such as guaranteed recovery when our server is down, or real-time Excel sync, makes the parts that do work more believable.
- Meta's platform rules shape the product as much as the code does, from the 24-hour window to the approval process for real numbers.
- Real customers write in mixed languages, so language support has to be designed in from the first prompt rather than added later.
What is next
- Move from Meta's test number to Coexistence with Embedded Signup, so a shopkeeper can connect their real Business number without giving up the Business app.
- Complete business verification, App Review and Tech Provider approval, and test Coexistence eligibility for Pakistani numbers.
- Publish a privacy policy and terms that describe the queue, the AI providers and the local browser storage.
- Add optional automatic backup from the browser straight into the shopkeeper's own Google Drive, so data still avoids our server.
- Move to paid hosting and a managed queue as usage grows.
- Support approved WhatsApp message templates for confirmations after the 24-hour window.
Who it is for
Orderly is for the small shopkeeper who already sells on WhatsApp and does not want to move to a different platform. It turns a chat into an order, an order into a spreadsheet row, and a spreadsheet into a profit figure, while the customer data stays with the person who earned it.
Built With
- exceljs
- fastapi
- google-gemini
- google-oauth
- grok
- indexeddb
- meta-webhooks
- postgresql
- python
- react
- supabase
- tailwindcss
- tanstack-table
- typescript
- vite