A modern React application for discovering travel destinations worldwide, powered by the Google Maps Platform.
Search for any place on Earth, view details (photos, reviews, ratings, opening hours), explore nearby attractions, and plan your route — all in one place.
- Place Search — Find any location using the Places API (New) text search
- Place Details — View photos, ratings, reviews, and opening hours
- Nearby Places — Discover tourist attractions near your destination
- Route Planning — Calculate driving, walking, cycling, or transit routes with the Routes API
- Interactive Map — Dynamic Google Maps with advanced markers
- React 18 with functional components and hooks
- Google Maps JavaScript API (latest):
- Places API (New) —
Place.searchByText(),fetchFields() - Routes API —
Route.computeRoutes(), polylines, waypoint markers - Advanced Markers —
AdvancedMarkerElement
- Places API (New) —
- Bootstrap 5 for layout
- Font Awesome for icons
- Node.js 16+
- A Google Maps API key with the following APIs enabled:
- Maps JavaScript API
- Places API (New)
- Routes API
git clone https://github.com/jgarrone82/React-Project-Travel.git
cd React-Project-Travel
npm install- Copy the example environment file:
cp .env.example .env- Add your Google Maps API key to
.env:
REACT_APP_GOOGLE_API_KEY=your_api_key_here
- (Recommended) In Google Cloud Console, restrict your API key:
- HTTP referrers: add your domain(s)
- API restrictions: limit to Maps JavaScript API, Places API, Routes API
npm startOpens http://localhost:3000 in your browser.
npm run buildsrc/
├── App.js # Main component — search, map, route planning
├── App.css # Design system with CSS variables
├── Place.js # Place details card
├── NearbyPlace.js # Nearby place card with "choose destination"
├── Rating.js # Star rating display
├── Horario.js # Opening hours display
├── Reviews.js # User reviews list
└── utils/
└── loadGoogleMapsApi.js # Dynamic Google Maps API loader
| Variable | Description |
|---|---|
REACT_APP_GOOGLE_API_KEY |
Your Google Maps Platform API key |
See .env.example for the template.
- API keys in client-side apps are always visible in browser DevTools. Security comes from Google Cloud Console restrictions (HTTP referrers, API quotas), not from hiding the key.
- The app uses
DEMO_MAP_IDfor map initialization. For production, create a dedicated Map ID in Google Cloud Console.
© {year} Jorge Ariel Garrone. All rights reserved.