A modern, AI-powered web application to find NHS healthcare facilities near you. Find pharmacies, GP surgeries, walk-in centres, hospitals, and more with intelligent search and real-time information.
- π Smart Search - AI-powered natural language search with autocomplete
- π Location-Based - Find facilities nearest to you with accurate distance
- πΊοΈ Interactive Map - View facilities on a map with clustering (Google Maps integration)
- π― Quick Actions - One-tap search for pharmacies, GPs, walk-in centres, urgent care
- β Favorites - Save preferred facilities for quick access
- π§ Advanced Filters - Filter by facility type, services, opening hours, accessibility
- π± Fully Responsive - Optimized for desktop, tablet, and mobile
- β‘ Fast & Smooth - Instant search with elegant animations
- βΏ Accessible - WCAG compliant with keyboard navigation
- π Modern Design - Clean, professional NHS-branded interface
- π Offline-Ready - Works with mock data when backend is unavailable
- Node.js 18+ and npm 9+
- (Optional) Python 3.11+ for backend
The app works completely standalone with mock data:
# Navigate to frontend
cd frontend
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
For production data from NHS APIs:
# Terminal 1: Start backend
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload
# Terminal 2: Start frontend
cd frontend
npm install
npm run dev| Technology | Purpose |
|---|---|
| React 18 | UI library |
| TypeScript | Type safety |
| Vite | Build tool |
| Tailwind CSS | Styling |
| Framer Motion | Animations |
| Zustand | State management |
| React Router | Routing |
| Lucide React | Icons |
| Technology | Purpose |
|---|---|
| Python 3.11 | Runtime |
| FastAPI | API framework |
| PostgreSQL + PostGIS | Database |
| Redis | Caching |
| Sentence Transformers | AI embeddings |
nhs-locator/
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom hooks
β β βββ services/ # API & mock data
β β βββ store/ # State management
β β βββ styles/ # Global styles
β β βββ types/ # TypeScript types
β βββ BUILD.md # Detailed build docs
β βββ package.json
β βββ vite.config.ts
βββ backend/ # FastAPI backend
β βββ app/
β β βββ ai/ # AI/ML components
β β βββ models/ # Data models
β β βββ routers/ # API routes
β β βββ services/ # Business logic
β β βββ main.py
β βββ requirements.txt
βββ README.md
# Optional - app works without these
VITE_API_BASE_URL=http://localhost:8000/api
VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_keyNHS_API_KEY=your_nhs_api_key
GOOGLE_PLACES_API_KEY=your_google_api_key
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/nhs_locator
REDIS_URL=redis://localhost:6379cd frontend
npm run build
npm run preview # Preview production buildThe production build is output to frontend/dist/.
The frontend can be deployed to:
- Vercel:
vercel --prod - Netlify:
netlify deploy --prod --dir=dist - Docker: See
frontend/Dockerfile - Any static host: Upload
dist/folder
- Primary:
#005EB8(NHS Blue) - Dark:
#003087 - Bright:
#0072CE - Light:
#41B6E6 - Green:
#007F3B - Orange:
#ED8B00
- Font: DM Sans (Google Fonts)
- Sizes: 12px - 48px scale
- Cards with subtle shadows
- Rounded corners (8-24px)
- Smooth animations (200-300ms)
- Touch-friendly targets (44px min)
When backend is running:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
| Endpoint | Method | Description |
|---|---|---|
/api/search |
POST | AI-powered facility search |
/api/search/autocomplete |
GET | Search suggestions |
/api/search/quick/{type} |
GET | Quick search by type |
/api/facilities/nearby |
GET | Nearby facilities |
/api/facilities/{id} |
GET | Facility details |
Modern, catchy landing page with feature highlights and clear call-to-action.
Clean search bar with autocomplete and quick action buttons.
List and map view toggle with sorting and filtering options.
Comprehensive facility information with directions and contact options.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- NHS Digital for healthcare facility APIs
- Google for Maps and Places APIs
- The open-source community for amazing tools
Built with β€οΈ for the NHS
For detailed frontend build instructions, see frontend/BUILD.md