---
title: "MedVoice"
description: "How a wholesale billing workflow can accept speech without letting a model decide the medicine, the price, or the tax."
canonical: "https://www.ayushrai.site/work/medvoice/"
last-updated: "2026-10-16"
---

# MedVoice

Source: https://www.ayushrai.site/work/medvoice/
Markdown: https://www.ayushrai.site/work/medvoice.md

How a wholesale billing workflow can accept speech without letting a model decide the medicine, the price, or the tax.

Status: in-progress. Type: product. 2026–present.

## Problem

At a pharmaceutical wholesaler, the person on the floor speaks or writes a line and someone else types the invoice. Look-alike names, strengths, and pack sizes make a silent guess expensive.

## Context

The users are floor workers, plus the owners, accountants, and managers who have to stand behind GST invoices. MedVoice is meant to sit beside Marg, Busy, or Tally, not replace them in the first version. The repository was created on 3 Aug 2026. There is no public demo.

## Role

The repository is under my GitHub account. Commits I sampled are attributed to MedVoice Agent, not to a personal git author, so I am not using commit messages as a diary of what I typed. The reasoning below follows the product and safety documents in MedVoiceERP.

## Thinking

The engineering constraint is the product. Speech is an input. Medicine identity comes from the tenant catalog. Ambiguity forces a confirmation. Quantity, price, and tax stay on deterministic code. An invoice write has to be idempotent, and a failed ERP sync cannot be shown as a completed sale.

## Execution

The repo is a pnpm monorepo. Domain code and a NestJS API implement matching, order state, confirmation, integer-paise GST on the voice path, and in-memory idempotent invoicing. A Next.js admin can search the demo catalog, list orders, and inspect voice sessions without raw audio. Mock and CSV ERP adapters exist. The Android worker is a Kotlin scaffold with a push-to-talk recorder. Speech defaults to a mock provider. Postgres and Redis are prepared. The API still runs on an in-memory demo catalog unless that wiring is finished.

## Outcome

The documented founding loop can run locally with mock speech and fixture medicines. A real warehouse catalog, production speech, a field-ready Android app, stock reservation, invoice PDFs, and live ERP posting are still ahead. The stack choice is explicitly provisional. What works today: domain matching, order state, confirmation, integer-paise GST on the voice path, in-memory idempotent invoicing, Next.js admin over a demo catalog, and mock/CSV ERP adapters. What remains incomplete: production speech, live ERP posting, stock reservation, invoice PDFs, and a field-ready Android app.

## Lessons

- In a billing system, the model's job ends at a candidate list.
- A local mock loop is real engineering, and it is not a deployment. The docs are right to keep those sentences apart.

## Technologies

- TypeScript
- NestJS
- Next.js
- Kotlin
- PostgreSQL
- Redis

## Links

- GitHub: https://github.com/ayushrai-hub/MedVoiceERP

## Needs confirmation

Unverified. Do not cite these as facts.

- Which portions were written by me versus coding agents. Sampled commits use the author name MedVoice Agent.
- A 26 Aug 2026 commit message mentions Supabase, Tally, Razorpay, and e-invoice work that the 25 Aug 2026 product overview still lists as incomplete. I did not promote those names to done.
- No public demo URL has been verified.

_Unverified award metrics are omitted. Wording matches the public site._
