-
Notifications
You must be signed in to change notification settings - Fork 0
Home
PrimeDoctors is a Laravel 12 + Livewire 3 application that ingests the official NPI Registry (CMS/HHS) data set and transforms it into a fast, mobile-first directory of doctors, organizations, and specialties. The platform includes production-ready import commands, a complete public interface, responsive UI components, and transparent legal/about pages.
Website: https://primedoctors.store
- Vision & Value Proposition
- Architecture & Tech Stack
- Data Model & Source of Truth
- Data Import Commands (Artisan)
- Public Pages & Flows (URLs)
- API & AJAX Endpoints
- Local Development & Build
- Ownership & Contact
- Hashtags
PrimeDoctors bridges the gap between raw NPI registry data and a modern consumer-grade directory:
- Automated ingestion keeps doctors, organizations, and specialties always fresh.
- Powerful search: full-text, facet filters (state, city, specialty, gender), mobile autocomplete.
- Mobile-first UX: thumb-friendly filters, full-screen search, responsive cards, accessible design.
- Clear trust signals: privacy policy, terms, transparent data provenance, public ownership.
Backend
- Laravel 12 (PHP 8.2)
- Eloquent ORM
- Controllers + JSON endpoints
Reactive UI
-
Livewire 3 components:
app/Livewire/DoctorsDirectory.phpapp/Livewire/OrganizationsDirectory.php
Frontend
- Vite 7
- Tailwind CSS 4
- Alpine.js
- Axios for AJAX form submissions
Build System
-
npm run devfor the dev server -
npm run buildfor production -
composer setupcomplete bootstrap script
Styling
- Tailwind utility-first
- Custom gradients
- Accessible filters, forms, and cards
Data Source
- NPI Registry API v2.1 (CMS/HHS)
- Enforces the two-filter rule for all queries
Database
- SQLite (bundled)
- Compatible with MySQL/PostgreSQL
Quality Tools
- PHPUnit 11
- Laravel Pint
- Laravel Pail (observability/logging)
- NPI-1 providers
- Name, NPI, gender, taxonomy, organization name
- City/state metadata
- Relationship → Reviews
- NPI-2 entities
- Name, city, state, phone
- Inferred specialties from linked doctors
- Taxonomy codes + descriptions
- Populated automatically during imports
- Rating + comment + name
- Linked to doctors only
All entities originate from NPI Registry API via custom Artisan import commands.
All commands are located in app/Console/Commands.
They call https://npiregistry.cms.hhs.gov/api/ with pagination and validation.
- NPI API requires minimum 2 filters (state + taxonomy OR state + city).
- Page limit: 200
- Skip-based pagination handled automatically
- 1s sleep between pages
- All imports use idempotent upserts
Signature:
php artisan import:doctors --state=CA --taxonomy="family medicine,cardiology" --city="Los Angeles" --limit=200
Purpose: Import NPI-1 providers → Doctors table. Also extracts specialties → Specialties table.
Default behavior:
If --taxonomy missing → uses a curated starter list (family medicine, cardiology, pediatrics, internal medicine, dermatology).
Filters Required:
-
--state+--taxonomyOR -
--state+--city
Signature:
php artisan import:organizations --state=CA --city="Los Angeles,San Francisco" --limit=200
Purpose: Import NPI-2 organizations → Organizations table.
Filters Required:
-
--stateAND at least one--city
Signature:
php artisan import:specialties --state=CA --taxonomy="family medicine" --city="Los Angeles" --limit=50
Purpose: Lightweight taxonomy harvesting → Specialties table.
Filters Required: Same two-filter rule.
- Progress bars show import status
- Errors logged with HTTP status
- Upserts prevent duplicates
- Pagination auto-increments skip until exhausted
- Full-screen mobile search
- Autocomplete specialty picker
- Featured doctors & organizations
- Popular specialties
- Testimonials, articles, offers, mobile-app section
- Partner logos
- Unified search for doctors, orgs, specialties
- AJAX-driven (
ajax-filter-form) - Updates
#search-resultscontainer - Shareable URL (querystring preserved)
-
Full directory with filters:
-
q, state, city, specialty, gender
-
-
AJAX rendering: HTML partials + pagination info
-
JSON mode available
-
Mobile-optimized layouts
-
Pagination: 20 per page
- Full provider profile
- Taxonomy, location, gender, NPI
- Booking & question modals (UI demo)
- Review submission (AJAX)
- Related doctors (same city + specialty)
- Directory with filters: q, state, city, specialty
- AJAX list updates + city refresh
- Organization cards show phone, city/state, specialties
- Organization profile
- Location/contact
- Inferred specialties
- Clinic gallery
- “Doctors at this organization”
- Mobile bottom action bar
- Paginated grid (36 per page)
- Direct links into
/doctors?specialty=... - Responsive layout
- Ownership & project story
- Architecture summary
- Transparency around data ingestion
- Styled, structured legal pages
- “Last updated” timestamps
- Covers data use, rights, cookies, disclaimers
GET /api/search/doctors
Lightweight autocomplete for providers.
GET /api/search/autocomplete
Unified autocomplete (doctors + orgs + specialties).
GET /search (JSON)
GET /doctors (JSON)
GET /organizations (JSON)
Return:
- rendered HTML partial
- updated city options
- pagination info
- canonical URL
POST /doctors/{doctor}/reviews
Creates a review via AJAX and returns updated HTML.
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
Uses bundled SQLite by default.
npm install
npm run dev
npm run build
composer setup
PrimeDoctors is built and maintained solely by Inna Tarasyan (Armenia). All code, content, and data handling are personally managed.
Email: innatarasyancryptotrading@gmail.com
`#PrimeDoctors #Laravel #Livewire #TailwindCSS #AlpineJS #Vite #NPIRegistry #HealthcareData #DoctorDirectory #ClinicSearch #Specialties #ArtisanCommands