Welcome to Coffee Finder
Coffee Finder is a production-ready SaaS web application that helps users discover nearby coffee shops using real-time geolocation and interactive map visualization. Built with Next.js 16, TypeScript, and powered by the Overpass API, it delivers a seamless coffee discovery experience.Quick start
Get up and running in under 5 minutes with our comprehensive quick start guide
API reference
Explore the Coffee Finder API endpoints and data structures
Features
Learn about the core features including geolocation, maps, and search
Deployment
Deploy Coffee Finder to production with our step-by-step guides
Key features
Coffee Finder combines modern web technologies to deliver a rich user experience:Real-time geolocation
Utilize the browser’s Geolocation API to pinpoint user location with high accuracy. The app handles permission requests, error states, and location updates seamlessly.src/app/page.tsx
Interactive map visualization
Powered by Leaflet and React Leaflet, the application renders an interactive map with custom markers, popups, and smooth animations.src/components/leaflet-map-inner.tsx
Coffee shop discovery via Overpass API
Query OpenStreetMap data through the Overpass API to find coffee shops within a customizable radius. The API endpoint handles location-based searches with optional text filtering.src/app/api/coffee-shops/route.ts
Advanced filtering and sorting
Discover coffee shops through three distinct modes:All
View all coffee shops sorted by distance from your location
Popular
Top-rated shops based on ratings and review count
Trending
Smart scoring algorithm considering open status, ratings, and proximity
src/app/page.tsx
Distance calculation
Accurate distance computation using the Haversine formula to calculate great-circle distances between coordinates.src/app/api/coffee-shops/route.ts
Rich UI with shadcn/ui
Built on top of Radix UI primitives, Coffee Finder uses shadcn/ui components for a polished, accessible interface:- Cards - Structured content display for shop details and map containers
- Badges - Visual indicators for ratings, open status, and distance
- Tabs - Seamless switching between All, Popular, and Trending modes
- Scroll Areas - Smooth scrolling through long lists of coffee shops
- Buttons - Interactive controls with loading states and variants
- Input - Search functionality with icon integration
- Skeleton - Loading placeholders for better perceived performance
All components support dark mode out of the box using next-themes
Responsive mobile-first design
The application adapts beautifully across all device sizes with Tailwind CSS utility classes:src/app/page.tsx
Technology stack
Coffee Finder is built with modern, production-ready technologies:Next.js 16
React framework with App Router, Server Components, and optimized builds
TypeScript 5
Type-safe development with full IntelliSense support
Tailwind CSS 4
Utility-first CSS framework for rapid UI development
shadcn/ui
High-quality, accessible components built on Radix UI
Leaflet
Leading open-source library for mobile-friendly interactive maps
React Leaflet
React components for Leaflet maps
Lucide React
Beautiful, consistent icon library with 1000+ icons
Zustand
Lightweight state management (if needed for future features)
Architecture
Coffee Finder follows a clean, scalable architecture:The architecture separates concerns between UI components, API routes, and business logic for maintainability
What’s next?
Quick start guide
Install and run Coffee Finder in under 5 minutes
API documentation
Explore the coffee shop search API and data models