Inspiration

Small IT resellers in India still sell laptops over WhatsApp, phone calls and email. A single enquiry means retyping the customer's specs, checking a stock sheet, reading three distributor replies with different formats, building a quote in Word, and then handing numbers to the accountant who re-enters them into Tally. Every step is manual, and every step is where a wrong RAM size or a missed warranty term slips in. We wanted one desk where that whole journey lives, with AI doing the one job it is good at: reading messy text.

What it does

SourceDesk is a sales workspace for a small laptop reseller. It covers the full flow from enquiry to dispatch:

  • Capture a lead by typing it in or pasting call notes or a customer message. Nemotron extracts quantities, processor family, RAM, SSD, condition, warranty and deadline into a structured draft that staff review and correct.
  • Match stock against the confirmed spec. Near matches show their exact differences, and any substitution needs explicit approval.
  • Compare distributor offers by pasting supplier replies. The model pulls out price, freight, GST terms, quantity, delivery time and expiry, and the app shows landed cost side by side with the original message text.
  • Quote with frozen buyer, product and price snapshots, printable to A4. Mark it sent, record acceptance, and the app reserves supplier quantity.
  • Receive and allocate serials, then prepare a Tally accounting-voucher XML and a labelled invoice draft for the accounts team.
  • Pack and dispatch after specification, accessory, invoice and address checks, with courier and tracking recorded.

The AI is deliberately boxed in. It may extract; it may not approve substitutions, invent stock, set prices or create invoices. Code does the matching, arithmetic, reservations and dispatch gates. Ambiguous input like "AMD 9" becomes a clarification question rather than a guess. Every AI result in the UI is labelled with the model name.

How we built it

  • Frontend: React and TypeScript on the Next.js App Router, deployed as a Cloudflare Worker. Records persist in validated browser storage with a recovery path for corrupted data.
  • Domain logic: a framework-free lib/ layer for matching, quotation snapshots, reservations, receipt and dispatch gates, document generation and Tally XML. All of it is unit-tested under plain Node.
  • AI: NVIDIA Nemotron 3.5 Lightning served by Nebius Token Factory through its OpenAI-compatible chat completions API in JSON mode, with reasoning disabled to keep the full output budget for structured extraction. A single server route owns the key, bounds request and response sizes, enforces a 30 second timeout, and validates every model response against Zod schemas before anything reaches the browser.
  • Verification: 38 automated tests plus lint, typecheck and production build. A live check script makes two real inference calls against Nebius with fictional lead and supplier notes and asserts the extracted fields.
  • Accounting handoff: Tally XML follows TallyHelp's published voucher samples, with balanced debit and credit entries computed in paise and explicit CGST+SGST or IGST selection.

Challenges we ran into

  • Keeping the model honest. Early runs returned invalid or over-eager output. Schema validation rejects it, and the prompt was tightened so unclear specs surface as questions instead of confident guesses.
  • JSON output budget. Nemotron's reasoning trace was eating the token budget on long supplier messages. Disabling reasoning for the extraction call fixed truncated JSON.
  • Supplier replies are chaos. Freight quoted per shipment versus per unit, GST inclusive versus exclusive, and expiry buried in a sentence. We kept the original message text visible next to every extracted field so staff can check in one glance.
  • Tally is unforgiving. Ledger names must match existing masters exactly and repeated imports can duplicate vouchers. We labelled the export as accounting-only and unvalidated rather than overclaiming.
  • Print layout. An orphaned second page on the sample invoice took a round of A4 preview tuning in Safari and Chrome.

Accomplishments that we're proud of

  • A complete enquiry-to-dispatch journey that runs end to end in the browser, including persistence after reload.
  • Live Nemotron extraction on Nebius Token Factory for both leads and supplier offers, verified with real inference and recorded in the demo.
  • A clear separation between what the model drafts and what code decides, so a wrong extraction can never silently become a wrong invoice.
  • Honest limits documented up front: fictional data, no real Tally import validated, and the administrative-cost saving stated as a target to measure, not a result.

What we learned

  • Extraction is the right job for an LLM in a sales workflow. Decisions are not. Drawing that line early made the rest of the design simple.
  • JSON mode plus a strict schema plus a human review step beats a cleverer prompt.
  • Reasoning models need their reasoning turned off for tightly bounded structured output tasks.
  • Small resellers do not need a new ERP. They need their existing text to turn into structured records without retyping.

What's next for SourceDesk

  • Authentication and per-user request quotas before any public hosting with a provider key.
  • Real connectors for WhatsApp and email intake, and CSV inventory import.
  • Validate the Tally export against a test company with an accountant, then extend to inventory vouchers.
  • Measure the actual time saved per enquiry with a pilot reseller, including review and correction time.
  • Multi-user shared storage so sales and accounts work from the same records.

Built With

  • cloudflare-workers
  • nebius-token-factory
  • next.js
  • node.js-test-runner
  • nvidia-nemotron-3.5-lightning
  • playwright
  • react
  • tally
  • typescript
  • zod
Share this project:

Updates

Submission history