Syed Ahmer ShahSyed Ahmer ShahSyed Ahmer ShahSyed Ahmer ShahSyed Ahmer Shah — home
  1. …
  2. Engineering Logs
  3. The Engineering Logs
  4. The Shop That Ran on a Notebook
Part 24 of 25

The Shop That Ran on a Notebook

Why the most important book in a small business is the one under the counter, and what it takes to replace it without losing what made it work

Written by

Syed Ahmer Shah

Software Engineer

Nov 13, 20268 min read1,830 words—reading now▼
Syed Ahmer Shah holding a notebook with a shop drawn on it in front of the Karobar ERP home page, beside the title The Shop That Ran on a Notebook
Read this articlevoice
Markdown

Every neighbourhood has one. A shop the width of a doorway, shelves to the ceiling, and a man behind the counter who knows the price of four hundred things without looking. He knows which brand of tea you buy. He knows your father's name. And when you're short at the end of the month, he waves you off and says "pay me later", then writes something in a notebook.

That notebook is the most important thing in the shop. It's worth more than the fridge.

I spent the first half of November building Karobar ERP, software meant to do that notebook's job for small shops, wholesalers and distributors. To build it I had to understand what the notebook really is, and it turned out to be a lot more than a list of debts.


#What's actually in the notebook

In Urdu the notebook is called a khata, and the credit it records is udhaar. A page per customer. A line each time they take something without paying, a line each time they pay something back.

Look at it as a programmer would and it's a small database. But look at it as the shopkeeper does and it's three different things at once.

It's his memory: who took what, and when. It's his bank: a large share of everything he owns isn't in the drawer, it's out in the neighbourhood, in other people's kitchens. And it's his relationships: every line is a small act of trust, and knowing when to extend a little more of it, and when to stop, is most of the skill of running a shop.

So when someone says "just put it on a computer", they're asking him to hand over all three. No wonder most of them haven't.

#Three ways a notebook fails

The notebook works beautifully for years. Then it fails in one of three ways, and none of them is the shopkeeper's fault.

It can't add itself up. Ask him "how much does the whole neighbourhood owe you right now?" and the honest answer is "let me sit down on Sunday". He has to turn every page. So he rarely asks, and a business where nobody knows the total owed is a business that can run out of cash while being owed a fortune.

It only knows about money owed, not stock. The notebook says Paradise Bakers took ten cartons of cooking oil. It doesn't say there are now only two cartons left on the shelf, or that the ones at the back expire next month.

It lives in one place. One fire, one flood, one spilled cup of tea, one family argument, and the record of who owes what is gone. So is the trust, because now it's his word against forty customers.

The Who owes me page: every customer, what they owe and how late it is, with a Remind on WhatsApp button beside each
The Who owes me page: every customer, what they owe and how late it is, with a Remind on WhatsApp button beside each

The first screen I built to answer these is called, simply, Who owes me. Every customer, what they owe, and how late it is, added up without anyone turning a page. Beside each name is a button that opens WhatsApp with a polite reminder already written. That one button is the notebook's job done in a way the notebook never could.

#A 500-year-old trick for not fooling yourself

Here's the idea that sits underneath all of it, and it's older than you might think.

In 1494 an Italian friar named Luca Pacioli published a maths textbook that included a description of how the merchants of Venice kept their books. Their method is called double-entry bookkeeping, and nearly every business on Earth still uses it. It sounds intimidating. It's actually one sentence:

Money never appears or disappears. It only moves, so write down both ends of the journey.

When a customer pays five hundred rupees, that isn't one fact. It's two. Your cash went up by five hundred, and what that customer owes you went down by five hundred. Write both, every time, and something lovely happens: all the "went up" entries and all the "went down" entries must come to the same total. If they don't, you've made a mistake, and you know it today rather than in March.

That's the whole trick. It's a way of making your own mistakes visible. A notebook with one column can be wrong for a year without anybody noticing. Books with two sides complain the moment they're wrong.

The shopkeeper using Karobar never sees the words "debit" or "credit". He presses Cash on a sale. But behind that button, both ends of the journey are written down, and the software refuses to save anything where the two sides don't match. He gets the protection of a method invented for Venetian spice traders without having to learn it.

The counter: four items scanned, the tax worked out and one big Cash button
The counter: four items scanned, the tax worked out and one big Cash button

#The last bag of rice

Imagine a shop with two counters and one bag of basmati left. Two customers ask for it at the same second. Both cashiers glance at the screen, both see "1 left", both say yes.

Now somebody has paid for rice that isn't there. In a tiny shop, you'd sort it out with an apology. In a wholesaler taking orders by phone and WhatsApp all day, it can happen again and again, and each time it costs a customer's trust.

The fix is the same one a good shop already uses for its only key to the storeroom: one person holds it at a time. When a sale is about to take the last bag, the software briefly holds that item so nobody else can touch it. The second sale waits for a blink, sees the true number, which is now zero, and is told the rice is gone before any money changes hands.

I tested this the unkind way: I had the computer fire several sales of the same last item at exactly the same instant, over and over. One wins. The others are told no. It has to work every time, not most of the time, because "most of the time" is exactly how the notebook fails.

Also readRAG Retrieval Strategies on a 50k-Document Dataset: BM25 vs Dense vs Hybrid
The Discount That Knew You Were Hesitating: Rule-Based Personalisation in an Online Pharmacy

#Speaking the customer's language, properly

Most business software in Pakistan is in English. Most shopkeepers think, count and argue in Urdu, Sindhi, Punjabi or Pashto. Asking someone to run their livelihood in their third language is asking them to make mistakes.

So Karobar works fully in English, Urdu and Arabic. That turned out to mean far more than translating words. Urdu and Arabic are written from right to left, so the whole screen has to mirror: the menu moves to the right side, lists start from the right, arrows point the other way. The printed bill has to mirror too.

The home page of the demo store in Urdu, with the menu on the right and everything reading right to left
The home page of the demo store in Urdu, with the menu on the right and everything reading right to left

And the words themselves had to be plain in every language. The page an accountant would call "accounts receivable ageing" is called "Who owes me". The page they'd call "profit and loss statement" opens with a question: "Did you make money in this period?" Every screen has a small box at the top that explains, in three numbered steps, what the page is for.

I want to be honest about one limit. I've reviewed the Urdu and Arabic text carefully once, but some phrases still need a native reader's eye, and I've listed those openly rather than pretend they're perfect.

#The numbers I wouldn't guess

Shops have staff, and staff have salaries, and salaries come with rules set by the government: income tax, pension contributions, minimum wages. Get them wrong and a real person is paid the wrong amount.

For income tax, I read the law itself and built the official rates in. But for one pension contribution, I found something uncomfortable. Websites and guides all stated the rate confidently. The copy of the law I could find said something else. And I couldn't find the official document that settles it.

It would have been easy to pick the popular number and move on. Instead I made a rule: if I can't point to the official source for a legal number, the software doesn't ship it. The box stays empty and the business fills in what their own accountant tells them.

It makes the product look less finished. I think it makes it more trustworthy, for the same reason you'd trust a shopkeeper who says "I'm not sure, let me check" over one who always has an answer.

#Looking at your own shop from above

Here's what the notebook could never give its owner: a view from above.

The business home page of the demo store: what needs attention, sales this month, profit, what customers owe and what the shop owes
The business home page of the demo store: what needs attention, sales this month, profit, what customers owe and what the shop owes

One page that says: eight products are running low. Ten bills are overdue. You've sold this much this month, and this much of it was profit. Your customers owe you this. You owe your suppliers that. Your shelves are holding this much money in goods.

None of that is new information. All of it was already true, scattered between the shelves, the drawer and the notebook. The software's only job is to put it in one place and keep it right. That turned out to be nearly the whole job.

To check that it really works, I had the computer invent two businesses, a corner store in Hyderabad and a trading company in Dubai, and live through months of buying, selling, returns and paydays. The first time I ran it, both imaginary shops were slowly going broke, and the software showed me exactly why, line by line. I've never been so pleased to see bad news.


#What it taught me

Three ideas stayed with me, and they apply far beyond shops.

Old systems survive for good reasons. The notebook isn't a failure of technology. It's cheap, it never crashes, and it holds a relationship as well as a number. Anything that wants to replace it has to respect what it already does well.

Write down both ends of the journey. Whether it's money, stock or your own time, a record that can check itself is worth more than a record that's merely neat.

"I don't know" is a feature. Software that leaves a box empty when it isn't sure is more useful than software that confidently fills it in.

Karobar ERP is open source and free to use. The public demo goes live after one more round of testing, with a pair of invented shops anyone can sign into and poke around. If you run a shop, or keep the books for one, I'd genuinely like to hear what's in your notebook that I haven't thought of.

The full build, with the architecture, the tests and the mistakes I made along the way, is in the Karobar ERP case study.

Find me across the web.

Same person, every platform

Work & code

  • ASPortfolioahmershah.dev
  • LinkedInin/syedahmershah
  • GitHub@ahmershahdev
  • AWSAWS Builder Center@syedahmershah
  • Crunchbasesyed-ahmer-shah
  • LinkedIn · Companycompany/syedahmershah

Writing

  • Dev.tosyedahmershah
  • Medium@syedahmershah
  • Hashnode@syedahmershah
  • Substack@syedahmershah
  • HackerNoonu/syedahmershah
  • CLCoderLegionuser/syedahmershah

Reviews & listings

  • Google Knowledge PanelSyed Ahmer Shah
  • Google Business Profileg.page
  • ClClutch
  • TpTrustpilot
  • DRDesignRush
  • TBTechBehemoths

Social

  • YouTube@ahmershahdev
  • Instagram@ahmershahdev
  • TikTok@ahmershahdev
  • Facebookahmershahdev
  • X@ahmershahdev
#karobarerp#smallbusiness#accounting#urdu#softwaredesign#opensource#engineeringlogs
ShareXLinkedInRedditWhatsApp

← Previous in series

Karobar ERP: Books That Balance for the Corner Shop

On this page

  • What's actually in the notebook
  • Three ways a notebook fails
  • A 500-year-old trick for not fooling yourself
  • The last bag of rice
  • Speaking the customer's language, properly
  • The numbers I wouldn't guess
  • Looking at your own shop from above
  • What it taught me

The Engineering Logs

  1. 01The Edge Latency Lie: Solving Global Consistency
  2. 02Top 10 AI Tools Every Frontend Developer Should Know (2026 Guide)
  3. 03Change One Number. Take Everything.
  4. 04How Databases Work: From Tables to Query Execution
  5. 05The New Era of Software Engineering
  6. 06The Art of Object-Oriented Programming
  7. 07GleanGrid: Building a Pre-Order Marketplace for Farmers Markets
  8. 08The Last Mango Problem: Race Conditions in a Real Marketplace
  9. 09BookMyMovie: Building a Cinema Ticketing Platform
  10. 10One Seat, Two Buyers: Race Conditions, IDOR and Keys in a Cinema Booking System
  11. 11Zovita+: Building an Online Pharmacy That Adapts to Each Shopper
  12. 12The Discount That Knew You Were Hesitating: Rule-Based Personalisation in an Online Pharmacy
  13. 13RAG Retrieval Strategies on a 50k-Document Dataset: BM25 vs Dense vs Hybrid
  14. 14Inside the Database Stack
  15. 15HolidayOps: Building a Working Days API for 250 Countries
  16. 16The Weekend Is Not a Constant
  17. 17MarketClock: A Trading Calendar That Shows Its Work
  18. 17Cybersecurity Trends: Protecting Data in the Digital Age
  19. 18The Day the Money Moves
  20. 19AIT: Building a University Admissions Portal From Scratch
  21. 20I Invented 14 People to Break My University Website
  22. 21OfflineShelf: Choosing Which Wikipedia Goes Offline
  23. 22A Library That Fits on a USB Stick
  24. 23Karobar ERP: Books That Balance for the Corner Shop
  25. 24The Shop That Ran on a Notebook

Up next

Keep reading.

All 63 articles→
  1. 01

    Karobar ERP: Books That Balance for the Corner Shop

    How I built Karobar ERP: an open-source Django and React system that gives a small shop or distributor its stock, sales, accounts and payroll in one place, in English, Urdu and Arabic, with books that always balance and stock that stays right when two cashiers sell the last item.

    Nov 13, 202611 minThe Engineering Logs

  2. 02

    A Library That Fits on a USB Stick

    Wikipedia can work with no internet at all. A plain-language story of how offline Wikipedia reaches schools and clinics, why choosing the articles is the hard part, and what building OfflineShelf taught me about lists, change and giving credit.

    Nov 2, 20266 minThe Engineering Logs

  3. 03

    The Day the Money Moves

    When you buy a share, you don't own it the moment you click. A plain-language story of trade settlement, T+1 and T+2, why holidays in two countries can push a payment back a day, and what building MarketClock taught me about dates that have a history.

    Oct 24, 20264 minThe Engineering Logs

  4. 04

    The Weekend Is Not a Constant

    Why 'is this a working day?' breaks so much software: weekends that differ by country and change over time, holidays that follow the moon, time zones that disagree about today, and the habits that kept my own date logic honest while building HolidayOps.

    Oct 18, 20265 minThe Engineering Logs

  5. 05

    I Invented 14 People to Break My University Website

    A plain-language story about testing a university admissions website with fourteen imaginary people, from a careless applicant to a would-be hacker, and the real bugs they found that I never would have.

    Oct 30, 20267 minThe Engineering Logs

  6. 06

    AIT: Building a University Admissions Portal From Scratch

    How I turned what I learned in my XCL Technologies internship into Ahmer Institute of Technology: a university website with applicant, student, teacher, staff and admin portals, safe file uploads, Docker, and 58 end-to-end tests that found real bugs.

    Oct 30, 20268 minThe Engineering Logs

Available for new work · --:--:-- PKT

Have an idea?

sales@ahmershah.dev
Book a call WhatsApp +92 370 4831994

On this site

  • 01About
  • 02Education
  • 03Certificates
  • 04Skills
  • 05Projects
  • 06Experience
  • 07Services
  • 08Testimonials
  • 09Contact

Pages

  • Projects
  • Blog
  • Saved articles
  • RSS
  • Privacy Policy
  • Terms of Service
  • llms.txt

Elsewhere · official profiles

26 links

Professional

Work history, code and credentials.

  • in/syedahmershah
  • company/syedahmershah
  • @ahmershahdev
  • syed-ahmer-shah
  • syed-ahmer-shah
  • u/syedahmershah
  • @syedahmershah
  • AWS@syedahmershah

Coding & credentials

Problem solving, verified badges.

  • u/syedahmershah
  • syedahmershah
  • users/syedahmershah
  • learner/syedahmershah

Google & business

The official listings.

  • Google Business Profileg.page
  • Syed Ahmer Shah
  • syedahmershah
  • Beaconssyedahmershah
  • syedahmershah

Social (@ahmershahdev)

Build logs, clips, threads.

  • @ahmershahdev
  • @ahmershahdev
  • @ahmershahdev
  • ahmershahdev
  • @ahmershahdev
  • @bluesky.ahmershah.dev
  • ahmershahdev

Design

Interfaces and visuals.

  • syedahmershah
  • syedahmershah

Direct

  • sales@ahmershah.dev

    New projects & quotes

  • support@ahmershah.dev

    Support & help

  • syedahmershahofficial@gmail.com

    Personal

  • +92 370 4831994

    Phone · WhatsApp

  • Hyderabad, Sindh, Pakistan

    Remote-first · Asia/Karachi (UTC+5)

Resume ↗
SYED AHMER SHAH

© 2026 Syed Ahmer Shah. All rights reserved.

PrivacyTermsRSS
ahmershah.dev