{"slug": "why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql", "title": "Why I Built a Zero-AI Review Monitor with Regex, FastAPI, HTMX, and PostgreSQL", "summary": "A developer built ReviewRadar, a review-monitoring service that classifies public Google Business and Trustpilot reviews using deterministic regex keyword rules instead of LLM inference. The FastAPI and PostgreSQL backend sorts 1-3 star reviews into eight e-commerce complaint buckets, uses PostgreSQL ON CONFLICT deduplication to prevent duplicate alerts, and sends idempotent low-rating alerts plus a weekly competitor complaint digest, priced at $9-$19 per month after a trial.", "body_md": "If you sell physical products on Shopify or run a local business, your sharpest landing-page copy usually lives in your competitors' 1-star reviews. When buyers complain about 14-day shipping delays, denied refunds, or misleading sizing, they are telling you exactly what to promise and prove on your product page.\n\nWhen I looked at existing review tools for small operators, I ran into two problems:\n\nSo I built [ReviewRadar](https://reviews.solokit.vip) with zero LLM inference in the pipeline. It runs deterministic keyword rules over public Google Business and Trustpilot reviews, sends instant idempotent 1-2 star alerts for your own store, and mails a Monday 08:00 UTC competitor complaint digest. Pricing is $9/mo (Starter) or $19/mo (Growth) after a 7-day free trial, and anyone can run a free 30-second competitor audit on the homepage without signing up.\n\nHere is how the core backend is built, why regex beat an LLM for this workload, and where deterministic rules fall short.\n\nReviewRadar does not need microservices, GPU workers, or vector databases:\n\n`pg_dump` backups)\nKeeping classification deterministic means per-audit compute cost stays near zero, latency stays predictable under concurrency, and there are no surprise API bills when a competitor has hundreds of reviews.\n\nIn `app/services/rule_tagger.py`, every 1-3 star review runs through 8 curated e-commerce complaint buckets:\n\n`shipping_delay` (Shipping Delay & Lost Parcel)`refund_return_friction` (Refund & Return Friction)`product_defect_damage` (Product Defect & Damage)`customer_support_ghosting` (Unresponsive Customer Support)`billing_subscription_trap` (Billing & Subscription Trap)`sizing_expectation_mismatch` (Sizing & Expectation Mismatch)`packaging_missing_parts` (Packaging & Missing Parts)`website_checkout_bug` (Website & Checkout Glitch)\nTo avoid substring false positives (like `bot` matching `bottle`), each keyword uses strict alphanumeric boundary assertions and normalizes curly apostrophes (`\\u2019` -> `'`) before scanning:\n\n``` php\ndef _compile_keyword_pattern(keyword: str) -> re.Pattern[str]:\n    escaped = re.escape(keyword.strip().lower())\n    return re.compile(rf\"(?<![a-z0-9]){escaped}(?![a-z0-9])\", re.IGNORECASE)\n\ndef tag(self, rating: int, title: str | None, body: str, rules=None) -> list[str]:\n    active_rules = [r for r in (rules if rules is not None else self._default_rules) if r.is_active]\n    haystack = f\"{title or ''} {body or ''}\".lower().replace(\"\\u2019\", \"'\")\n\n    matched: list[str] = []\n    for rule in active_rules:\n        patterns = self._patterns_for(rule)\n        if any(pat.search(haystack) for pat in patterns):\n            matched.append(rule.tag_key)\n\n    if not matched and rating <= 2:\n        return [\"other_complaint\"]\n    return sorted(set(matched))\n```\n\nA few practical details make this work cleanly in production:\n\n`other_complaint` instead of silently disappearing.`render_reply()` verifies no `{placeholder}` remains unreplaced.\nPolling external review pages runs on a schedule (daily on Starter, twice daily on Growth). The last thing a store owner wants is receiving the same 1-star alert three times because a collector retried.\n\nIn `app/services/deduplicator.py`, PostgreSQL handles deduplication atomically during ingestion:\n\n```\nINSERT INTO reviews (\n  target_id, source, external_review_id, rating, author_name,\n  title, body, review_url, published_at, tags\n)\nVALUES (\n  %(target_id)s, %(source)s, %(external_review_id)s, %(rating)s, %(author_name)s,\n  %(title)s, %(body)s, %(review_url)s, %(published_at)s, %(tags)s\n)\nON CONFLICT (source, target_id, external_review_id) DO NOTHING\nRETURNING id, rating;\n```\n\nOnly rows actually returned by `RETURNING id, rating` with `rating <= 2` are queued for email or Slack/Webhook alerts, and every poll logs `fetched_count`, `inserted_count`, `duration_ms`, and `http_status` into `scrape_runs`.\n\nRegex rules are not magic, and I would rather be upfront about the limits:\n\n`\"Wow, my package really enjoyed touring three continents before seeing my porch\"` may land in `\"not a shipping issue, the zipper broke\"` can match both Even with those tradeoffs, showing small store owners exact complaint counts and verbatim 1-star quotes in 30 seconds for $9-$19/mo turns out to be far more useful than a $300/mo black-box sentiment score.\n\nYou can run a free competitor review audit without creating an account at **[reviews.solokit.vip](https://reviews.solokit.vip)** (for example, test `Gymshark London` or any storefront on Google Business). Feedback on rule false positives or ingestion edge cases is very welcome in the comments.", "url": "https://wpnews.pro/news/why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql", "canonical_source": "https://dev.to/jason_lee_opc/why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql-7fi", "published_at": "2026-12-06 06:35:41+00:00", "updated_at": "2026-12-06 06:44:35.323662+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["ReviewRadar", "FastAPI", "HTMX", "PostgreSQL", "Shopify", "Trustpilot", "Google Business"], "also_reported_by": [], "takeaway": "For fixed complaint categories, boundary-anchored regex rules (using lookarounds like (?<![a-z0-9]) to avoid substring false positives) classify reviews at near-zero per-audit cost and predictable latency, with PostgreSQL ON CONFLICT DO NOTHING plus RETURNING keeping alert deduplication atomic.", "recommendation": {"advice": "Before adding an LLM to a fixed-category classification task, test deterministic boundary-anchored regex rules first; they keep per-item cost near zero and latency predictable.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql", "markdown": "https://wpnews.pro/news/why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql.md", "text": "https://wpnews.pro/news/why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql.txt", "jsonld": "https://wpnews.pro/news/why-i-built-a-zero-ai-review-monitor-with-regex-fastapi-htmx-and-postgresql.jsonld"}}