axiom.
Documentation & User Manual

Everything you need to run your purchase ledger.

Axiom is a purchase ledger and receipt archive for workshops, trade teams, and UK companies. This manual covers architecture, email routing, validation rules, mobile intake, and accounting exports.

1. Architecture & Data Sovereignty

Physical SQLite Isolation & The Zero-Trust Ledger

Unlike conventional SaaS accounting apps that pool thousands of companies into one massive multi-tenant database table, Axiom assigns every business a physically isolated SQLite database file (data/tenants/{company}/books.sqlite).

The Zero-Trust Ledger Rule
"A language model cannot be made incapable of misreading a figure, so nothing in the engine asks it to be right."

Vision models extract candidate strings, dates, and digits from PDFs. All mathematics, VAT splits, tax-point verifications, and sign balances are computed deterministically using integer pence arithmetic (Math.round(val * 100)). Floating-point calculation is strictly forbidden in the ledger.

Strict "No AI Training" Covenant

Your confidential parts margins, trade tier discounts, and supplier pricing are protected under UK GDPR. Customer financial documents are never fed into commercial LLM training corpuses.

7-Year HMRC Audit Vault

Original PDF invoices and camera scans are hashed with SHA-256 for tamper-evident retention. One click exports an HMRC-compliant audit package with original files preserved.

2. Inbound Email Vault Setup

Dedicated Inbound Routing & Fail-Closed Whitelist

Every company is assigned a dedicated virtual inbox handle. Suppliers email invoices directly to your address, or you can configure an automated forwarding rule in Gmail / Microsoft 365.

Dedicated Workspace Inbox Address
<your-company>@inbox.getaxiom.app
Strict Fail-Closed Inbound Whitelist

To prevent spam, unsolicited promotions, and phishing invoices from polluting your ledger, Axiom operates a strict fail-closed inbound policy. An incoming email is accepted only if:

  • Owner Address: The sender matches the account owner's email address.
  • Custom Domain Rules: The sender domain is explicitly whitelisted in Settings (e.g. @boc.com, *@tegiwa.com, @supplier.co.uk).
  • Active Suppliers: The sender email matches any registered supplier's contact or accounts email in your Supplier Directory.

Unauthorized emails are rejected with HTTP 403 and logged under the Blocked tab in the Mailbox view with a direct 1-tap "+ Whitelist Sender" button.

3. The 14 Statutory Validation Rules

Deterministic UK Ledger Verification Engine

Every document is evaluated against 14 statutory checks. A blocker prohibits commitment to the ledger until resolved, while a warning alerts the reviewer to unusual characteristics (e.g. new supplier or foreign currency).

CLASS-1 Document Classification
Classification blocker

Only enterable commercial purchase documents (invoices, credit notes, receipts) enter the ledger. Non-binding quotes, proformas, statements, and delivery notes are blocked.

Example: A parts quote or delivery note is flagged so VAT is not claimed prematurely before an official tax invoice exists.
SELF-1 Own Invoices Guard
Classification blocker

Checks the supplier trading name and company number against your own registered entities.

Example: Prevents customer sales invoices issued by your business from accidentally being booked into purchases.
ARITH-1 Net + VAT = Gross Penny Balance
Arithmetic blocker

Verifies that net_pence + vat_pence === gross_pence exact to the penny.

Example: Catches OCR misreads, missed discounts, omitted shipping, or digit transposition.
ARITH-2 UK VAT Rate Verification
Arithmetic blocker

Verifies if calculated VAT ratio matches standard UK rates: 20.0% Standard, 5.0% Reduced, or 0.0% Zero/Exempt.

Example: Flags unusual VAT fractions (e.g. 14.3%) indicating an unitemized zero-rated or exempt line.
SIGN-1 Positive / Negative Signs Match
Arithmetic blocker

Purchase invoices and receipts must have strictly positive values. Credit notes must have negative values throughout.

Example: Stops inverted credit notes from corrupting your quarterly VAT return liability.
ARITH-3 Line Items vs Net Subtotal
Arithmetic warning

Sum of all extracted itemized lines (∑ item.net) must equal invoice net_pence within ±2p rounding tolerance.

Example: Alerts you if individual parts do not add up to the goods subtotal or if a freight fee was omitted.
DATE-1 Tax Point Date Verification
Temporal blocker

Invoice date must be a valid ISO YYYY-MM-DD format, not set in the future, and within HMRC 7-year retention window.

Example: Ensures VAT is reported in the correct quarterly period and meets Corporation Tax audit standards.
DUP-1 Duplicate Invoice Check
Integrity blocker

Verifies (supplierKey, invoiceNumber) uniqueness across all non-rejected records in the database.

Example: Prevents paying the same supplier invoice twice when emailed multiple times by different staff.
DUP-2 Close Match Detection
Integrity warning

Checks if an invoice with identical supplier, date, and exact gross amount already exists under a revised reference.

Example: Catches supplier revised billings or duplicate PDF uploads with minor reference typos.
SUP-1 Supplier Directory Verification
Supplier warning

Matches trading name against your registered supplier directory and alias records.

Example: Prompts confirmation when a new trade supplier appears for the first time, auto-learning their alias.
VAT-1 VAT Number Check Digits
HMRC Compliance warning

Evaluates the 9-digit or 12-digit UK VAT registration number against HMRC mathematical check digits.

Example: Catches fake, mistyped, or illegible VAT numbers printed on supplier letterheads.
VAT-2 Mandatory VAT Number on VAT Claims
HMRC Compliance blocker

Under UK tax law, Input VAT cannot be reclaimed without a valid supplier VAT registration number.

Example: If VAT > £0.00 is claimed, an active VAT number must be present on the document.
VAT-3 Unregistered Supplier VAT Guard
HMRC Compliance warning

Checks if a supplier previously registered as non-VAT (vat_registered = 0) is suddenly charging VAT.

Example: Catches unauthorized VAT charges from non-registered subcontractors or sole trader couriers.
CUR-1 Currency & Exchange Identification
Currency warning

Identifies non-GBP currency codes (USD, EUR, JPY, CAD) and flags them for zero-rated UK VAT status.

Example: Prevents claiming 20% UK VAT on overseas software licenses or imported Japanese performance parts.

4. Anomaly Detection & 1-Tap Repairs

Automatic Failure Patterns & Instant Repairs

When an invoice fails arithmetic balance, the engine runs three deterministic heuristics matching common supplier formatting quirks and presents instant 1-tap correction buttons:

1. Swap Net & Total (detectSwap)
1-Tap Fix

Occurs when a supplier prints large "TOTAL" headers at the top of an invoice, causing OCR to capture the Gross total into the Net field.

Action: Swaps Net and Gross, immediately restoring exact 20% VAT balance.
2. Carriage / Delivery Shortfall (detectShortNet)
1-Tap Fix

Occurs when a supplier prints goods subtotal (e.g. £128.34) and freight charge (e.g. £9.50) separately. Because freight is taxable at 20%, the true net is £137.84.

Action: Automatically computes shortBy = (gross - vat) - net and appends a "Carriage / Delivery charge" line item.
3. Total-Only / Till Receipts (detectCompletion)
1-Tap Fix

Hardware merchants, trade counters, and retail receipts often print only a gross payable total without itemized VAT breakdown.

Action: Offers 20% Standard Split (net = round(gross/1.2)) or 0% Non-VAT (net = gross, vat = 0).

5. Review Queue & Strict Ledger Separation

1-Tap Verification & Safe Commit Boundary

To guarantee pristine financial hygiene, Axiom enforces a hard separation between unreviewed intake and the statutory purchase ledger:

!
Pending documents do NOT touch statutory totals

Documents with status needs_review or rejected never appear in the Purchase Ledger, do not increment Supplier Directory spend/counts, and are excluded from CSV/ZIP export bundles.

✓
Confirm & Next Workflow

Clicking Confirm & Next (or pressing Enter) atomically commits the document to the ledger, removes it from the queue, and seamlessly switches the inspector to the next pending invoice.

6. Mobile Floor Scanner & iOS App

Counter Receipts & Instant Shop Floor Intake

Workshop staff can snap counter delivery dockets, tyre receipts, and trade merchant slips directly on their phone by opening cloud.getaxiom.app in Safari or Chrome, or with the Axiom Scan iOS app.

Work Email Sign-In & Role Scope

Team members invited in Settings sign in on their phone with a 6-digit email code. No pairing codes or shared shop PINs are needed.

Role-Gated Access: Staff accounts can capture and upload receipts without permission to disconnect accounting software or export the database.
Camera & Multi-Page Ingest

Supports instant photo capture, quick spend category tags, job reference notes, and multi-page receipt uploads directly from the phone camera.

Direct Queue Dispatch: Uploaded receipt photos enter the background reading queue immediately.

7. Data Sovereignty, Exports & Account Closure

Zero Vendor Lock-in & 1-Click Vault Archive

Axiom believes your financial data belongs strictly to your business. You can export clean accounting files or download your entire physical SQLite database at any second.

1-Click CSV Accountant Packages
Xero CSV
QuickBooks
Sage 50/Cloud
HMRC Statutory

Formatted with UK tax points (DD/MM/YYYY), correct nominal expense coding (e.g. 5000 Purchases, 5100 Carriage), and strict CWE-1236 CSV injection protection.

Full Vault Archive ZIP (GET /api/export/archive)

Generates a complete standalone archive containing:

  • books.sqlite: The raw, WAL-flushed SQLite 3 database file.
  • purchase_ledger.csv: Complete reconciled purchase ledger.
  • suppliers.csv: Complete directory of trade suppliers and VAT numbers.
  • receipts/: All original high-resolution PDFs and scans sorted by Supplier/YYYY/MM/.
  • manifest.json: Cryptographic checksums and record counts.
Permanent 1-Click Account Closure

Owners can permanently purge their account in Settings. Typing your exact company name triggers an atomic wipe: closes database connections, recursively deletes physical disk files (rm -rf data/tenants/{id}), and cascades deletions across system records.

8. Desk Keyboard Shortcuts

High-Speed Verification & Queue Navigation

Review hundreds of monthly supplier invoices without touching your mouse:

A Confirm & Next
R Flag Anomaly / Reject
J Next Invoice
K Previous Invoice
← / PageUp Previous Page
→ / PageDown Next Page
Cmd/Ctrl + B Toggle Sidebar

Ready to streamline your purchase ledger?

Start your 14-day free trial. Setup takes about a minute.