Every batch. Every cost. Every rupee.
What if a home baker or a small snack seller could stop guessing their profits and actually understand the numbers behind every production batch?
That question inspired me to build Batchwise, an AI-assisted costing and profit intelligence tool designed for India's home-based food businesses.
Built for the Hacktoberfest 2026 Week 2 โ Side Hustle Challenge, Batchwise combines AI-powered note parsing with deterministic financial calculations to help small business owners understand their costs, pricing, and profitability.
๐ Live Demo: https://batchwise-henna.vercel.app/
๐ป GitHub Repository: https://github.com/Tanmay-Dalvi/batchwise
1. The Problem: Revenue Isn't Profit
Imagine running a small homemade ladoo business.
You buy besan, oil, packaging materials, and other ingredients. You spend money on gas, electricity, labour, and transportation. Then you sell your products.
At the end of the day, you know how much money you received. But do you know how much you actually earned?
Many small food businesses still rely on notebooks, rough estimates, or manual calculations. Costs get missed, profit margins become unclear, and selling prices may not cover the actual production expenses.
I wanted to build something that could make these calculations simpler, more transparent, and more reliable.
2. Meet Batchwise
Batchwise is an AI-assisted costing and profit tracking application for home bakers, homemade snack sellers, tiffin services, and other small food businesses.
The name has a simple meaning:
- Batch means one real production run, whether it is a batch of ladoos, a set of bread loaves, or a day's tiffin orders.
- Wise represents making informed, data-driven financial decisions instead of relying on guesswork.
Together, Batchwise means making smarter business decisions, one production batch at a time.
Its core promise is simple: Every batch. Every cost. Every rupee.
3. Cost Every Batch, Not Just Every Ingredient
The Batch Costing Engine lets users enter ingredients, quantities, purchase pack sizes, purchase prices, packaging, labour, fuel, delivery, and other expenses.
It converts purchase costs into the quantities actually used in a batch, then calculates the financial results using Python's Decimal arithmetic.
Users can see:
- Total production cost
- Cost per sellable unit
- Break-even selling price
- Projected revenue and net profit
- Profit margin versus markup
- Break-even sales volume
- Target-margin pricing recommendations
- A transparent calculation audit trail
Users can also save recipes, reuse them for future batches, and maintain a history of recorded production runs.
A real calculation
Consider a sample batch with these costs:
| Item | Cost |
|---|---|
| Besan | โน600 |
| Oil | โน180 |
| Packaging | โน80 |
| Total batch cost | โน860 |
Suppose the batch produces 75 sellable packets, each priced at โน25.
| Metric | Result |
|---|---|
| Cost per packet | โน11.47 |
| Projected revenue | โน1,875 |
| Projected profit | โน1,015 |
| Profit margin | 54.13% |
| Markup on cost | 118.02% |
| Break-even quantity | 35 packets |
These figures assume all 75 packets are sold at the planned price, with no additional costs beyond those entered.
An important distinction: profit margin measures profit as a percentage of revenue, while markup measures profit as a percentage of cost. They are not interchangeable.
4. From Messy Notes to Structured Data with AI
One of the most useful features is the AI Note Parser.
Small business owners don't always record expenses in a neat spreadsheet. They might write something like:
Sourdough batch: 2 kg flour 140, yeast 30, butter 120, electricity 50, baked 8 loaves, selling for 90 each.
Manually converting that note into structured ingredient entries takes time.
Batchwise uses AI to extract candidate fields from natural-language notes and prepare them for the costing workspace.
The important part is that the AI does not get to decide the final financial result.
The workflow is:
- The user pastes a purchase or production note.
- The AI extracts candidate ingredients, quantities, prices, and yield information.
- Batchwise highlights missing or ambiguous information.
- The user reviews and corrects the extracted fields.
- The confirmed information is transferred into the costing workspace.
- Python performs the actual financial calculations.
For example, a note that says โyeast 30โ does not establish how much yeast was used. Batchwise can flag the missing quantity instead of silently treating an assumption as fact.
5. Why Deterministic Math Matters
AI is useful for understanding unstructured language, but financial calculations need to be predictable and verifiable.
That is why Batchwise separates AI-based extraction from financial computation.
The AI helps interpret what the user wrote. The Python calculation engine handles the numbers.
The engine uses Decimal arithmetic to avoid common binary floating-point representation issues in monetary calculations. It validates units, rejects invalid production yields, and maintains a calculation audit trail.
This separation makes the results easier to verify and reduces the risk of an AI-generated numerical answer being mistaken for an accurate financial calculation.
6. Built Local-First, with Privacy in Mind
Batchwise was designed with local-first usage in mind because recipes, ingredient prices, and supplier costs can be sensitive business information.
The local development setup supports Gemma 3 1B through Ollama. This allows AI parsing to run locally without requiring a paid AI API.
The hosted demo has a separate deployment environment. Any external AI provider used in hosted mode must be configured explicitly, and users should be told when their notes are sent to that provider.
The principle remains the same: AI should help structure the data, but users should retain control over what they submit and confirm.
7. The Technology Stack
Batchwise brings together a lightweight frontend, a Python backend, a deterministic calculation engine, data persistence, and AI-assisted extraction.
- React, TypeScript, and Vite: Interactive frontend
- FastAPI: Backend API
- Python Decimal: Financial calculations
- SQLite and SQLAlchemy: Data persistence
- Gemma 3 1B with Ollama: Local AI note parsing
- Gemini API: Hosted AI parsing when configured
- Vitest and React Testing Library: Frontend tests
- Pytest: Backend tests
- Vercel and Render: Frontend and backend hosting
[INSERT DIAGRAM 4 HERE โ Batchwise technology stack]
Suggested caption: The technologies powering Batchwise, from its mobile-friendly interface to its AI-assisted parsing and financial engine.
8. Testing and Verification
The project has a backend test suite covering calculation logic, unit handling, API endpoints, database operations, and AI parser behavior.
The frontend includes tests for currency formatting, financial summaries, the AI review flow, and costing workspace behavior.
During development, the reported verification results included:
- 67 backend tests passing
- 16 frontend tests passing
- A successful frontend production build
- End-to-end checks of calculation, recipe management, batch history, and AI extraction
These tests are important because a financial tool should be more than visually appealing. It should handle invalid inputs, make assumptions visible, and produce reproducible results.
9. What's Next?
Batchwise is a starting point for making financial clarity more accessible to small food businesses.
Future improvements could include better multilingual note extraction, more detailed expense tracking, downloadable reports, and reliable persistent storage for hosted users.
The goal is not to overwhelm small business owners with complicated accounting software. It is to give them a practical way to understand the economics of each batch they produce.
Final Thoughts
Building Batchwise reinforced one idea for me: useful AI products don't need to hand every decision over to a language model.
Sometimes the strongest design is to let AI handle the messy human input and let deterministic software handle the math.
For a small business, understanding the difference between revenue and profit can matter more than a flashy dashboard.
Batchwise is my attempt to make that understanding simpler, one production batch at a time.
๐ Try Batchwise: https://batchwise-henna.vercel.app/
๐ป Explore the code: https://github.com/Tanmay-Dalvi/batchwise
Built for the Hacktoberfest 2026 Week 2 โ Side Hustle Challenge.








Top comments (0)