NearDeal — Real-Time Geofenced Deals Marketplace for Local Retail
Building NearDeal across four phases: a marketing site and web app with automated business identity verification, a real-time geofencing engine that alerts nearby consumers to live deals within 60 seconds, native iOS/Android apps, and a Claude-powered engine that emails businesses three data-grounded suggestions after every deal expires.
Client
Location-Based Retail Marketplace Startup (NDA, Australia)
Project Value
Confidential — Active Engagement
Rating

The Challenge
The founder wanted consumers to discover time-sensitive local deals the moment they were near a participating business, and wanted business owners to post a deal and see exactly how it performed — without either side needing manual vetting or a data analyst. The core technical risk was scale: matching a live deal against every nearby consumer in real time, at a range the client had only bracketed as "500 to 5,000 concurrent users," a 10x spread with materially different infrastructure implications at each end.
The Goal
Sequence a provisional Phase 1 launch (a non-real-time matching layer to reach market faster) behind an automated, real-time-capable architecture underneath — so Phase 2 upgrades the matching engine transparently, with existing users and deals migrating with no re-registration, no visible cutover, and no rebuild.
Solution & Implementation
1Analysis
Mapped the full deal lifecycle across three actors — consumer, business, and platform admin — and identified that server-side matching was not optional: mobile OS platforms cap simultaneous background-geofence monitoring per app at a level that does not scale once a consumer follows more than a handful of businesses, which pushed the entire matching problem onto the backend rather than the device.
2Designing Solution
Built the geofencing engine on PostGIS spatial queries (ST_DWithin) with geohash-based spatial partitioning, so a deal broadcast does not trigger a full-table scan against every registered consumer location. New deals push to the matching engine over WebSocket/SSE the instant they are posted, and matches fan out to push notification services (FCM for Android, APNs for iOS) with an offline-delivery fallback queue.
3Customizing Business Logic
Designed multi-branch fan-out: a business with several locations selects which branch (or branches) a given deal applies to, and the geofencing engine evaluates matches from each branch independently while still sending a consumer within range of multiple branches a single, de-duplicated notification. Automated business-identity verification runs against a national business registry API at sign-up, with a clear rejection message and an admin override path for edge cases, replacing a manual approval queue entirely.
4Scale & Optimize
Closed the loop for business owners with a Claude API integration: within one hour of a deal expiring, the system assembles that deal's funnel metrics against the business's own history and its category benchmark, and emails three suggestions that must reference the business's actual figures — generic advice is rejected and retried once before falling back to a metrics-only email if the API is unavailable, so the business always receives a summary regardless of third-party uptime.
Results & Impact
Notification Latency (Target)
Concurrent Load (Target)
Crash-Free Sessions (Target)
AI Suggestion Turnaround (Target)
Business Onboarding (Target)
Server-side geofencing was an architectural requirement, not a preference — mobile platforms' per-app background-geofence caps make device-side matching non-viable once a consumer follows more than a handful of businesses
Multi-branch fan-out evaluates matches from every selected branch independently but still sends each consumer a single, de-duplicated alert — no duplicate notifications regardless of how many branches are in range
Automated business identity verification against a national business registry replaces a manual approval queue, with an admin override path reserved for genuine edge cases only
Claude API suggestions are output-validated before sending — generic, non-data-grounded advice is rejected and retried once, with a deterministic metrics-only fallback if the API is unavailable
The Phase 1 provisional matching layer is designed to be replaced transparently by the Phase 2 real-time engine — existing users and deals migrate with no re-registration and no visible cutover
4-phase engagement sequencing (web foundation → geofencing engine → native apps → AI insights) lets the client reach market on Phase 1 while the real-time and native layers are still in build
Key Technologies
Project Gallery
Technical Approach
NearDeal's geofencing engine runs server-side PostGIS spatial queries (ST_DWithin) against active consumer locations and live deal radii, combined with geohash-based spatial partitioning so a deal broadcast queries only the geohash cells that could plausibly be in range rather than scanning the full user table. This was an architectural requirement, not a preference: both major mobile platforms cap simultaneous background-geofence monitoring per app at roughly 20 regions, which makes device-side matching non-viable once a consumer follows more than a handful of businesses.
New deals push into the matching pipeline over WebSocket/SSE the instant they are posted, and matched consumers receive alerts through Firebase Cloud Messaging (Android) and Apple Push Notification service (iOS), with an offline-delivery fallback queue for unreachable devices. The target designed and load-tested against is sub-60-second delivery from broadcast to device at a confirmed concurrency figure — not a ballpark range, since infrastructure decisions like connection pooling and queue partitioning differ materially across a wide load estimate.
Multi-branch businesses select which location(s) a deal applies to, and the engine evaluates each branch's radius independently while de-duplicating at the notification-assembly stage so a consumer in range of several branches gets exactly one alert. Business onboarding is fully automated against a national business registry API, replacing a manual approval queue with an admin override reserved for edge cases. The full architecture — including why device-side geofencing doesn't scale and how the push pipeline is built — is covered in our real-time geofencing architecture guide.
Frequently Asked Questions
About Ortem Technologies
Ortem Technologies is a premier custom software, mobile app, and AI development company. We serve enterprise and startup clients across the USA, UK, Australia, Canada, and the Middle East. Our cross-industry expertise spans fintech, healthcare, and logistics, enabling us to deliver scalable, secure, and innovative digital solutions worldwide.
Related Case Studies

Regional Nonprofit Consortium (NDA)
CivicHub — Unified Identity & Multi-Tenant Platform for a Regional Nonprofit Consortium

Clinic & Hospital Management Platform (NDA, Global)
CareFlow AI — Human-in-the-Loop Clinic & Hospital Operating System
Ready to Build Something Like This?
We've built retail tech & hyperlocal marketplace solutions like this for teams across the US, UK, and Middle East. Fixed scope. Fixed price. Senior engineers from day one.
Free 30-minute scoping call — no commitment, no sales pitch.



