Sentinel a Silent Loss Detector for Small Businesses
This is how We Built 'Sentinel' : An AWS-Powered Silent Loss Detector for Small Businesses
The ₹35,000 nobody noticed
Picture a small electronics shop in Chennai. At the end of the month, the owner opens their accounting dashboard and sees this:
text
Revenue this month: ₹8,40,000
Expenses: ₹6,90,000
Profit: ₹1,50,000
Looks healthy. But here's what the same dashboard doesn't show:
₹35,000 of HDMI cables that have been sitting unsold since March
₹18,000 lost to a batch of power banks that arrived damaged
A supplier who has been quietly delivering 4–5 days late for two months
A single SKU , USB-C Cable , that goes out of stock every 6 weeks, each time costing roughly ₹12,000 in missed sales
One product variant driving 72% of all returns, with the same complaint
Three customer invoices now aged past 60 days
None of these scream "crisis." Each one alone is small enough to ignore. Together, they compound into lakhs of silent loss that never appears on a P&L statement.
This is the problem Sentinel was built to solve.
Why existing tools don't catch this
The standard small-business accounting stack Tally, Zoho Books, QuickBooks is designed to answer one question: what happened?
They will tell you revenue was ₹8.4 lakh. They will tell you expenses were ₹6.9 lakh. They'll produce beautiful pie charts of category-wise spending. But they will never tell you:
"Your reorder threshold for USB-C Cable is set 6 units below the level that would prevent the next stockout."
"Apex Distributors has been late on 5 of the last 6 orders, and every late delivery is followed within 3 days by a stockout on a product they supply."
"The Charging Dock has a return rate 3.2× the shop average, and 71% of those returns share the exact same reason on the exact same variant."
These aren't "what happened" questions. They're what's quietly going wrong, why, and what should I check first questions. And answering them requires connecting data that lives in four separate tables.
The Sentinel approach
Sentinel analyses seven datasets products, suppliers, deliveries, sales, stockouts, returns, and payments and produces seven classes of findings. But the flagship output is something a normal dashboard physically cannot produce: a root-cause chain.
Here's what a Sentinel chain looks like:
Apex Distributors delivery delays increased
↓
Stock replenishment cycle slowed
↓
USB Hub 7-Port ran out of stock 3 times
↓
47 customer orders unfulfilled
↓
Estimated missed revenue: ₹47,200
Notice the shape. Each individual arrow is unremarkable on its own a late delivery is just a late delivery. But cross-reference a delivery table against a stockout table against a sales table, and you get a story with an actual rupee figure attached to it.
That's the whole thesis of Sentinel: don't just detect anomalies, connect them.
The architecture
Sentinel runs on a serverless stack that costs nothing at demo scale and can scale to thousands of shops without a single configuration change.
The interesting design decision here is that all of the detection logic lives in a single function called analyze(). In the current build, that function runs in the browser so the app works offline and demos instantly. But it's deliberately framework-agnostic it takes a data object and returns an array of findings. That means we could lift it into a Lambda function unchanged and the app would get faster and more secure without a single line of business logic changing.
We think this is the right pattern for hackathon-shaped projects: ship the fastest possible version that works, but structure the code so the production upgrade is a deployment change, not a rewrite.
What fought back
Three things nearly broke us.
- The "explainability" problem. Every finding in Sentinel has to be auditable. No black boxes. That means each finding needs to carry its own evidence trail the exact numbers that triggered it, the source records, the reasoning. That's a lot of data per finding, and it meant we couldn't just return a boolean from each detector. We had to return a full evidence object. It made the code heavier but it's the single most important design decision in the whole project it's what turns a "smart dashboard" into something a business owner will actually trust.
- The "what does ₹1,50,000 actually mean" problem. Severity scoring is hard. Too aggressive and every finding is red. Too conservative and real problems get buried. We landed on a rule based on both absolute and relative thresholds: a finding is High severity at max(₹25,000, 1.2% of revenue), Medium at max(₹8,000, 0.4% of revenue). That way the same finding on a ₹2 lakh/month shop and a ₹20 lakh/month shop is weighted appropriately.
- The "detect the invisible" problem. Stockouts that occurred are easy you have the data. But unmet demand customers who asked for a product that wasn't on the shelf doesn't appear in any transaction log. There's no sale, no return, no complaint. We had to estimate it by comparing the demand rate on in-stock days against the sell-through on stockout days, then multiplying by the stockout duration. It's an approximation, and we say so in the UI. But it surfaces a category of loss that literally does not exist in any other report.
The demo
The live app is at https://main.dhje9buvb95c7.amplifyapp.com . Open the Dashboard. You'll see four totals count up: Capital Locked, Missed Revenue, Return Leakage, Overdue. Below that, the findings list sorted by severity. Click the top one, and you'll see the Root Cause Chain for Apex Distributors, with every arrow annotated by the actual data that supports it.
Then go to the Data tab and change a supplier's promised delivery time. The analysis re-runs immediately. Every total, every finding, every severity score updates.
Finally, open the Assistant and ask: "What should I fix first, and why?" It has your full business data as context, and it will give you a specific, ranked answer.
What we learned
Three things.
Serverless lets you build the right thing, not the cheap thing. If we'd been forced onto EC2, we'd have been paying for a VM to sit idle 99% of the time. With Lambda, our cost for the entire hackathon was effectively zero, and we spent that budget on the parts that actually matter.
Deterministic beats probabilistic for anything financial. It was tempting to throw everything at an LLM. We didn't, and it was the right call. Business owners need to be able to trace every rupee. A rule that says "a stockout within 3 days of a late delivery is a chain" is auditable. A model that says the same thing with 87% confidence is not.
The right UI for a business tool is boring on purpose. We spent an embarrassing amount of time getting the animations right not because they're flashy, but because they make the tool feel responsive and trustworthy. When a business owner clicks a finding, they need to feel like the software is doing real work for them. Motion, done tastefully, is how you communicate that.
What's next
The current build keeps everything in the browser. The production shape moves the engine and the model behind AWS services:
A Lambda chat proxy to Bedrock, so no API key ever touches the browser.
analyze() moves into a Lambda function and records go into DynamoDB.
S3 upload with an EventBridge trigger for new CSVs.
Cognito for sign-in and per-shop access.
An agent that calls the detectors as tools.
The roadmap is realistic, and none of it requires rewrites the engine is already shaped for it.
Built by Team NxtOps for the Bharat Builds Tour "First Commit" hackathon, in collaboration with WeMakeDevs and AWS.
If you run a small business, or know someone who does, give it a look. The numbers it finds are usually bigger than people expect.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article