Founder Walkthrough Guide - Dhingra Ops / Invoice Capture

Last reviewed from code: 2026-07-02

This guide is written for a non-technical founder demo. It explains what the app is, what each screen does, how the founder or staff would use it, what is currently working, what is not yet connected, and where uploaded invoices are stored today.

Use this as your presentation script and as a quick memory reset before the meeting.

1. One-minute explanation

This is an internal operations app for Dhingra Brothers / Dhingra Distributors. It started as an invoice capture app, but now it also covers the daily distributor operations around invoices:

Plain-English positioning:

"This is not just a scanning app. It is a digital invoice control room for the distributor business: capture the bill, prove the delivery documents, catch mismatches, track approvals, and know who still owes money."

2. Current pilot status

What is currently built:

Important current caveats:

3. The main users and what each one can do

Worker

The worker is the person in the field or at the receiving point capturing documents.

Main tabs:

Worker can:

Worker cannot:

Admin

Admin is the highest-control role.

Admin can:

Manager

Manager can:

Manager generally cannot:

Finance

Finance can:

Finance generally cannot:

Reviewer

Reviewer can:

Reviewer is mainly a visibility/review role, not a data-admin role.

4. Important business terms

Seller entity

This is which Dhingra legal entity issued the invoice.

Current entities in the capture screen:

The worker selects this during capture. The GSTIN identifies the entity.

Buyer

The customer/buyer receiving goods. Examples include Flipkart, Max Hypermarket, Airplaza/Vishal Mega Mart, Innovative Retail Concepts, Zepto, and V-Mart.

The app stores buyer name, GSTIN, sales channel, default credit terms, and optional buyer branches/stores.

Principal

The brand/principal whose goods are being distributed, such as Britannia, Mondelez, Nestle, Haleon/GSK, etc.

Invoice series

Invoice numbers often start with a prefix that tells us the entity/principal. The app has a series registry. During capture, typing an invoice number can show a chip identifying the detected series/principal/entity.

Example concept:

Payment type

The invoice can be marked:

Credit invoices can have payment terms in days. The backend calculates a due date and includes the invoice in receivables if unpaid.

Supporting document

Any extra document needed to prove receipt/acceptance by a buyer. Examples:

Different buyers can require different supporting documents.

Exception

An exception is an open issue raised by the system. Examples:

Dispute

A dispute is a business issue raised by a person or by gate-entry mismatch. Supported dispute types include:

Receivable

Money still owed by buyers on credit invoices. The app groups outstanding amount by buyer and aging bucket.

5. Login and navigation

The app starts at Login.

After login:

There is a Server Settings screen where the backend URL can be changed. The default URL in the code is:

https://13-234-176-9.sslip.io

Presentation note:

Current pilot login note:

6. Worker workflow: how to capture an invoice

Step 1: Open Capture

Worker sees a simple Capture tab with a "Capture Invoice" button.

What to say:

"The worker does not need to understand the whole system. Their job starts here: photograph the invoice and submit it."

Step 2: Take invoice photo

The camera opens with crop guides. The app asks for camera permission if needed.

After taking the photo:

Step 3: Add more invoice pages if needed

On Review Invoice:

Step 4: OCR preview tries to help

When the review screen opens, the app sends the first invoice photo to the backend OCR preview endpoint.

If OCR succeeds, it may fill empty fields like:

Important:

What to say:

"OCR is assistance, not blind automation. We still keep the worker in the loop so a wrong read does not become a wrong ledger entry."

Step 5: Select seller entity

Worker chooses one of:

This maps the invoice to the right legal entity/GSTIN.

Step 6: Enter invoice number

The worker types invoice number.

If the prefix matches the series registry, the app shows a chip with detected series/principal/entity information.

Step 7: Select buyer

Worker can:

When buyer GSTIN is known, the app fetches that buyer's required supporting documents.

Step 8: Select branch/store if configured

For buyers with branches or store/warehouse locations, the app can show a delivery branch picker.

Useful for:

Step 9: Select Cash or Credit

Worker marks the invoice as:

If Credit:

Step 10: Enter date and amounts

Worker enters:

Validation in the form prevents impossible totals, such as taxable amount being greater than total amount.

Step 11: Capture required supporting documents

The Supporting Documents screen shows what is required for that buyer.

Examples:

For buyer-generated documents, the UI tells the worker to ask the store/buyer for it.

If no documents are configured for that buyer, the screen says no additional documents are required.

Step 12: Submit bundle

When submitted:

  1. The capture bundle is saved locally in Hive.
  2. The app tries to sync immediately.
  3. If upload succeeds, it goes to the server.
  4. If upload fails, the app keeps it offline and shows that it will sync when connection is restored.

7. Offline queue: what happens when network is bad

The Queue tab shows every local capture bundle and status:

The worker can tap Sync.

The sync process is resumable:

Business value:

"A field worker can continue capturing even without stable internet. The phone becomes a safe temporary queue."

8. Worker "My Invoices"

The My Invoices tab lets a worker see backend status after sync.

It shows:

Possible states include:

Presentation note:

9. Owner dashboard: what the founder sees

Owner-side users see five tabs:

Dashboard

Dashboard shows:

Admin/Manager also have a camera icon to capture an invoice from the dashboard.

Sales report section

The dashboard includes sales reporting. Backend supports grouping by:

Default date range is current month if dates are not supplied.

Business value:

"The founder can see not just documents, but how sales are split by brand, buyer/channel, entity, and team."

10. Invoice list and search

The Invoices tab shows all invoices.

Search can match:

Each row shows:

Tapping an invoice opens Invoice Detail.

11. Invoice detail screen

This is the most important owner screen.

It shows:

Document viewing

Documents are grouped by document type:

Owner can tap View:

Manager/Admin can also view document version history.

Document version history

If a manager/admin replaces an existing supporting document type, the backend does not overwrite the old file. It appends a new immutable version.

This gives:

Exceptions

Open exceptions appear in the invoice detail screen.

Users can mark an exception:

Examples of exception types:

Disputes

The user can raise a dispute/note issue from the invoice detail screen.

Supported dispute types:

Dispute statuses:

For credit-note disputes, the UI supports uploading a credit note via camera or gallery.

Gate entry details

For Gate Entry Note documents, the detail screen has a gate-entry action.

User can enter:

If accepted quantity is less than invoice quantity, or a discrepancy is entered, the backend automatically raises a short-receipt dispute.

Business value:

"If a buyer accepts less quantity than billed, it is captured immediately and becomes a receivable/dispute item instead of getting lost in WhatsApp or memory."

Approval buttons

If an invoice is waiting for approval, Manager/Finance/Admin can approve or reject from invoice detail.

Approval depends on the workflow state:

Audit trail

The audit trail records events on the invoice, such as:

This is important for accountability.

12. Alerts: what alerts the founder will get

Current alerts are in-app only.

Where alerts appear:

Current alert feed includes:

Examples:

What is not built yet:

What to say:

"Today alerts are inside the app. The next step for proactive alerts would be WhatsApp/SMS/email or Firebase push, depending on what channel the team actually wants staff to respond on."

13. Receivables and payment collection

The Receivables tab is for credit invoices.

It shows:

Tapping a buyer opens that buyer's receivable invoices.

Payments:

Important nuance:

14. More tab and admin/master data

The More tab includes:

Principals & series

Shows:

Admin can:

Why it matters:

Buyers

Shows all buyers and GSTINs.

Admin can edit:

Branch data is used during capture.

Buyer document requirements

Admin can configure what extra documents each buyer requires.

Fields:

Current limitation:

Approval rules

Admin can configure rules that determine when manager or finance approval is required.

Supported fields:

Supported operators:

Supported actions:

Default policy when there are no custom rules:

Important nuance:

15. Where invoices are stored today

This is the exact answer to "S3 is not connected, so where are invoices currently being stored?"

Before upload: on the phone

When a worker takes a photo:

This means the phone can hold unsynced captures offline.

After upload: on the server

The backend has a local storage layer, not S3.

In code:

In production compose:

The database stores:

The actual image bytes are on disk in the storage volume, not inside Postgres.

When owner views a document

Owner app downloads the image from backend and stores a local copy in the app's private documents area:

.../downloads/<invoice_id>_<document_id>_latest.jpg

What this means operationally

Pros:

Risks:

Founder-friendly version:

"Right now the invoice images are saved on the pilot server's disk volume, with metadata in Postgres. S3 is the natural next step for durable, backed-up document storage."

16. OCR and AI status

What exists:

What to be careful about:

Best demo phrasing:

"OCR is already integrated as an assistive layer, but the product is designed to remain usable even when OCR fails. Manual verification is still the source of truth in the pilot."

17. Backend workflow: what happens after upload

After an invoice is uploaded:

  1. Backend creates invoice row.
  2. Backend stores the primary document image.
  3. Backend creates document and document version rows.
  4. Backend writes audit event.
  5. Backend starts Temporal workflow.
  6. OCR extracts invoice data if available.
  7. Validation compares extracted data against submitted invoice data.
  8. If validation fails, exception is raised.
  9. Approval rules determine whether manager/finance approval is required.
  10. Approved invoice eventually becomes archived.

Supporting documents:

  1. Supporting document is uploaded against existing invoice.
  2. Backend stores file and document/version row.
  3. For non-invoice-page documents, backend starts document matching workflow.
  4. OCR extracts lightweight header fields.
  5. Matching checks invoice number, buyer GSTIN, and amount where available.
  6. Mismatch or inconclusive OCR raises an exception.

Periodic ledger scan:

18. What is currently working

Based on code and task.md, these are built:

19. What is not done / not production-ready yet

Be transparent about these:

20. Suggested founder demo script

Opening, 2 minutes

Say:

"The problem is that invoices, gate entries, GRNs, disputes, and credit notes are spread across paper, WhatsApp, memory, and delayed follow-up. This app makes the invoice a central record: photo, data, supporting proof, alerts, approval, receivable, and payment trail."

Show:

Worker flow, 8 minutes

Show:

  1. Worker Capture tab.
  2. Capture invoice photo.
  3. Review invoice page.
  4. Add another page.
  5. Buyer search/GSTIN lookup.
  6. Cash/Credit + terms.
  7. Supporting document checklist.
  8. Submit.
  9. Queue status.
  10. My Invoices status.

Say:

"Even if the worker is offline, the capture is not lost. It sits in the queue and syncs later."

Owner flow, 10 minutes

Show:

  1. Dashboard.
  2. Sales section.
  3. Recent invoices.
  4. All Invoices search.
  5. Invoice Detail.
  6. Document viewer.
  7. Exceptions.
  8. Raise dispute.
  9. Gate entry details.
  10. Audit trail.

Say:

"This is where the founder/manager sees what needs attention, not just what was uploaded."

Receivables, 5 minutes

Show:

  1. Receivables tab.
  2. Outstanding and overdue totals.
  3. Buyer drill-down.
  4. Record payment.
  5. Payment history in invoice detail.

Say:

"For credit sales, the app does not stop at capture. It becomes a collection tracker."

Admin setup, 5 minutes

Show More tab:

  1. Principals & series.
  2. Buyers.
  3. Buyer document requirements.
  4. Approval rules.

Say:

"The app is configurable around the real distributor business: brands, series, buyer branches, buyer-specific document proofs, and approval rules."

Close, 2 minutes

Say:

"The pilot is usable now for internal testing on one server. The next hardening steps are S3 storage, proactive notifications, password/MFA, photo quality checks, duplicate detection, and field testing on the actual device."

21. Founder FAQ

Is this a public SaaS product?

No. It is built for one internal Dhingra pilot.

Does it replace accounting software?

No. It does not replace Tally/ERP/accounting. It creates a controlled digital invoice/document/receivable workflow that could later integrate with accounting.

Are invoices stored in S3?

No. Today they are stored on the pilot server's local Docker storage volume at /data/storage, with metadata in Postgres. S3 should be added for durable production storage.

What happens if the worker has no internet?

The phone saves the capture locally. The Queue tab syncs later.

Does OCR fill the invoice automatically?

It tries to fill some fields, but the worker must verify everything. The app works manually even if OCR fails.

Will the founder receive WhatsApp/SMS alerts?

Not today. Alerts are inside the app. WhatsApp/SMS/email/push would be a next integration.

Can managers see the actual invoice image?

Yes. Invoice detail has document viewing. Images download from the backend and open in a zoomable viewer.

Can someone see who changed or uploaded what?

Yes. The audit trail records invoice events, uploads, approvals, disputes, payments, and gate-entry metadata.

Can duplicate invoice uploads happen?

The backend has some idempotency around invoice number during retry, but there is no friendly duplicate-warning screen before submit yet.

Can a payment above balance be recorded?

No. The backend rejects payments that exceed remaining invoice balance.

Can old document versions be seen?

Manager/Admin can view document version history. New versions are appended instead of overwriting previous versions.

Can buyer document requirements be removed?

Not yet. They can be added/updated, but delete is a known gap.

What should be built next?

Suggested next priorities:

  1. S3 document storage with backups/lifecycle policy.
  2. Push/WhatsApp/SMS alerts for exceptions, disputes, and overdue invoices.
  3. Password reset/change and MFA.
  4. Photo quality checks.
  5. Duplicate invoice warning.
  6. Capture draft recovery.
  7. Alert filters and aging.
  8. Field test with real workers and real buyer documents.

22. If the demo breaks

Quick troubleshooting:

23. Code map for your memory

Mobile:

Backend: