Problem
Shopify has no native reviews or view counts for blog articles. The app had to install without write access to the theme, render on the server for SEO and no layout shift, offer flexible moderation and pass App Store review. After the first build, a real store showed that neither reviews nor views worked, even though every test was green.
Solution
Postgres is the source of truth, and article metafields are a published cache for rendering. Liquid blocks render rating, views and approved reviews on the server, and a small script under 10 KB sends views, reviews, replies and votes through a signed app proxy. A separate worker syncs the metafields in the background. The embedded admin is built on Polaris web components.
Key decisions
Chose the database as the source of truth and metafields as a render cache
Why Rendering from metafields gives SEO, no-JavaScript support and zero layout shift, while Postgres allows moderation, analytics and import.
Chose a separate worker that writes metafields with compare-and-set
Why Shopify sync never blocks storefront requests, updates are batched and parallel events do not overwrite each other.
Chose a theme app extension only, with no theme write access
Why It installs without touching theme code, and everything is set in the theme editor.
Chose to fail open if billing cannot be checked
Why A billing error must never break a merchant's storefront.
Results
- A full cycle confirmed on a real dev store: a view counted, a review approved and shown with stars.
- More than 800 automated tests, including property-based and database integration tests.
- Storefront script kept under its 10 KB budget.
- Listing package, reviewer instructions and screenshots prepared for the App Store.
- Reply threads and voting merged, and hosting set up. Publishing to the App Store is next.


