Rahma Store is a kitchenware catalog. A product page is a stack of photos, sometimes a video, and the home screen is a banner plus grids. Shoppers often open it on a weak connection, and the interface is Arabic, so direction is part of the layout. The catalog has 532 products, and most of the original photos were plain phone shots. This post covers three pieces of work: the Grok Bot I built to turn those photos into a consistent image set, a Hive delta sync that fetches only what changed, and an Arabic UI that does less work while you scroll.
The app is on Google Play as com.rahmastore.app. The public Rahma-Store repository is a README and screenshots. The Dart snippets below are from the Rahma client source.
Product images
Most of the catalog photos started as plain phone shots, so the storefront looked inconsistent. I built a Grok Bot, an AI assistant connected to the shop database and to a review site I run, to turn those reference photos into a consistent set of product images.
The flow is straightforward. I name a product, or a batch of similar ones. The bot pulls the record from the database and uses the current photo as the reference. It then decides what that product needs: a main image only, a main plus a lifestyle shot, or a full set with an info image. Info images only carry real specs, never just the product name. It writes a prompt for that product and generates the images. Mains are 1:1 on pure white, showcase shots are 4:3, and everything is compressed to WebP. It checks each image against the original photo: shape, colour, piece count, and details. Then it uploads the images and sends them to a Needs review tab on my site. I approve or reject there. A rejection carries a written reason, and the bot reads it, fixes the image, and resubmits.
I taught it a few rules along the way. Never stack plates, and show one of each type in dinner sets. Products sold in several sizes get a small size badge in the top-right corner, so the sizes can be told apart. Once a product has an AI main, the original phone photo does not stay in the showcase. Anything the bot cannot be sure of, such as how many cups come in a set, goes to a Review & Answer tab instead of a guess.
That process handled some messy cases. A Turkish ice cream cup set took several correction rounds on the silver details: the rim, the body speckle, and a thick band with lines, until it matched the real product. The bot removed the original photos from the showcases of 63 products. It also audited the catalog for size variants, found 45 products that needed a size badge, built all 45 new mains with the badges, and sent them to review. I approved them. The families included pots, pans, coffee pots, knives, and baking trays.

A nightly job runs at 1 AM. It checks for new products that need images, reject reasons, and my answers in Review & Answer. It tidies the layout after approvals and stays silent when there is nothing to do. Since early November it has found nothing to do, because all 532 products are finished.
I stay in control as the approver. The bot does the repetitive work: research, prompts, generation, checks, uploads, and database edits.
On the phone, those WebP mains are loaded with CachedNetworkImage. A memCacheWidth of 250 keeps the decode cost down in the grid, and a light grey box stands in until the bytes arrive.
// lib/features/product/presentation/widget/product_card.dart
CachedNetworkImage(
imageUrl: product.photoLinks.isNotEmpty
? product.photoLinks.first
: 'https://via.placeholder.com/150',
fit: BoxFit.contain,
memCacheWidth: 250,
placeholder: (context, url) => Container(
decoration: BoxDecoration(
color: Colors.grey.shade50,
borderRadius: BorderRadius.circular(8.r),
),
),
// ...
)
The shipped app still shows that media as a gallery: one large photo, thumbnails beneath it, and the selected frame outlined. A second view stacks lifestyle photos and a product video with a play control, then add-to-cart.


Delta sync
Downloading every product on every launch would make the home screen wait on the whole table, including rows whose photos did not change. After the first run, the catalog sync does not do that.
The first launch is a full sync into a Hive CE box. The time of that sync is stored locally as products_last_sync_time in a settings box. Later launches do not resend the whole catalog. They ask Supabase only for rows whose last_updated is newer than that stored time. A row marked isDeleted is deleted from the local box, so a withdrawn pot does not linger because it was missing from one response. If there is no connection, or the request fails, the UI returns the cached, non-deleted products instead.
// lib/features/product/data/repos/product_repo.dart
Future<List<Product>> getAllProducts() async {
final cached = _cache.values.where((p) => !p.isDeleted).toList();
final hasConnection = await _hasInternetConnection();
if (!hasConnection) {
if (cached.isNotEmpty) return cached;
throw Exception('No internet connection and no cached data available.');
}
final lastSyncString = _settingsBox.get(_lastSyncKey) as String?;
// ...
if (lastSyncString == null) {
return await _fullSync();
}
return await _deltaSync(DateTime.parse(lastSyncString));
}
Future<List<Product>> _deltaSync(DateTime lastSync) async {
final updated = await _api.getProductsUpdatedAfter(lastSync);
for (final p in updated) {
if (p.isDeleted) {
await _cache.delete(p.id);
} else {
await _cache.put(p.id, p);
}
}
await _updateSyncTime();
return _cache.values.where((p) => !p.isDeleted).toList();
}
The API side is a single last_updated filter:
// lib/features/product/data/apis/product_api.dart
Future<List<Product>> getProductsUpdatedAfter(DateTime since) async {
final response = await _supabase
.from('products')
.select()
.gt('last_updated', since.toIso8601String())
.order('last_updated', ascending: false);
return response.map((json) => Product.fromJson(json)).toList();
}
Search uses that cache. arabic_normalizer.dart strips tashkeel, folds أ إ آ into ا, and also normalizes ة and ى, before a local fuzzy search over name, category, and description. Finding a product is not another Supabase round trip.
| Situation | What the phone does |
|---|---|
| First launch, online | Full sync of products into Hive |
| Later launch, online | Fetch rows with last_updated newer than products_last_sync_time |
| Offline or a failed request | Return the Hive cache |
Row marked isDeleted | Delete it from the local box |
The delta runs from the server to the phone. Catalog edits happen on the backend, and the device applies them. There is no conflict merge, and no queue of offline catalog writes. The client does not create, update, or delete products.
An Arabic UI that skips work
The home screen is right to left. The greeting, the search field, the offer banner, prices in Egyptian pounds, and the bottom bar all follow that direction. RTL here is the layout the shopper sees, not a flag flipped on at the end.
Smooth scrolling here is less work, not a faster widget.
Home is a CustomScrollView of slivers: a pinned SliverPersistentHeader, the banner, then a SliverGrid of product cards. The grid gives each card a stable ValueKey and a findChildIndexCallback, so a filter or sort can move a card without rebuilding it from scratch.
// lib/features/home/presentation/screens/home_screen.dart
return CustomScrollView(
physics: const BouncingScrollPhysics(),
slivers: [
SliverPersistentHeader(
pinned: true,
delegate: HomeHeaderDelegate(
products: products,
onMenuTap: onMenuTap,
),
),
// ...
ProductGrid(products: products),
],
);
The offer banner does not listen to scroll notifications. A VisibilityDetector turns autoPlay on only while at least 10% of the carousel is on screen, so it stops once you have scrolled it away. The decorative notch over the banner sits in a RepaintBoundary whose painter never repaints, so a carousel frame does not redraw that mask. The drawer backdrop, the drawer contents, and the floating nav bar use the same RepaintBoundary idea.
// lib/features/home/presentation/widgets/banner_widget.dart
VisibilityDetector(
key: const Key('banner-visibility-detector'),
onVisibilityChanged: (info) {
if (context.mounted) {
isVisible.value = info.visibleFraction > 0.1;
}
},
child: CarouselSlider(
options: CarouselOptions(
autoPlay: isVisible.value,
viewportFraction: 1.0,
// ...
),
// ...
),
)
The header is a SliverPersistentHeaderDelegate in silverheader_widget.dart, spelled that way in the tree. As shrinkOffset grows, the greeting fades out and the search field slides up beside the menu. shouldRebuild returns true only when the product count changes, so a parent rebuild does not automatically rebuild the header.
// lib/features/home/presentation/widgets/silverheader_widget.dart
final t = (shrinkOffset / _greetingExtra).clamp(0.0, 1.0);
final searchTop = lerpDouble(_minHeight + 70.h, 10.h, t)!;
final greetingOpacity = (1.0 - t * 2.0).clamp(0.0, 1.0);
// ...
@override
bool shouldRebuild(HomeHeaderDelegate oldDelegate) =>
oldDelegate.products.length != products.length;
flutter_animate is what the small entrance and floating motions use, through helpers in animation_extensions.dart. flutter_screenutil is what fits the same screens across phones. The first-load screen is a branded splash with an orbit of tools, not a skeleton grid. I have no measured before-and-after for frame time, so this section stays qualitative: the catalog can open from Hive, the banner stops when it leaves the screen, and static chrome is kept off the carousel's repaint path.

Open the app
Install Rahma Store from Google Play. The project page walks through the same screens. The public repository is a README and screenshots. Its README still uses the working title KitchenShop. That is this app.
Sources
The sync, search, and UI snippets are from the Rahma client source. The image pipeline is the Grok Bot I run against the shop catalog; the app then loads those WebP mains with CachedNetworkImage. The public showcase remains a README and screenshots.12
Footnotes
-
Rahma on this site — delta sync, Hive, Arabic search, and the Play listing
com.rahmastore.app. ↩ -
Rahma-Store showcase — closed-source note and screenshots. Cloud-Snap is a separate uploader and is not referenced by Rahma. ↩