Spend Better: Days 3 & 4
2 min read

Spend Better: Days 3 & 4

Things are going well! After Day 2, the plan for Day 3 was UI. Check! ✅

Spend Better homepage
An individual Listing

Nothing fancy about this UI at all, but I wanted to make sure to have homes for the primary content: Listings (the businesses), Qualities, and Categories. Also I cheated a bit and these shots include tweaks made on Day 4, too, but the general structure is the same.

Naturally all of this will be adjusted with time and as content grows (zero pagination or anything yet). Getting the basics viewable on the screen was the only requirement.

Onto a very productive Day 4: Search!

I installed and integrated Laravel Scout with the Listing entity, allowing all Listings to be indexed by Meilisearch. That gets me keyword searching out of the box:

Keyword search results

Next was implementing location-based searching. Like pretty much all geo-search providers, Meilisearch uses latitude and longitude coordinates. Step one was adding them to the Listing entity to be indexed. I chose to do it manually for now when adding Listing details; it can always be automated later.

Next, I needed to know the coordinates of the zip code entered by the user. After initially looking into an on-demand API solution, I instead found a data set of most US zip codes, their coordinates, city and state names, etc. This gave me good wins for performance (no external calls) and UI (showing the location name instead of the zip back to the user).

Lastly, I implemented location searching by customizing the Scout engine search to include a _geoRadius filter. Everything seems to be working great for a v0.1!

Location-based search results

After a weekend of fun with friends and family and more distractions today, Day 5 will probably be only minimal changes. I'm hoping to get one or two items off my remaining to-do list:

  • Improve mobile styling
  • Implement draft listings that can be published when complete
  • Capture search activity for review
  • Excerpt + full descriptions
  • Handle unrecognized zip codes

See how many of these I accomplished on Days 5 & 6 →