DEV Community

AI Predictions Dev
AI Predictions Dev

Posted on

Building a Fast, Offline-First Directory for Healthcare Providers

Most healthcare search tools are bloated. They rely on heavy JavaScript frameworks, endless API calls, and complex state management that makes them sluggish on older devices or spotty connections. When you’re trying to find a reliable nursing home or dialysis center for a loved one, you don’t want to wait three seconds for a spinner to disappear. You want answers. Immediately.

That friction drove the creation of Carescorecard. The goal was simple: build a lightweight, private-by-default directory of official Medicare ratings that works instantly, everywhere. No tracking, no complex dashboards, just data when you need it. Here is how we built it to stay fast and honest.

The Architecture: Simplicity Over Scale

We didn’t need a microservices architecture for a directory. We needed reliability. The site is built with vanilla JavaScript and minimal CSS, avoiding heavy frameworks that add unnecessary overhead. The core logic is straightforward: fetch data, cache it locally, and render it instantly.

The data source is the official Medicare Care Compare dataset. It’s comprehensive, covering over 46,000 facilities across five categories: hospitals, nursing homes, dialysis centers, home health agencies, and hospices. The challenge wasn’t gathering the data; it was making it searchable without overwhelming the browser.

Instead of sending every query to a server, we implemented a smart caching strategy. On the first visit, the browser downloads a compressed JSON dataset containing the essential ratings and location metadata. Subsequent searches are handled entirely client-side. This means if you’re looking up hospitals by ZIP code, the filtering happens in milliseconds on your device. No round-trips. No latency. Just immediate results.

This approach ensures the site remains responsive even on low-end hardware or slower network connections. For many users, especially older adults who are the primary demographic for nursing home and hospice searches, speed is not a luxury—it’s a necessity.

Privacy as a Feature, Not a Buzzword

In an era where every app demands a login or tracks your behavior, we chose a different path. Carescorecard uses private on-device AI to enhance search relevance without sending your data anywhere. When you type a query like "nearby dialysis centers," the matching logic runs locally in the browser. It analyzes your input against the cached dataset instantly, providing ranked results without ever transmitting your location or search history to a server.

This design choice eliminates the need for traditional analytics tools. We don’t need to know who you are to help you find a good hospital. The interface is clean because there are no pop-ups asking for cookies consent or email sign-ups. It’s just a search bar and results. This minimalist approach reduces cognitive load, allowing users to focus on making decisions rather than navigating interfaces.

The privacy model also simplifies maintenance. Without complex user accounts or session management, the codebase remains small and easy to debug. Updates can be deployed quickly because there are fewer dependencies to manage. It’s a testament to the idea that less complexity often leads to better performance and higher reliability.

Handling the Data Complexity

Medicare ratings are not uniform. Hospitals have star ratings and patient experience scores. Nursing homes have staffing levels and health inspection scores. Dialysis centers focus on fluid management and infection control. Each category requires specific metrics to be meaningful.

We normalized these disparate datasets into a unified structure that allows for consistent comparison. By tagging each facility with its specific type and relevant scores, we enable users to filter based on what matters to them. For example, a user looking for a nursing home might prioritize staffing levels, while someone choosing a hospice might care more about location convenience.

The site supports search by city and ZIP code, which is crucial for rural areas where facility options are limited. By indexing locations precisely, we ensure that users aren’t forced to drive 50 miles to find a rated facility. The local processing ensures that these geographic queries are resolved instantly, providing a smooth experience even when offline.

What’s Next

The current version handles the core search functionality efficiently. Future iterations will focus on adding more nuanced filters, such as insurance network compatibility or specific accessibility features, while maintaining the lightweight architecture. The goal remains unchanged: provide clear, actionable data without the bloat.

Building a tool for healthcare decisions requires humility. We aren’t trying to replace doctors or insurance agents. We’re trying to remove the friction from finding basic information. By keeping the tech stack simple and the privacy model robust, we’ve created a tool that respects the user’s time and attention.

How do you balance feature richness with performance in data-heavy applications? Do you prefer client-side processing for instant feedback, or do you rely on server-side logic for more complex queries?

Top comments (0)