pages

Root-level Astro pages and the top-level directory for all route files. This directory contains the five static content pages served at fixed URLs. Dynamic routes (provider profiles, state/city directories, specialty pages, guide pages, NPI redirects, and API endpoints) live in subdirectories and are documented separately.

Files

FilePurpose
index.astroHomepage. SSR: queries getSiteStats and getTopSpecialties at request time to display live provider counts and specialty tiles. Mounts DoctorSearchForm as a React island (client:load) for real-time FTS5 search. Injects WebSite + Organization JSON-LD. Uses ToolLayout.
about.astroStatic about page explaining the site mission, Trust Score factors (hardcoded for copy clarity), and data sources. Uses ContentLayout with breadcrumbs. Generates BreadcrumbList JSON-LD. No D1 queries.
privacy.astroStatic privacy policy page. Lists what data is and is not collected, retention periods, and user rights. Uses ContentLayout. Generates BreadcrumbList JSON-LD. No D1 queries.
terms.astroStatic terms of service page. Covers acceptable use, disclaimer, Trust Score disclaimer, IP ownership, and liability limitation. Uses ContentLayout. Generates BreadcrumbList JSON-LD. No D1 queries.
dispute.astroStatic correction request page. Instructs users to email [email protected] with NPI, URL, and error description. Clarifies which corrections require source updates at NPPES or state board. Uses ContentLayout. No form submission logic — email-based process only.

Subdirectories

DirectoryRoutes served
api//api/search (FTS5 provider search), /api/verify (badge verification), /api/lead (lead form submission)
doctor//doctor/[slug] — 1.1M+ SSR provider profile pages
npi//npi/[npi] — 301 redirects to /doctor/{slug}
state//state/[state] (state overview) and /state/[state]/[city] (city directory)
specialty//specialty/[slug] and /specialty/index.astro
guide//guide/[slug] and /guide/index.astro
badge//badge/[npi] (dynamic SVG) and /badge/[npi]/embed

Relationships

Entry Points

index.astro is the primary entry point. All other root-level pages are self-contained static responses. The homepage is the only root-level page that performs D1 queries.

The subdirectory pages are the high-traffic surfaces: /doctor/[slug] handles ~1.1M routes, /state/ handles 51 + 3,000+ routes.

Gotchas