Skip to content
Mehdi Messaoudene
Desktop applications · internal tools2026in service

Bio Réactifs

The laboratory reagent catalogue, on the workstation, and two companion tools for expenses and profitability. No internet, no server, no account.

Where it started

The technical catalogue lived in Excel workbooks that travelled by email. Each salesperson had their own version, nobody had the right one, and getting a technical sheet out for a customer meant finding the right supplier PDF in a network folder tree.

What was built

A desktop application holding the whole catalogue locally: instant full-text search, a guided Excel import that never destroys data, smart filing of supplier sheets, silent batch printing, automatic backups. It works in a laboratory with no connection. Two tools of the same family, BiCharges (expense management) and BioRentabilité (cost and profitability analysis), follow the same principles: a local Windows application, data that stays on the machine, exact calculations.

Results

0
server required
100%
offline
6
business services
34
IPC channels

Interactive demo

An empty cell never destroys data

Empty as many cells as you like in the imported file. Nothing is lost.

FieldIn databaseExcel fileAfter import
fournisseurERBAERBAempty ignored
designationAlkaline PhosphataseAlkaline Phosphatase
conditionnement500 tests4 x 125 testschanged
nombre_tests500500
prix_reference12 40013 900changed

Click a cell of the file to empty it. However many cells you empty, no stored value is lost. This row would be classed as changed in the preview, with 2 fields actually changed.

ON CONFLICT(reference) DO UPDATE SET
  fournisseur = COALESCE(NULLIF(excluded.fournisseur, ''), produits.fournisseur),
  ...

Mechanism rebuilt for this site, not a screenshot of the product. Rule taken from electron/services/ImportService.js, UPSERT_SQL and preview(). A real reference from the public catalogue, with sample values.

From the interface down to the data

  1. 01

    Interface

    A single screen, a virtualised table, search debounced at 200 ms and delegated to SQLite - no client-side filtering. Seven dialogs, cascading keyboard shortcuts.

  2. 02

    IPC bridge

    Context isolation on, no Node access in the renderer. The preload explicitly lists the exposed surface: 34 channels named domain:action, no raw ipcRenderer.

  3. 03

    Service layer

    Six services in the main process - products, documents, import, export, printing, backup. Channel registration is separate from its implementation.

  4. 04

    Local storage

    SQLite in WAL mode, foreign keys on, FTS5 trigram full-text index kept in sync by triggers. Prices stored in cents.

Engineering decisions

The choices worth defending, and why.

  • 01

    An import that cannot destroy data

    The heart of the problem is not reading an Excel file, it is not ruining the catalogue with it. Three safeguards stack up. First the four-step wizard - choose, map, preview, run - where the preview classifies each row as new, changed, unchanged or in error, and shows a field-by-field before/after diff for changes. Then the write: a single transaction for the whole import, and an UPSERT where each field is wrapped so an empty cell never overwrites an existing value. Finally a snapshot of the database is taken before each import, so an exception leaves the database intact and the backup path is returned to the user.

  • 02

    Column mapping tolerates human approximation

    Supplier workbooks never have the same headers twice: "Réf.", "reference", "REF PRODUIT". Rather than imposing a template, the mapping combines a synonym dictionary with a Levenshtein distance whose threshold is proportional to word length, with accents and case normalised. The validated mapping is then remembered, so the second import from the same supplier is immediate. Only one constraint stays hard: there must be exactly one reference column, and the wizard refuses to move on without it.

  • 03

    Search changes strategy depending on what you type

    Three modes. Empty field: list. Fewer than three characters: full-text search is not relevant, so it falls back to a simple match. Beyond that, it queries an FTS5 trigram index maintained by triggers, sorted by relevance - with the user query escaped to neutralise FTS syntax. Filters go through an allow-list checked twice before any interpolation into SQL: it is the only place in the code where an external value comes near a built query.

  • 04

    Synchronous SQLite, and it is the right choice

    A synchronous API looks unnatural in Node. But in the main process of a single-user desktop application, there is no concurrency to arbitrate: synchronous code removes all the promise machinery for local disk access measured in microseconds. Statements prepared in the constructor, transactions for grouped operations, WAL mode. The price of native dependencies is paid elsewhere - a rebuild against Electron's ABI at every install.

  • 05

    Matching 600 PDFs to their products automatically

    Technical sheets arrive in bulk. A service scans the drop folder and tries to attach each PDF to a product: first by subfolder name, otherwise by the file name tokens after Unicode normalisation and uppercasing, with a minimum length threshold to avoid false positives on short references. Products that already have one are excluded. Nothing is moved without confirmation, and emptied folders are cleaned up recursively.

  • 06

    Printing, that badly solved problem on Windows

    Printing silently, in batches, without depending on the PDF reader installed on the machine has no clean solution. The answer: build a single document - a cover page generated in the brand colours, then the supplier PDFs concatenated page by page while ignoring encryption, unreadable files being counted and reported - then call an embedded portable binary. It is not elegant, but it is deterministic. And if the binary is missing, the application detects it and falls back cleanly to opening with the system instead of failing silently.

  • 07

    Exported Excel files contain formulas, not results

    VAT and the price including tax are not computed and frozen: they are written as real Excel formulas referencing the neighbouring columns. The salesperson who changes a price in the workbook sees the total follow. A quieter detail: prices are stored in cents in the database - an integer, never a float, because a price catalogue does not tolerate binary rounding.

  • 08

    BiCharges: count in integers and write everything in the same transaction

    The expense-management software calculates in whole cents: it distributes remainders so the shares always add up to the total, credit notes included. Each entry is saved with its history in the same SQLite transaction, and an error cancels the whole. The monthly preparation of salaries and fixed charges is idempotent: run again, it creates no duplicate and overwrites no entry.

  • 09

    BiCharges: protected data and verified backups

    The local encryption key is protected by a password and a recovery key. Before a restore, the database, the keystore and their fingerprints are verified. The channels between the interface and the main process are validated one by one and blocked during lockout. Version 2.0.1, local; the 146 reported tests were not replayed for this dossier.

  • 10

    BioRentabilité: costs that recompute identically

    The Windows application, built with Tauri 2 and Rust, computes the real profitability of purchases: costs spread across lots, FIFO and weighted-average costs, exchange-rate and price simulations. The calculations are deterministic and at a fixed scale, carried by a Rust core with no interface, so they can be tested in isolation. Results export to Excel and PDF with the charts.

  • 11

    BioRentabilité: consistent backup and Windows installer

    The SQLite backup produces a consistent copy with rotation, integrity check and restore. A French NSIS installer embeds WebView2. Stated limits: the password does not encrypt the SQLite file, and installation on a clean Windows, in all-users mode and on a network share still has to be tried before calling it qualified.

Tech stack

  • Electron 31
  • React 18
  • Vite 5
  • SQLite FTS5
  • better-sqlite3
  • ExcelJS
  • pdf-lib
  • Tailwind CSS
  • Tauri 2
  • Rust
See the service

A similar project?

Logbook

In the logbook

Other projects