You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create a mutation to fetch top 3 closest merchants #200
I'd like to work on this issue bundled with #201 (Flash Favorites) for the 150,000 sats bounty.
Approach for the geospatial merchant query:
GraphQL schema: Add a new unauthed query closestMerchants(lat: Float!, lng: Float!): [Merchant!]! (or accept Coordinates input type if it already exists).
MongoDB geospatial index: Add a 2dsphere index on the merchants collection's location field. Use $nearSphere or $near with $maxDistance to find the 3 closest merchants sorted by distance.
IP fallback: If lat/lng are not provided, use a free geolocation-by-IP service (e.g. ip-api.com) to get approximate coordinates.
Rate limiting (secondary): Add per-IP rate limiting middleware if needed.
For #201 (Flash Favorites): Add merchants_featured Mongo collection, GraphQL query + mutation, and ERPNext admin page for curating the featured list.
Activity
brh28 commentedon Aug 25, 2025
Unauthed query. Rate limiting is a secondary concern
Look into how to get latitude & longitude. These will be the request parameters to the API defined by the
Coordinatestype.Response is an array of the
Merchanttype defined in the graphql schema.Look into Mongo's Geospatial queries
patoo0x commentedon Mar 20, 2026
📋 Definition of Done
chengyixu commentedon Mar 21, 2026
Proposal — Top 3 Closest Merchants Query
I'd like to work on this issue bundled with #201 (Flash Favorites) for the 150,000 sats bounty.
Approach for the geospatial merchant query:
GraphQL schema: Add a new unauthed query
closestMerchants(lat: Float!, lng: Float!): [Merchant!]!(or acceptCoordinatesinput type if it already exists).MongoDB geospatial index: Add a
2dsphereindex on the merchants collection's location field. Use$nearSphereor$nearwith$maxDistanceto find the 3 closest merchants sorted by distance.IP fallback: If lat/lng are not provided, use a free geolocation-by-IP service (e.g.
ip-api.com) to get approximate coordinates.Rate limiting (secondary): Add per-IP rate limiting middleware if needed.
For #201 (Flash Favorites): Add
merchants_featuredMongo collection, GraphQL query + mutation, and ERPNext admin page for curating the featured list.ETA: 3–4 days for both together.
Lightning address: [email protected]
feat: add closestMerchants query to find top 3 nearest merchants by G…
islandbitcoin commentedon Apr 17, 2026
closing as a roadmap/product idea, not active implementation work right now. can reopen if top-merchants-nearby gets product priority.