DEV Community

Aryan 74
Aryan 74

Posted on

I Built an AI Assistant for My Dad’s Wholesale Business

I Built an AI Assistant for My Dad’s Wholesale Business

My submission for the Hacktoberfest Weekend Challenge — Build for a Friend.

I didn't have to think very hard about who I wanted to build for.

My dad.

He runs a wholesale business, and like many small business owners, a lot of his work happens inside Excel.

Invoices. Customers. Payment history. Outstanding amounts.

The data is there.

But there's one question that still requires a lot of manual work:

“Who should I call first?”

That's the problem I decided to solve this weekend.


The Problem I Had Already Seen

This wasn't a problem I discovered while brainstorming a hackathon idea.

I'd seen it at home.

My dad would go through his spreadsheet, look at outstanding invoices, remember which customers usually paid late, check how much they owed, and then decide who needed a follow-up.

None of this is particularly complicated individually.

But when you're dealing with a lot of customers and invoices, it becomes repetitive.

And the frustrating part is that the information needed to make the decision already exists in the spreadsheet.

I kept thinking:

Could we just make the computer do the first pass?

Not make the decision for him.

Just help him decide where to start.

So I built Collection Radar.


What Is Collection Radar?

Collection Radar is a local AI tool that takes an existing wholesale invoice spreadsheet and turns it into a collection priority list.

The workflow is intentionally simple:

Upload Excel → Learn from history → Predict risk → Prioritize invoices

For historical invoices, the model can learn from information such as:

  • Invoice amount
  • Customer
  • Previous late payments
  • Average payment time
  • Credit period
  • Outstanding amount
  • Region
  • Whether the invoice was eventually paid late

Then, for current outstanding invoices, it estimates the likelihood of late payment.

The result is grouped into:

🔴 High Risk
🟠 Medium Risk
🟢 Low Risk

But I didn't want to stop at a probability score.


Risk Isn't the Same as Priority

Imagine the model gives me:

Invoice A: 80% chance of being late
Invoice B: 65% chance of being late

At first glance, Invoice A seems like the obvious one to call.

But what if:

  • Invoice A = ₹15,000
  • Invoice B = ₹5,00,000

The business impact is very different.

So Collection Radar also calculates potential cash exposure:

Potential Exposure
= Late Payment Probability × Invoice Amount
Enter fullscreen mode Exit fullscreen mode

Now the system isn't simply asking:

“Which invoice is risky?”

It's asking:

“Which risky invoice could have the biggest impact on cash flow?”

That's much closer to the decision my dad actually needs to make.


Why TabPFN?

This project gave me an excuse to experiment with TabPFN, a model designed specifically for tabular data.

And this problem is almost entirely tabular.

There's no need to build a complicated chatbot around the data.

The input is structured:

Customer
Invoice Amount
Payment History
Credit Period
Outstanding Amount
...
Enter fullscreen mode Exit fullscreen mode

And the thing we're trying to predict is also straightforward:

Paid Late = Yes / No
Enter fullscreen mode Exit fullscreen mode

TabPFN learns patterns from the historical data and uses them to score current invoices.

One thing I deliberately didn't want to do was claim that TabPFN is automatically better than every other model.

That's something I want to measure.

For the next version, I'll benchmark TabPFN vs XGBoost using the same dataset and compare metrics such as ROC-AUC, F1, accuracy and runtime.

If XGBoost performs better, that's the result.

The point is to build something useful, not force the technology to win.


Why Local AI Was Important

This is probably the most important product decision I made.

We're dealing with real business information.

Invoices contain financial data, customer information, payment behaviour and other details that shouldn't casually be sent to external services.

So I wanted Collection Radar to run locally.

The idea is:

  1. Set up the model while connected to the internet.
  2. Cache the model locally.
  3. Disconnect from the internet.
  4. Open Collection Radar.
  5. Upload the spreadsheet.
  6. Run the prediction locally.

The invoice data doesn't need to be sent to a cloud AI service for inference.

For a small business, I think that matters.

You shouldn't need an enterprise infrastructure team just to experiment with AI on your own spreadsheet.


Who should I call first?

That's why the UI is deliberately simple.

Upload the spreadsheet.

Map the columns.

Run the model.

Get the priority list.

The technology is behind the scenes.

The output should be understandable in a few seconds.


The Architecture

The current version is intentionally small:

                 Excel / CSV
                     │
                     ▼
              Data Preparation
                     │
                     ▼
              Local TabPFN
                     │
                     ▼
              Risk Probability
                     │
                     ▼
          Cash Exposure Calculation
                     │
                     ▼
            Collection Priority
Enter fullscreen mode Exit fullscreen mode

The application is built with:

  • Python
  • Streamlit
  • Pandas
  • scikit-learn
  • TabPFN
  • OpenPyXL

I've also kept the UI and ML logic reasonably separated so the interface can evolve without having to rebuild the model pipeline.


What I Learned

The biggest lesson from this project wasn't actually about machine learning.

It was about starting with a person instead of starting with technology.

Before this challenge, I would often approach projects by asking:

“What can I build with this new AI tool?”

This time I started with:

“What does someone I care about struggle with?”

That led me somewhere much more interesting.

My dad didn't ask for TabPFN.

He didn't ask for an AI assistant.

He didn't ask for a risk model.

He had a spreadsheet and a repetitive problem.

I chose the technology after understanding the problem.

That changed the way I built the project.


From “I Should Build This” to Actually Building It

The most personal part of this project is also the simplest.

I'd known about this problem for a while.

I'd watched my dad work with spreadsheets and manually decide which customers needed attention.

At some point I thought:

There has to be a better way to do this.

And then, like a lot of side-project ideas, it stayed in my head.

Until this challenge.

The Build for a Friend theme gave me the push to finally turn that idea into something real.

It's still a prototype.

It's not going to magically solve collections tomorrow.

But now I can actually put it in front of my dad and ask:

“Would this make your work easier?”

And I think that's a much better test than asking whether a demo looks impressive.


What's Next?

This is V1.

There are a few things I want to add next.

V2: Model Benchmarking

Compare:

TabPFN vs XGBoost

on the same historical data.

I'll measure:

  • ROC-AUC
  • F1
  • Accuracy
  • Runtime

Better Collection Intelligence

Eventually I'd like to add:

  • Due dates
  • Days overdue
  • Aging buckets
  • Outstanding balance
  • Payment terms
  • Customer-level payment history
  • Collection/follow-up status

And eventually, instead of only showing invoice-level risk, I'd like to show something like:

Customer F

Outstanding: ₹4.8L
Invoices: 7
Average Payment: 47 days
Late Payments: 5/9

Current Risk: 🔴 HIGH
Enter fullscreen mode Exit fullscreen mode

That starts turning Collection Radar from a prediction tool into an actual collection assistant.


Try It

The project is open source.

GitHub:
https://github.com/aryan7412/invoice-py.git

I'd genuinely love feedback from people who run small businesses or work with accounts receivable:

What would you want an AI assistant to tell you when you open your invoice spreadsheet?

Because that's ultimately what I'm trying to build.

Not an AI demo.

Not another dashboard.

Just something that can look at a messy spreadsheet and say:

Built for my dad. ❤️

Top comments (0)