PaperToProfit: Turning Handwritten Dhaba Bills into Revenue & Profit Intelligence with Open-Source AI and TabPFN
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle 🍽️ What I Built Walk into almost any local diner, roadside dhaba, tea stall, or family eatery across South Asia, and you will see the exact same analog pattern: every customer order is scribbled with a ballpoin

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
Walk into almost any local diner, roadside dhaba, tea stall, or family eatery across South Asia, and you will see the exact same analog pattern: every customer order is scribbled with a ballpoint pen on small carbon pads (Kitchen Order Tickets / KOTs) or notepad tear-offs.
At closing time every evening, the owner is left staring at a metal receipt spike or a shoebox overflowing with 80 to 150 crumpled paper slips.
Commercial restaurant POS systems (like Toast, Petpooja, or Lightspeed) cost anywhere from $60 to $180/month, require expensive proprietary hardware, and demand manual keypad entry during busy service. Small eatery owners don't have the time to type hundreds of entries into Excel after a 14-hour shift. Consequently, they operate in the dark:
PaperToProfit is a mobile-first, privacy-preserving restaurant intelligence engine built specifically for neighborhood food businesses.
Who would pay for this? Local tea stalls, dhabas, quick-service diners, and food-truck operators. Offering this as a managed micro-SaaS at $9 to $15/month (₹300–₹500/month) provides 10x ROI by preventing food waste and revenue leakage—with a 95%+ gross profit margin for the builder.
Direct Link: Watch on YouTube (https://youtu.be/6FxF2mufxw0)
Upload any handwritten or printed bill, snap with mobile camera, or paste directly with Ctrl + V. Items, prices, and categories are parsed with confidence scores and rendered in an editable receipt card:
Real-time gross revenue, estimated net profit, food costs (COGS), average ticket size, 14-day revenue trajectory, Cash vs. UPI breakdown, and kitchen prep rush-hour distribution:
Automatically categorizes every dish into Stars (promote), Plowhorses (re-engineer price), Puzzles (upsell), and Dogs (drop) based on sales volume and profit margins:
Uses Prior Labs' TabPFN-3.5 foundation model to forecast next-week revenue trajectory with confidence bounds, flag anomalous revenue spikes/drops ($|Z| > 1.6$), and provide actionable prep recommendations:
Every verified slip is recorded in a local SQLite ledger with 1-click CSV export for taxes and accounting:
The complete source code is open-source under the MIT license:
├── backend/ │ ├── main.py # FastAPI REST API serving endpoints & static assets │ ├── extractor.py # Vision AI pipeline (Gemini, Groq, 2D Spatial RapidOCR) │ ├── forecaster.py # Prior Labs TabPFN-3.5 foundation forecasting engine │ ├── analytics.py # Real-time financial KPIs, rush heatmaps & BCG matrix │ ├── db.py # Zero-config embedded SQLite persistence │ └── seed.py # Realistic 14-day historical dhaba sales seeder ├── static/ │ ├── index.html # Responsive, tactile receipt UI & dashboard │ ├── app.js # Client-side reactivity, Chart.js charts, clipboard paste │ ├── style.css # Modern typography & receipt paper styling │ └── demo_slips/ # Realistic vectorized dhaba and restaurant KOTs ├── Dockerfile # Container configuration └── run.bat # 1-click Windows desktop launcher Enter fullscreen mode Exit fullscreen mode 🛠️ How I Built It PaperToProfit was engineered with a strict philosophy: zero-latency local execution, resilient multi-engine fallbacks, and zero proprietary lock-in.
Reading faded carbon copies and cursive handwriting is notoriously difficult for traditional OCR. We implemented a 3-tier cascade:
Rather than training heavy custom time-series models (like Prophet or ARIMA) which require hundreds of data points and fail on small restaurant samples, we leveraged TabPFN-3.5, Prior Labs' in-context tabular foundation model:
For neighborhood food businesses, open-source AI isn't just an alternative—it is the only way this business model can survive:
A typical neighborhood dhaba generates 100 paper slips a day (~3,000 bills/month).
Small business owners are extremely sensitive about their daily cash drawers, tax numbers, and supplier margins. Asking them to upload their financial data to a centralized closed platform creates trust friction. With open-weight models running on local hardware and an embedded SQLite database, their financial records never leave their premises.
Every region has unique handwritten slang ( "cutting chai", "1 pl paneer", "half fry", "bun maska", "2 bt naan" ). Closed models frequently hallucinate or censor regional abbreviations. Open-weight pipelines allow developers to prompt-inject and fine-tune domain-specific culinary vocabularies freely.
This entire project—from the FastAPI architecture and spatial line-clustering algorithm to the TabPFN predictive integration and mobile-responsive UI—was built with pair-programming assistance from Antigravity.
My father is a local shopkeeper, and like millions of small shop owners and diner operators, his counter is always stacked with physical paper slips and handwritten receipts.
To test PaperToProfit with genuine, messy handwriting rather than clean synthetic data, I pulled out an old paper slip that was lying at home from my father's collection of shop bills.
I ran the photo through the pipeline right in front of him. In less than 2 seconds, the multimodal vision engine parsed the faded ink, item names, quantities, and prices into the interactive review card, calculating the totals automatically.
When he saw the app categorize the items and populate the live ledger without any manual typing, he was genuinely impressed and found it very helpful:
"At the end of a long day in the shop, sitting with a pen, paper, and calculator to total up crumpled slips is exhausting. Half the time, small calculation errors slip through. Having a tool where you just point your phone camera at an old slip and it reads the numbers, saves the record, and tells you what you actually earned is a massive relief."
Open-source AI has reached an inflection point where solo builders can create practical, high-impact utilities that solve real-world problems for small businesses that Silicon Valley tech leaves behind. PaperToProfit turns everyday paper trash into actionable business intelligence—private, affordable, and 100% open.