All software

Prototype

ERP Vigneron

Order management for independent winemakers

An order entered once becomes a picking list, a Swiss QR-bill invoice and a stock movement. A working prototype, preceded by a market study.

Status
Working prototype, not deployed
Role
Market research, product design, UI design and development
Period
November 2026
Working name
Sarment

All the data shown is fictitious: the estate, its customers and its orders are generated for the demo. The interface itself is in French.

From the order to the QR-bill invoice, then to the stock ledger: the full flow, recorded on the local instance.

The starting point

An independent winemaker receives orders by phone, by email, by WhatsApp or at the cellar door. They are then copied into a spreadsheet, into an invoicing tool, then into a stock sheet. The same order is entered three times, and every copy is a chance to get it wrong.

In this prototype, it is entered only once. The “Prepare and invoice” button checks the stock, computes the VAT included in the price, numbers the invoice, generates the QR-bill payment part and takes the bottles out of stock in a single transaction: either everything is committed, or nothing is.

What a single entry triggers.

  1. The order arrives

    It is entered by the estate, whatever the channel, or directly by the customer on the public order page.

  2. Picking

    The order screen lists what has to come out of the cellar, converted into cases of six.

  3. Invoicing

    One click creates the invoice and its QR-bill payment part, ready to print or save as a PDF.

  4. Stock

    The bottles leave through a sale movement. Stock is never edited by hand: it is the sum of the movement ledger.

  5. Payment

    Once the money is received, the invoice is marked as paid and leaves the list of open invoices.

The interface

The stack

Every tool is there for a specific reason.

Next.js 16
Server-rendered pages for reads, server actions for writes. No separate API to maintain.
React 19 and TypeScript
Interface and business logic typed end to end.
SQLite through libSQL
Hand-written SQL, no ORM. Nine tables, and stock computed from the movement ledger.
swissqrbill
QR-bill payment part rendered as SVG, with the reference and its check digit.
Tailwind CSS 4
Interface styles, complemented by an A4 print stylesheet for invoices.

The architecture

Local

Everything runs on a single workstation. On first access, the server creates the SQLite database and seeds it with a fictitious estate: seven wines, fifteen customers and fifty-five orders, generated from a fixed seed. A button resets the demo.

Development workstation

  • Browserlocalhost
Print
  • PDF invoiceA4 layout by the browser
HTTP
  • Next.js serverServer components and server actions
SQL, transactions
  • SQLiteOne file, created and seeded on first access

Production

Planned, not deployed yet

The code already reads the database address from an environment variable: replacing the local file with a hosted libSQL database requires no change. The hosting provider is still to be chosen.

Node hosting

  • Estate's browserBack office
  • Estate's customersPublic order page
HTTPS
  • Next.js applicationThe same code as locally
libSQL, access token
  • Hosted libSQL databaseInstead of the local file

In numbers

9
screens
9
SQL tables
7
server actions

Figures counted in the software's repository.

What's left to do

  • No authentication: the prototype assumes a single user.
  • A single estate per database.
  • No email sending and no online payment.
  • No automated tests yet.
  • Field validation is still to be done: visits to winemakers must come before any product.

A business tool to build, or a role to fill?

Contact me