Skip to content

Offline Mode and Sync

NAOS is built with an offline-first architecture: you can keep selling even without an internet connection. When connectivity is restored, everything syncs automatically.

How It Works

Local Database

The app maintains a local copy of data in SQLite:

  • Products and categories.
  • Customers.
  • Orders.
  • Invoice numbering sequences.
  • Business settings.

Automatic Detection

  • The app automatically detects whether there is a connection.
  • A visual indicator shows the status:
    • Green: Connected and synced.
    • Orange: Syncing pending data.
    • Red: No connection (offline mode active).

Selling Without Internet

When you lose connectivity:

  1. You can keep selling as usual.
  2. Orders are saved locally.
  3. Invoices are digitally signed (if the certificate is loaded).
  4. Invoices are set to “Pending” status for submission to the DGI.
  5. Invoice numbering is managed locally.

Synchronization

Upon Reconnecting

When connectivity returns, the app automatically:

  1. Uploads orders created offline to the server.
  2. Sends pending invoices to the DGI via Aludra.
  3. Syncs invoice sequences (only if the local number is greater than the server’s).
  4. Downloads updates to products, prices, and settings.

Sync Queue

Pending operations are processed in order:

  • Each operation is retried if it fails.
  • No data is lost between attempts.
  • You can check the queue status in Settings.

Offline Invoice Numbering

Invoice number management is critical for the DGI:

ScenarioBehavior
OnlineThe server assigns the next number (with lock)
OfflineThe app increments a local sequence
ReconnectionSyncs only if the local number is greater than the server’s

Conflict Resolution

If data was modified both on the server and locally:

  1. The app detects the conflict during synchronization.
  2. A Conflict Resolution screen is displayed.
  3. You can choose:
    • Keep local version (what you did offline).
    • Accept server version (what another device changed).
  4. Once resolved, synchronization continues.

Data Available Offline

DataAvailable OfflineSyncs
Products and pricesYesYes
CustomersYesYes
Create ordersYesYes
Collect paymentsYesYes
Sign invoicesYes (with certificate)Yes
Submit to DGINo (requires internet)Automatic
ReportsPartial (local data)Yes
Cash register closingsYesYes
Update catalogNo (requires internet)Automatic

Best Practices

  1. Sync before closing: Make sure there are no pending operations before closing the app.
  2. One terminal per device: Avoid conflicts by using a unique terminal per tablet.
  3. Load the certificate: Without a certificate, offline invoices cannot be signed.
  4. Review pending invoices: After a long offline period, check the invoice status in DGI.

Having sync issues? See Electronic Invoicing