Inspiration

As remote work becomes more common, one problem remains surprisingly unsolved: where can you reliably work with fast WiFi?

People often rely on reviews that mention coffee quality or ambience, but rarely provide objective internet performance. We wanted to create something that makes finding a productive workspace effortless while presenting the data in a memorable way.

Inspired by metro maps, we transformed cafés into stations and WiFi performance into transit lines. Instead of another pin-filled map, Lattency visualizes connectivity as a living transit network powered by real speed measurements.


What it does

Lattency is a crowdsourced platform for discovering cafés with reliable internet.

Users can:

  • Explore cafés on an interactive metro-style map.
  • Find nearby cafés using geospatial search.
  • View download speed, upload speed, latency, and WiFi performance tiers.
  • Submit new speed measurements that immediately update the network.
  • Continue using the app even if the database is temporarily unavailable thanks to an intelligent offline fallback.

Although built during a hackathon, the architecture is designed to be production-ready and capable of supporting significantly more users and cities.


How we built it

The frontend is built with Next.js 16 App Router and React Server Components, then deployed on Vercel for global delivery and edge caching.

For the backend we chose Amazon Aurora PostgreSQL Serverless v2 because it provides automatic scaling while allowing us to leverage PostGIS for fast geospatial queries. Nearby café searches are powered by spatial indexes rather than expensive application-side calculations.

We maintain a materialized view that precomputes WiFi statistics and café performance tiers, allowing read requests to remain extremely fast even as new measurements are submitted.

Database access uses a serverless-safe pg.Pool singleton cached on globalThis, ensuring efficient PostgreSQL connections across Vercel Functions.

To improve resilience, the application automatically falls back to a bundled Nairobi dataset whenever Aurora is unavailable or waking from auto-pause. Users still get a fully interactive experience instead of a blank screen.


Challenges we ran into

The biggest challenge was designing a database architecture that works well with serverless infrastructure.

Aurora Serverless automatically scales and pauses when idle, which is excellent for cost efficiency but introduces cold starts that needed to be handled gracefully. We solved this by implementing a complete offline fallback while keeping the API contract identical.

Another challenge was balancing live updates with read performance. Rather than recalculating statistics for every request, we refresh a materialized view after new measurements are submitted, allowing subsequent reads to remain extremely fast.

We also explored using RDS Proxy before discovering that it isn't an ideal fit for internet-facing Vercel deployments without PrivateLink, which led us to simplify the architecture while maintaining production readiness.


Accomplishments that we're proud of

  • Built a complete full-stack application on Vercel + Amazon Aurora PostgreSQL.
  • Implemented efficient geospatial search using PostGIS.
  • Designed a scalable read path using PostgreSQL materialized views.
  • Created an interactive metro-style visualization instead of a traditional map.
  • Added graceful offline fallback so the application never fails completely if the database is unavailable.
  • Built an architecture that can realistically scale beyond a hackathon demo.

What we learned

This project taught us how much thought goes into designing modern serverless architectures.

We gained practical experience with Aurora Serverless, PostgreSQL connection management, PostGIS spatial queries, materialized views, and deploying production-ready Next.js applications on Vercel.

Most importantly, we learned that great user experiences come from thoughtful backend architecture just as much as beautiful frontend design.


What's next for Lattency

We're excited to expand Lattency into a city-wide and eventually global platform.

Our roadmap includes:

  • Browser-based speed testing instead of manual measurements.
  • User accounts, badges, and contributor leaderboards.
  • Historical performance trends and reliability analytics.
  • AI-powered café recommendations based on work style.
  • Support for multiple cities around the world.
  • Integration with the Vercel × AWS Marketplace private networking solution for an even more production-ready deployment.

Our goal is to make Lattency the go-to platform for anyone looking for the perfect place to work, study, or create.

Built With

Share this project:

Updates