- React 18.3.1 - Modern component-based UI
- Tailwind CSS 3.4.18 - Utility-first styling
- Framer Motion 11.15.0 - Smooth animations
- React Router 6.28.0 - Client-side routing
- Axios 1.7.9 - HTTP client
- Component-Based Architecture
- Context API for State Management
- AuthContext (user sessions)
- NotificationContext (real-time updates)
- Protected Routes (authentication guards)
- Service Layer (centralized API calls)
- Glass Morphism Theme
- Backdrop blur effects
- Purple/pink gradient accents
- Custom Tailwind theme
- Responsive Design
- Mobile-first approach
- Breakpoint-based layouts
- Two Approaches:
- Browser/Device Geolocation API (GPS)
- Nominatim OpenStreetMap API (Geocoding)
- Three Location Features:
- Manual city input with autocomplete
- GPS-based precise location
- Distance-based filtering
- Web:
navigator.geolocation.getCurrentPosition() - Mobile:
expo-locationwith native permissions - Features:
- High accuracy GPS coordinates
- Automatic reverse geocoding
- Privacy controls
- GeolocationService.java
geocodeCity()- City name → CoordinatesgetCitySuggestions()- AutocompletecalculateDistance()- Haversine formula
- Smart Matching Algorithm
- Multiple query formats
- Scoring system for best results
- US location prioritization
- Profile Page:
- Location input with autocomplete
- "Use My Location" button
- Privacy toggle
- Discover Page:
- Location filter
- Distance display
- Max distance slider (5-200 km)
User clicks "Use My Location"
→ Browser requests GPS permission
→ Get coordinates (lat, lon)
→ Reverse geocode via Nominatim
→ Extract city and state
→ Save to backend
→ Update UI
- Distance Calculation: Haversine formula (accurate to ~0.5%)
- Geocoding Accuracy: Multiple query attempts for best match
- Autocomplete: 300ms debounce, 8 suggestions max
- Privacy: User-controlled location visibility
| Frontend | Backend Integration | External APIs |
|---|---|---|
| React 18 | Spring Boot REST | Nominatim OSM |
| Tailwind CSS | PostgreSQL | Browser Geolocation |
| Framer Motion | JPA/Hibernate | |
| Axios |
-
"Let me show you the modern glass morphism design..."
- Navigate to Profile page
- Point out backdrop blur, gradients
-
"Here's how geolocation works..."
- Click "Use My Location" button
- Show permission prompt
- Show coordinates being saved
-
"The autocomplete feature..."
- Type in location field
- Show suggestions dropdown
- Select a city
-
"Location-based matching..."
- Go to Discover page
- Enable location filter
- Show distance calculations