How do location-based apps work? They do four things in order: figure out where you are, find the items near that point, rank them for you, and keep that list fresh without making you wait. GoParti is a nightlife feed that runs in the browser with no download, so every one of those steps has to work on an ordinary web page. Below we walk through how our feed does each step, with the real numbers from our code, plus the trade-offs we made. If you're building anything with a "near me" feed, the same pattern applies.
1. What are the parts of a location-based feed?
A location-based feed is a pipeline: location in, nearby items out, filtered by time, ranked by relevance and served from a cache.
Each step has its own failure mode. Location can be denied or slow. "Nearby" can mean a walk or a two-hour drive. Time matters as much as place, because an event that ended an hour ago is useless. And ranking decides whether the first card someone sees is worth a swipe.
The rest of this guide takes those steps one at a time. If you want the bigger picture on why we built GoParti as a web app at all, read progressive web app vs native app.
2. How does a web app get your location?
A web app asks the browser through the Geolocation API, which only works over HTTPS and only after the person grants permission.
MDN's documentation says the Geolocation API is available only in secure contexts (HTTPS) and that users must grant explicit permission through a prompt when a site calls getCurrentPosition() or watchPosition() (MDN Web Docs). That prompt is the most fragile moment in any location product, so plan for people who say no.
GoParti uses a three-step fallback. First, the phone's location, if you allow it. We ask for a low-accuracy fix with an 8-second timeout and accept a reading up to 10 minutes old, because a nightlife feed needs your neighborhood, not your exact seat, and a fast answer beats a precise one. Second, if that's unavailable, an approximate location based on your connection's IP address. Third, a default city, so the feed is never empty.
People can also skip all of that. Tapping the location pill lets you pick any city or zip code to browse, which is how people plan a trip before they arrive.
3. How does an app measure what's "near you"?
Most apps compute straight-line distance on a sphere with the haversine formula, then filter by a radius the person chooses.
The haversine formula gives the great-circle distance between two latitude and longitude points. Our implementation uses an Earth radius of 3,958.8 miles, so results come out directly in miles. It's fast enough to run on every event in a feed on every request.
Straight-line distance isn't travel time, so the radius should be described in human terms. GoParti offers 5, 10, 25, 50, 75 and 120 miles, labeled from walking distance up to roughly a two-hour drive, and defaults to 25 miles. Distances also show on each card so people can judge the trip themselves.
4. How do you keep a location feed fast?
Divide the map into fixed cells, build one feed per cell, and serve the stored copy instantly while refreshing it in the background.
Building a feed from scratch for every person is slow and expensive. Instead, GoParti snaps each location to a grid cell 0.25 degrees on a side, roughly 17 miles. Everyone in the same cell shares one stored feed, and their personal radius is applied afterward.
When someone opens the app, we return that cell's stored feed right away. If it's stale, a refresh runs in the background after the response is sent, so the next visitor gets fresh data and nobody waits. If a cell has never been built, or came back empty last time, we build it on the spot. For wide searches over 50 miles, we also read neighboring areas so a two-hour radius isn't limited to one cell.
This pattern, sometimes called stale-while-revalidate, trades a few minutes of freshness for speed. For nightlife that's the right trade: events don't change by the second, but a slow first screen loses people.
See the feed near you5. Why does time matter as much as place?
A nightlife feed has to understand that a 1 a.m. set belongs to the night before, so GoParti treats each night as running from 6 a.m. to 6 a.m.
Calendar days break nightlife. If "tonight" ended at midnight, a party that starts at 12:30 a.m. would disappear from tonight's feed and show up as tomorrow's. So GoParti defines a night as 6 a.m. to 6 a.m. local time, and "tonight" runs until 6 the next morning.
Events also stay visible for a few hours after they start, since people often arrive late. The weekend view starts Friday at 5 p.m. Small rules like these matter more to the experience than any ranking model.
6. How does a location feed decide what to show first?
Rank by a mix of overall popularity and what this person has shown they like, and learn from actions rather than settings.
Popularity comes from how people interact with each event, like views and taps. Personal taste is learned from behavior: how long someone looks at a flyer, quick skips, opening details, saves, ticket or directions taps, shares, searches, and thumbs up or down. Each action nudges weights for the event's vibe, genre keywords, venue, price band and time of night.
Taste fades on purpose. GoParti's weights have a 45-day half-life, so what you liked last month counts more than what you liked last year. Taste is stored on your device first. Some listings, like adult-themed nights, never appear unless the person opts into that category, no matter how popular they are.
- Strong positive signals: a thumbs up, a ticket or directions tap, a share, a save.
- Weak signals: a glance of a second or two counts for very little.
- Negative signals: a fast skip nudges down; a thumbs down nudges down hard.
7. What would we tell anyone building a location-based app?
Never show an empty screen, ask for location only when it helps, and make the fallback good enough that people don't mind saying no.
Want to see it working? Open GoParti on your phone and the feed loads for wherever you are. If you run events, list one free and it shows up for people nearby.
- Design for denied permission. An approximate location plus a manual city picker covers most people.
- Prefer fast over precise. City-level accuracy is enough for discovery.
- Cache by area, personalize after. Shared cells keep costs flat as usage grows.
- Model local time correctly. Time zones and late-night cutoffs cause more bugs than maps do.
- Publish public pages. Our city pages and Nightlife Index let search engines read what the feed shows.