Delivered a fuel-station POS system for Saudi terminals that performs on-device payment handshakes and records dispatches through unreliable network coverage.
The real-world problem
What the system had to solve
Fuel-station attendants operating in remote desert locations face unstable cellular coverage, making standard online-only POS apps lose sales transactions. Additionally, standard React Native plugins cannot interface directly with proprietary Sunmi thermal receipt printers or SkyBand bank payment kernels.
What I built
Architecture shaped by the constraints
I built a commercial Android point-of-sale app in React Native with a custom Java native bridge (NamiPayModule) for SHA-256 HMAC-signed binary payment payloads. The system integrates Sunmi thermal printer hardware and implements an AsyncStorage local queue that caches fuel delivery records offline and dispatches them when connectivity returns.
Production proof
Delivered system
Deployed directly on physical Sunmi POS terminal hardware at commercial fuel stations, processing high-volume fuel dispatch logs and printed receipts under fluctuating network conditions.
System flow
Architecture at a glance
01
React Native terminal
Fuel workflow and local transaction queue.
02
Java device modules
Signed payment intent and Sunmi receipt printer integration.
03
Fuel platform API
Queued transactions synchronize when service is restored.
Engineering decisions
Why the system works this way
Signed native bank-payment bridge
Constraint
Cloud payment requests add several seconds per vehicle, while local EMV transactions require signed IPC with the certified bank application.
What I engineered
Built a Java NamiPayModule that creates an ecr-txn-event Android intent with terminal-specific SHA-256 HMAC payloads and returns the payment result.
Production outcome
Moved the bank handshake onto the device and reduced payment processing to sub-second speeds.
Offline delivery ledger
Constraint
Fuel station connectivity can disappear during a delivery, so cloud-only records risk losing sales and inventory data.
What I engineered
Stored delivery events and before/after tank volumes in an AsyncStorage append-only queue with client UUIDs, then drained the queue when the network returned.
Production outcome
Preserved delivery records through outages and resumed synchronization after reconnection.
Direct thermal receipt output
Constraint
The React Native runtime cannot drive Sunmi's built-in receipt printer at the required byte level, and older printer packages failed on current Android builds.
What I engineered
Patched the Sunmi bridge and generated ESC/POS buffers for aligned bilingual receipts, with a logging fallback for development.
Production outcome
Printed a physical receipt directly from the handheld terminal after payment confirmation.
Real-time hardware pump state polling and fuel dispenser readiness on Sunmi handheld terminal.Open full screenshotVolume and price preset configuration validating fuel transaction inputs before pump release.Open full screenshotNative Java bridge communicating directly with SkyBand payment terminal via HMAC-SHA256 packets.Open full screenshotDirect ESC/POS byte sequence generation triggering instant thermal receipt print on Sunmi device.Open full screenshotAsyncStorage append-only ledger caching transactions locally during remote station network drops.Open full screenshot
Mahmoud Attia is a Full-Stack & Mobile Software Engineer based in Cairo, Egypt, working with clients across EU, US, and MENA time zones. His work spans offline-first mobile apps, transactional web platforms, and schema-constrained AI workflows. The portfolio archive contains 13 entries across projects, coursework, concepts, and specifications. HS VPN is a commercial app live on Google Play, supported by a self-hosted fleet of nine Linux server nodes.