its-5-oclock-somewhere.vercel.app
A fun little web app that tells you which countries in the world have hit happy hour (5pm or later) right now. Inspired by the Jimmy Buffett classic — because it's always 5 o'clock somewhere.
I'm a huge parrothead (Jimmy Buffett fan) and wanted an excuse to practice my Go. I wrote an algorithm that efficiently identifies countries where, based on the current UTC time, it's 5pm or later using a sorted map of UTC offsets and binary search. It was a fun way to play with Go's slices, maps, and sort packages.
I used GitHub Copilot to build out the frontend — an animated Caribbean-themed page with an SVG cocktail, swimming sea life, and a scrolling country ticker.
I decided to host it on Vercel because I wanted to play with serverless functions. The Go API runs as a Vercel serverless function, and the static frontend is served from the public/ directory. Zero infrastructure to manage.
The Go function maintains a map of UTC offsets to country names. On each request, it calculates which offsets correspond to 5pm+ at the current time and returns the matching countries as JSON. The frontend fetches this list and displays it in a shuffled scrolling ticker.
api/
five_o_clock_somewhere.go # Vercel serverless Go function
go.mod
public/
index.html # Page markup + SVG cocktail
style.css # Caribbean-themed styles
script.js # Ticker, sea life animations
vercel.json # Vercel config
npm i -g vercel
vercel dev- Terminal app/script that displays happy hour countries right from the command line