Copied to clipboard!
Ideal POS & ERP High-Res Screenshot
ENTERPRISE CASE STUDY | FLUTTER & ODOO ERP

Ideal POS & ERP Solution

An enterprise-grade, offline-first Point of Sale & ERP mobile platform designed for retail, restaurants, and quick service chains. Engineered with Clean Architecture, bank-grade SQLCipher AES-256 encryption, contactless SoftPOS (NFC Tap-on-Phone), POS hardware thermal printing, and an intelligent AI HR Assistant.

Retail & QSR Hospitality Clean Architecture & DDD Bank-Grade Encryption NearPay SoftPOS (NFC) ZATCA Phase 1 & 2
Odoo RPC Online
Ideal POS & ERP Mobile Solution Interface
Click to Inspect Fullscreen (5760 x 3240)
Database Engine Drift & SQLCipher
Contactless Payments NearPay SoftPOS (NFC)
Hardware Printing Sunmi & Newland POS
AI HR Assistant Conversational Agent
60+ FPS

Sustained UI Rate

Dart Isolates for PDF & Printing
100%

Offline-First

Zero Transaction Loss
0.00%

Math Errors

Arbitrary Precision Decimal
AES-256

Bank-Grade Crypto

SQLCipher & Keystore
< 1s

NFC Tap-to-Pay

NearPay SoftPOS SDK
ZATCA

Phase 1 & 2 Ready

Base64 TLV QR Codes
01 / OVERVIEW

Redefining Edge Retail & QSR Operations

The Operational Challenge

Traditional retail and food & beverage enterprises suffer from severe point-of-sale friction during peak hours:

  • Network Fragility: Slow or dropped internet connections halt checkout lines and corrupt cart records.
  • Hardware Clutter: Separate standalone card payment terminals, external receipt printers, and desktop PCs cause clutter and maintenance overhead.
  • Tax Compliance Hurdles: Stricter regulatory mandates (such as Saudi ZATCA e-invoicing) require cryptographic QR generation with zero arithmetic tolerance.
  • Fragmented Staff Management: Cashiers lack visibility into their shifts, leaves, and commissions, burdening store managers with administrative queries.

The Ideal POS Solution

A unified, high-performance Flutter mobile application deployed directly onto handheld smart POS devices and tablets:

  • Autonomous Offline-First: Local SQLite with Drift ORM stores every catalog item and cart mutation locally, syncing transparently with Odoo ERP when online.
  • All-In-One SoftPOS Terminal: NearPay SDK integration allows customers to tap contactless bank cards (Mada, Visa, Mastercard, Apple Pay) directly on the device.
  • ZATCA Certified Invoicing: Native generation of compliant PDF tax invoices and ESC/POS thermal receipts with Base64 TLV QR codes.
  • AI HR Intelligence: An embedded conversational AI assistant allows cashiers to check leave balances and submit advance requests conversationally.
02 / ARCHITECTURE

Clean Architecture & Domain-Driven Design (DDD)

Built from the ground up on modular Clean Architecture principles, ensuring complete decoupling between enterprise business rules, external ERP communication, and UI rendering.

Layer 01 Pure Dart

Domain Layer

The heart of the application containing pure business logic:

  • Entities & Value Objects
  • UseCases (Interactors)
  • Repository Interfaces
Zero 3rd-party dependencies for 100% unit testability and business logic purity.
Layer 02 Infrastructure

Data & Infrastructure

Implements repository abstractions and coordinates data persistence:

  • Drift Type-Safe SQLite ORM
  • Custom In-House Odoo RPC
  • DTOs & Bi-Directional Mappers
Custom RPC client inside package/odoo supporting JSON-RPC and XML-RPC.
Layer 03 BLoC / Cubit

Presentation Layer

Manages deterministic UI states and user interactions:

  • Flutter BLoC & Cubit
  • Unidirectional Data Flow
  • Responsive Adaptive Layouts
Widgets are strictly dumb views driven by immutable state objects.

System Architecture & Data Pipeline

Unidirectional Dependency Rule
UI
Presentation Layer (Flutter BLoC & Cubits)
CartBloc · SessionCubit · InventoryCubit · NearPayBloc · HRAssistantBloc
Dispatches Events
DOM
Domain Core (Business Rules & UseCases)
ProcessOrderUseCase · SyncQueueUseCase · CalculateZatcaTaxUseCase · SubmitLeaveUseCase
Zero Dependencies
DATA
Data Repositories & Failover Sync Router
OrderRepositoryImpl · SyncQueueRepository · OdooRpcBridge
Idempotent UUID v4
Local Storage (Offline-First)
Drift ORM + SQLCipher (AES-256)
Android Keystore Key Management
Enterprise Backend (Remote)
Odoo ERP RPC Gateway
SSL Pinning (TOFU) · Exponential Retry

Applied Engineering Design Patterns

Dependency Injection & IoC (GetIt)

Each module defines a dedicated FeatureInjector that registers datasources, repositories, and usecases. This enforces loose coupling, accelerates compilation, and enables mock injection for unit tests.

Repository Pattern with Dynamic Failover

Abstracts storage mechanics from the domain layer. The repository transparently decides whether to serve product queries directly from the local SQLite cache or pull live stock quanta from Odoo ERP.

Idempotent Transactions via UUID v4

Every checkout, split payment, and invoice is tagged with a globally unique UUID v4. When network connections drop and retry queues fire, Odoo recognizes duplicate transmissions and prevents double-billing.

High-Precision Financial Math (Decimal)

Floating-point arithmetic (IEEE 754) is notoriously error-prone in finance. All monetary amounts, 15% ZATCA VAT calculations, and line discounts use package:decimal, guaranteeing 0.00% rounding error.

Multi-Threading via Dart Isolates (Background Rendering)

Heavy compute workloads—such as generating multi-page PDF tax invoices, rendering Base64 TLV QR matrices, and rasterizing bitmaps for 80mm ESC/POS thermal printers—are offloaded to separate background Dart Isolates. The main UI thread never drops below 60 FPS, ensuring zero cashier stuttering.

03 / TECHNICAL HIGHLIGHTS

Five Core Engineering Pillars

Architectural solutions built to withstand high-traffic enterprise demands, intermittent connections, and strict bank security standards.

Pillar 01

Intelligent Offline-First & Autonomous Odoo Sync

Cashiers cannot wait for a server handshake during rush hours. Ideal POS runs a comprehensive local replica of products, price lists, customer accounts, and stock quotas using Drift ORM (type-safe SQLite).

SyncService & Connectivity: Listens to network status via connectivity_plus. Automatically queues offline mutations and flushes when bandwidth restores.
Exponential Backoff: Implements intelligent retry timing (1s, 2s, 4s, 8s up to 60s) to avoid flooding the Odoo RPC server during intermittent network flapping.
Transaction State Machine
1. Draft Order →
2. confirmed_local →
3. SyncQueue Pending →
4. synced_to_odoo
Pillar 02

Bank-Grade Security & On-Device Encryption

Since transactional and customer data is stored locally, POS terminals are hardened with defense-in-depth enterprise security:

  • Full-Database Encryption: All SQLite files on flash memory are encrypted at rest using SQLCipher AES-256 (sqlcipher_flutter_libs).
  • Hardware Keystore Integration: Encryption keys are never written to disk in plain text; they are stored in the hardware security module via FlutterSecureStorage (Android Keystore / TEE).
  • SSL Certificate Pinning (TOFU): Protects RPC payloads from Man-In-The-Middle (MITM) inspection on compromised local Wi-Fi networks.
  • Tamper & Root Detection: Checks for jailbreaks, rooted binaries, and debugger attachment using safe_device.
  • Rapid Teller Lock Screen: PIN-authenticated cashier handover (flutter_screen_lock) with supervisor authorization for refunds and discounts.
Security Matrix
Data At Rest AES-256
Key Storage Keystore / TEE
Transport Layer Pinned TLS 1.3
Root / Tamper Active Guard
Pillar 03

SoftPOS Contactless Card Payments (NFC Tap-on-Phone)

Eliminates costly external credit card terminals by embedding direct bank-certified SoftPOS payment processing directly inside the Flutter app via the NearPay SDK.

NearPay NFC Engine: Customers tap physical debit/credit cards or phones (Mada, Visa, Mastercard, Apple Pay) directly on the smart POS terminal or Android phone.
Multi-Tender & Split Pay: Seamlessly handles split payments (e.g., partial Cash + partial NFC Tap + Customer Ledger Account credit) in a single transaction.
Certified Networks
Mada Debit (KSA)
Visa & Mastercard
Apple Pay & Google Pay
Bank Reconciliation Receipt
Pillar 04

Smart POS Thermal Printer Hardware Integration

Built-in hardware abstraction drivers interface seamlessly with smart POS terminals and external thermal receipt printers across restaurant kitchens and retail checkouts:

Sunmi & Newland SDKs: Direct hardware communication with Sunmi (sunmi_printer_plus), Newland devices, and Ethernet/Wi-Fi ESC/POS printers.
ZATCA Compliant QR: Encodes Seller Name, VAT ID, Timestamp, Invoice Total, and VAT Amount in Base64 Tag-Length-Value (TLV) format according to ZATCA Fatoora regulations.
Printing Specs
Paper Standard 80mm & 58mm
Encoding ESC/POS Bitmap
Threading Background Isolate
Pillar 05

Integrated HR Management & Conversational AI Agent

Bridges employee operations with cashiering. Instead of switching apps, employees manage their shifts, view performance metrics, and consult an intelligent conversational HR bot right on the POS terminal.

Shift & Attendance Analytics: Clock-in/out logging, overtime calculation, and interactive shift performance charts rendered with fl_chart.
Conversational AI Chatbot: Natural language agent answering employee policy questions, checking remaining annual leaves, and creating advance salary requests.
AI Assistant Sample
Cashier: "What's my remaining paid leave balance?"
AI HR Agent: "You have 14 days remaining. Would you like me to submit a vacation request?"
04 / COMPLETE MODULE SUITE

Operational Modules Breakdown

A granular look at the end-to-end operational capabilities delivered inside Ideal POS & ERP.

Sales & Cart Engine

Sub-second cashier checkout interface. Features fast camera & laser barcode scanning, line-item discounts, invoice-level coupons, cart hold/suspend, and custom product price overrides with manager approval.

High-throughput POS UI

POS Sessions & Cash Float

Full lifecycle session management. Supports opening cash floats, mid-shift cash in/out, blind cash counts during shift close, and automated drawer discrepancy reporting synced to Odoo cash registers.

Audit & Float Control

Inventory & Warehouse

Real-time on-hand stock lookups (stock.quant), goods dispatch receipts (stock.picking), multi-warehouse transfers, and automated store replenishment requisitions.

Odoo Stock Models

ZATCA Tax Invoicing

Strict 15% VAT tax engine compliant with Saudi ZATCA Fatoora regulations. Automatically calculates tax breakdowns and encodes Base64 TLV electronic QR codes for both simplified and standard tax invoices.

ZATCA Phase 1 & Phase 2

Customer CRM & Credit

Partner management (res.partner) with corporate tax ID validation, customer loyalty points, store credit balances, and deferred payment terms with credit limits.

B2B & Retail Ledgers

Bilingual & Adaptive UI

Full bidirectional layout support with native Arabic (RTL) and English (LTR). Responsive typography that dynamically scales across 5.5" handheld POS terminals, 10" tablets, and 15.6" dual-display registers.

Handheld to 15.6" POS

Device Licensing & Cloud Tenant Binding

Hardware fingerprinting service (MobileLicenseService) that binds specific smart POS serial numbers to enterprise tenant licenses, validating subscription status, remote lockouts, and feature access permissions.

Multi-Tenant Cloud Guard
05 / TECH STACK

Comprehensive Technology Matrix

A curated selection of modern, battle-tested tools and frameworks selected for extreme resilience and performance.

Core Framework
Flutter SDK & Dart 3.9+

High-performance AOT compiled native mobile code running at 60/120 FPS.

Architecture
Clean Architecture & DDD

Domain-Driven Design with 3 isolated layers and modular package structure.

State Management
Flutter BLoC & Cubit

Reactive, predictable, unidirectional state flows with clear separation of concerns.

Database & Storage
Drift ORM & SQLCipher

Type-safe SQLite persistence with full-database AES-256 encryption at rest.

SoftPOS & NFC
NearPay Flutter SDK

Direct contactless card payments over NFC (Mada, Visa, Mastercard, Apple Pay).

ERP Integration
Custom Odoo RPC Client

In-house RPC client (package/odoo) communicating over JSON-RPC with Dio & HTTP.

POS Hardware
Sunmi Printer Plus & ESC/POS

Native driver integration with Sunmi, Newland POS, and Network thermal printers.

Enterprise Security
Keystore, SafeDevice, TOFU Pinning

Flutter Secure Storage, Root/Jailbreak detection, and SSL certificate pinning.

Data Precision & Math
Decimal, Equatable, UUID

Zero floating-point calculation errors for ZATCA VAT and financial transactions.

06 / ATS-FRIENDLY RESUME SUMMARY

Curated Experience Bullets

Formatted and optimized for hiring managers, technical leads, and ATS screeners.

Enterprise Point of Sale (POS) & ERP Mobile Solution | Flutter, Odoo, Clean Architecture
• Engineered an enterprise-grade offline-first POS application for retail and restaurants, natively integrated with Odoo ERP using Clean Architecture and BLoC/Cubit.
• Architected a secure, encrypted offline-first data layer leveraging Drift ORM and SQLCipher (AES-256) with hardware-backed encryption keys (FlutterSecureStorage).
• Designed an autonomous background synchronization engine with network status listeners and exponential backoff retry mechanisms to guarantee zero lost transactions.
• Implemented seamless SoftPOS contactless card payments (Mada, Visa, Mastercard, Apple Pay) utilizing the NearPay SDK over NFC directly on POS terminals.
• Integrated hardware thermal printing for Sunmi & Newland POS devices, offloading PDF and receipt rendering into background Dart Isolates to maintain 60+ FPS UI performance.
• Enforced strict financial precision across tax calculations (ZATCA compliant) and cart calculations using decimal to prevent floating-point rounding discrepancies.
• Embedded a comprehensive HR module featuring attendance analytics (fl_chart) and a conversational AI HR Assistant for employee requests.
PORTFOLIO TIP

Recommended Video & Interactive Walkthrough Flow

For recruiter presentations and portfolio screencasts, highlight these five moments to capture the full scope of engineering:

1. Rapid Checkout Flow Laser barcode scan & instant cart calculations.
2. SoftPOS Tap-to-Pay Contactless NFC card tap with NearPay SDK.
3. Thermal Print with QR ZATCA Base64 TLV invoice output.
4. Offline Mode Recovery Airplane mode trigger and automatic sync recovery.
5. AI HR Assistant Real-time chat inquiring about remaining leaves.
Back to Selected Projects