AVERQIS Scanner Bridge
======================

Connects your office scanner to AVERQIS so scanned documents are processed
by OCR automatically (classify -> review -> export).

No installers or admin rights are needed. The Node.js runtime is bundled.


GETTING STARTED
---------------
1. In AVERQIS (Staff Console):  Practice  >  Scan devices  >  Register scanner
   - give it a name (e.g. "Reception Fujitsu") and copy the DEVICE TOKEN.

2. Double-click "Setup Bridge.bat" and paste the token when asked.
   (Optionally set the scan folder - default is your AVERQIS Scans folder.)

3. Double-click "Start Bridge.bat" and leave it open. The bridge now watches
   the scan folder and uploads everything dropped into it.


SCANNING OPTIONS
----------------
A) Folder mode (any scanner): configure the scanner to "scan to folder"
   pointing at your AVERQIS Scans folder. Files are picked up automatically.

B) Direct scan via TWAIN/WIA driver (Windows): from the bridge window or a
   Command Prompt in this folder:
       node.exe index.mjs scan --list
       node.exe index.mjs scan --device "Scanner Name"
       node.exe index.mjs scan --device "Scanner Name" --format jpg --category invoices

Optional: put files in sub-folders to auto-categorise:
    invoices\    -> supplier invoice      receipts\    -> expense receipt
    till-receipts\ -> till receipt        credit-notes\ -> credit note
    bank-statements\ -> bank statement
To attach scans to a client, place a clientId.txt file in the same folder
containing the client ID.


AUTO-START
----------
Run "Install Auto-Start.bat" once so the bridge starts automatically at
Windows sign-in (registers a scheduled task).

To stop: close the "Start Bridge" window. To remove auto-start:
    schtasks /Delete /TN "AVERQIS Scanner Bridge" /F


SECURITY
--------
Your device token is stored hashed in AVERQIS. You can revoke it at any time
from Scan devices - the bridge then stops working immediately.

The bundled node.exe is the official Node.js runtime (MIT licensed, see
NODE-LICENSE.txt). The bridge itself is a single small script (index.mjs).