Skip to main content
Mobile Applications Β· Retail

National Hero

Android app delivering verified grocery and essential-service discounts to frontline workers, with offline coupon barcodes.

National Hero product cover

National Hero overview

National Hero is a digital platform that distributes grocery and essential-service discounts to frontline workers: emergency responders, healthcare professionals and other key workers. We built its Android application and the cloud infrastructure behind it from the ground up, covering secure database models, automated scaling routines and a user authentication workflow that confirms a worker's eligibility without holding their employment records.

The architecture is a set of containerised microservices behind an API gateway and Okta identity layer. A user service, a catalogue service and a discount validation service each run in their own Docker containers on Kubernetes, backed by a MySQL user database, a NoSQL catalogue database and a Redis caching cluster, with CrowdStrike and centralised logging across the hosts. Because the client tier is decoupled from storage through the gateway, we can change backend rules, add new grocery partners or rotate security certificates without users downloading a new version from the Google Play Store.

Challenge in Retail operations

The original system had no centralised data ingestion, so updating discount data and validating user status were slow and error-prone. Retail grocery catalogues arrived in unstandardised formats, raw text files, spreadsheets and unindexed web feeds, which blocked fast processing and search. Confirming that someone was an essential worker meant manual checks against local documents, creating backlogs and delaying first use of the app. Servers ran on fixed hardware allocations, so when a large grocery chain released a new discount list the system crashed. Data moving between Retail points of sale and mobile clients lacked centralised encryption.

The rebuilt platform had to deliver sub-second category searches, absorb thousands of requests per minute across multiple geographic distribution points, replicate user records and validation logs so nothing is lost in a hardware failure, and let the Android front end ship updates independently of backend changes. Because many users are medical and emergency personnel, healthcare credentials had to be isolated and the whole system aligned with SOC 2 Type II, GDPR and HIPAA guidelines.

Solution architecture & delivery

The Android client is written in Kotlin with Jetpack Compose on the Android SDK, giving a responsive interface across a broad range of devices. Users browse grocery listings, store discounts and location-specific offers; category searches hit the Redis cache first under a cache-aside pattern and fall back to the NoSQL catalogue database, which repopulates the cache with a six-hour expiry. When a worker opens a coupon while online, the app encrypts the validation token into a local SQLite store, so the discount barcode still renders when the phone loses signal inside a concrete store building.

Identity runs through Okta using OpenID Connect, OAuth 2.0 and JSON Web Tokens. A frontline worker's workplace credentials go directly to Okta over encrypted channels for validation; our MySQL database stores only the encrypted unique identifier Okta returns, and the app holds a short-lived JWT rather than a password. Merchant discount updates flow through a distributed event bus: when a partner grocery chain changes a promotion, the event updates the NoSQL catalogue and evicts stale Redis entries so mobile clients see the correct discount within seconds and there is no mismatch at the physical checkout. User identity data and merchant catalogue data sit on separate storage volumes in distinct network segments and communicate only through gateway-managed API endpoints.

The infrastructure is defined in modular Terraform with abstract provider variables, so the same scripts build matching development, staging and production environments on both AWS and Azure. Kubernetes clusters span multiple availability zones with automated target groups that drop unhealthy containers from the traffic loop, and storage volumes replicate identity profiles and validation logs across zones. Horizontal Pod Autoscalers add microservice pods when CPU stays above 70% for more than two minutes, the catalogue service routes high-frequency searches to read-only database replicas, connection pooling protects memory during spikes, and global DNS fails over to a secondary region if a primary facility goes offline. Persistent volume claims keep database data intact when containers restart or move between nodes.

The network follows a zero-trust design: perimeter firewalls filter malformed packets and unverified IP ranges, every microservice talks over encrypted internal channels governed by access control lists, administrative access requires multi-factor authentication through bastion hosts, and CrowdStrike Falcon agents on every compute instance isolate any container showing unexpected behaviour. TLS 1.3 protects data in transit, AES-256 protects storage, and encryption keys rotate automatically every ninety days. Personal identifiers are separated from professional details, healthcare worker validation profiles are processed in isolated database paths, every change to user status, merchant discount configuration or permissions goes to an immutable audit log, automated scripts fulfil right-to-be-forgotten requests, and transaction validation data is archived after twelve months. Every commit passes automated linting, usability, performance and security testing, dependency vulnerability scanning and Docker image compilation before Terraform deploys it to the Kubernetes cluster and the build proceeds to the Google Play Store. Centralised log shippers on every node feed dashboards with per-request trace IDs, and the on-call team is paged when error rates exceed 2% of traffic in any five-minute window.

Key features of National Hero

  • Native Android app in Kotlin and Jetpack Compose for browsing grocery listings, store discounts and location-specific offers
  • Okta-based frontline worker verification over OpenID Connect that stores only an encrypted identifier, never employee IDs or passwords
  • Catalogue microservice on a NoSQL document database with Redis cache-aside search and six-hour cache expiry
  • Discount validation microservice with MySQL usage logs and an event bus that propagates merchant promotion changes within seconds
  • Encrypted SQLite cache that renders discount barcodes offline inside stores without signal
  • Multi-zone Kubernetes deployment on AWS and Azure with Terraform, Horizontal Pod Autoscaling at 70% CPU, read replicas and cross-region DNS failover
  • Zero-trust network with perimeter filtering, encrypted service-to-service channels, MFA bastion hosts and CrowdStrike Falcon runtime protection
  • SOC 2, GDPR and HIPAA controls: PII separation, isolated healthcare credential paths, immutable audit logs, deletion scripts and 12-month data retention

Who this mobile application is for

National Hero serves frontline and essential workers who need quick access to verified grocery and service discounts, the partner grocery chains that publish those offers, and the platform administrators who manage merchants and permissions. The same architecture fits any benefits or loyalty programme that must verify eligibility against an external identity source, ingest catalogues from many merchants in inconsistent formats and keep working at the point of sale without network coverage.

Impact & results

  • Manual document checks replaced by instant Okta verification, with no raw employee IDs or passwords held on the platform
  • Fragmented text, spreadsheet and web-feed catalogues consolidated into a searchable NoSQL catalogue with sub-second category queries
  • Merchant promotion changes reach mobile clients within seconds, avoiding mismatches at the physical checkout
  • Fixed-hardware crashes on large discount releases eliminated through autoscaling at 70% CPU, read replicas and multi-zone failover
  • Discount barcodes remain usable offline inside stores through the encrypted local SQLite cache
  • Backend rules, new grocery partners and certificates updated without forcing a new Play Store download

FAQ about National Hero

What problem does the National Hero app solve?

National Hero distributes grocery and essential-service discounts to frontline workers such as emergency responders, healthcare professionals and key workers. The previous process depended on manual checks of employment documents, merchant catalogues arriving as text files, spreadsheets and unindexed feeds, and fixed servers that crashed when large grocery chains released new discount lists. We replaced it with an automated, cloud-hosted platform and a native Android app that verifies workers instantly and searches offers in under a second.

Which technologies power National Hero?

The Android client is written in Kotlin with Jetpack Compose on the Android SDK, with an encrypted SQLite cache for offline coupons. The backend runs as Docker microservices on Kubernetes across AWS and Azure, provisioned by Terraform. MySQL stores user profiles, merchant accounts and discount usage logs, a NoSQL document database holds the grocery catalogue, and a Redis cluster caches category searches and active promotions. Okta with OAuth 2.0 and JSON Web Tokens handles identity, and CrowdStrike Falcon protects the hosts.

How are frontline workers verified without storing their credentials?

Sign-up connects to Okta over OpenID Connect. A worker's workplace credentials travel over encrypted channels directly to Okta for identity validation, and our databases store only the encrypted unique identifier token Okta returns. After login the app receives a short-lived JSON Web Token, so no raw employee IDs or passwords are kept on our infrastructure or on the phone.

Do discount coupons work without network coverage inside a store?

Yes. When a worker opens a grocery discount while online, the app encrypts the validation token and saves it in a local SQLite cache on the device. If the phone loses signal inside a concrete store building, the app still renders the digital discount barcode from local storage so it can be scanned at the checkout.

National Hero product screens

Build your next Retail product with Next Olive

Share your requirements β€” we will propose scope, timeline and stack within one business day.