An interactive React web application that allows users to explore countries worldwide, view detailed information, real-time weather conditions, and local news from multiple external APIs.
π Live - Global Explorer Dashboard
Global Explorer Dashboard is a modern, responsive web application built with React that provides comprehensive information about 250+ countries. Users can search, filter, and explore countries with real-time weather data, interactive maps, and local news integration.
- Country Explorer: Browse through 250+ countries with smart pagination
- Advanced Search: Search countries by name or capital city with real-time filtering
- Responsive Grid Layout: Adapts seamlessly to all screen sizes (mobile, tablet, desktop)
- Country Cards: Display flag, name, capital, region, and population
- Detailed Country View:
- Large flag display with official country name
- General information (capital, region, subregion, population, area)
- Languages and currencies with symbols
- Border countries display
- Interactive map with location markers
- Real-Time Weather: Current weather conditions for capital cities
- Temperature, weather conditions, and descriptions
- Wind speed, humidity, and "feels like" temperature
- Weather icons from OpenWeatherMap
- Latest News: Top 3 news headlines from each country
- Article images, titles, and descriptions
- Direct links to full articles
- Interactive Map: Leaflet-powered maps showing country location
- Smart Pagination: Pagination with ellipsis for better navigation
- Loading States: Smooth loading indicators for all API calls
- Error Handling: User-friendly error messages with retry options
- Back Navigation: Easy navigation between pages
- Frontend: React 18
- Build Tool: Vite 5
- Routing: React Router DOM v6
- HTTP Client: Axios
- Maps: React Leaflet + Leaflet.js
- Styling: CSS3 (Custom styling with CSS Grid & Flexbox)
- State Management: React Hooks (useState, useEffect, useMemo)
-
REST Countries API - Country information
- Endpoint:
https://restcountries.com/v3.1/region/{region} - Data: Names, flags, capitals, populations, languages, currencies, borders, coordinates
- Status: β Active
- Endpoint:
-
OpenWeatherMap API - Real-time weather data
- Endpoint:
https://api.openweathermap.org/data/2.5/weather - Data: Temperature, conditions, humidity, wind speed
- Status: β Integrated
- Endpoint:
-
NewsAPI - Latest news headlines
- Endpoint:
https://newsapi.org/v2/top-headlines - Data: Top 3 headlines with images and links
- Status: β Integrated
- Endpoint:
- Node.js (v16 or higher)
- npm or yarn
- OpenWeatherMap API key (free tier available)
- NewsAPI key (free tier: 100 requests/day)
-
Clone the repository
git clone https://github.com/mrpawarGit/Global-Explorer-Dashboard cd global-explorer-app -
Install dependencies
npm install
-
Get API Keys
- OpenWeatherMap: Sign up here
- NewsAPI: Register here
-
Create environment file
Create a
.envfile in the root directory:VITE_WEATHER_API_KEY=your_openweathermap_api_key_here VITE_NEWS_API_KEY=your_newsapi_key_here
-
Start development server
npm run dev
-
Open browser
Navigate to
http://localhost:5173
global-explorer-dashboard/
βββ public/
βββ src/
β βββ components/
β β βββ CountryCard.jsx # Country card component
β β βββ CountryCard.css
β β βββ SearchBar.jsx # Search input component
β β βββ SearchBar.css
β β βββ Pagination.jsx # Pagination controls
β β βββ Pagination.css
β β βββ WeatherCard.jsx # Weather display component
β β βββ WeatherCard.css
β β βββ NewsCard.jsx # News headlines component
β β βββ NewsCard.css
β β βββ CountryMap.jsx # Interactive map component
β β βββ CountryMap.css
β β βββ Spinner.jsx # Loading spinner
β β βββ ErrorMessage.jsx # Error display
β β βββ Navbar.jsx # Navigation bar
β βββ pages/
β β βββ Home.jsx # Main explorer page
β β βββ Home.css
β β βββ CountryDetails.jsx # Detailed country view
β β βββ CountryDetails.css
β β βββ Favorites.jsx # Favorites page (coming soon)
β βββ services/
β β βββ countriesAPI.js # Countries API service
β β βββ weatherAPI.js # Weather API service
β β βββ newsAPI.js # News API service
β βββ hooks/
β β βββ useCountries.js # Custom hook for countries
β β βββ useFavorites.js # Custom hook for favorites
β βββ App.jsx # Main app component
β βββ App.css
β βββ main.jsx # Entry point
β βββ index.css
βββ .env
βββ .gitignore
βββ package.json
βββ vite.config.js
βββ README.md
Type in the search bar to instantly filter countries by name or capital city.
Use pagination controls at the bottom to navigate through all 250+ countries.
Click on any country card to view:
- Complete country information
- Real-time weather for the capital
- Latest news headlines
- Interactive map with location
Use the back button or browser navigation to return to the home page.
npm run dev # Start development server at localhost:5173
npm run build # Build optimized production bundle
npm run preview # Preview production build locally
npm run lint # Run ESLint for code quality- Fetches data from 5 regions in parallel for optimal performance
- Graceful error handling for all API calls
- Caching strategy to minimize redundant requests
- Mobile-first approach
- CSS Grid for flexible layouts
- Adapts to all screen sizes (320px - 4K)
- React.lazy for code splitting
- useMemo for expensive computations
- Lazy loading for images
- Optimized re-renders
- NewsAPI free tier has 100 requests/day limit
- Some countries may not have news available in NewsAPI
- Weather data requires valid capital city names
- REST Countries API for comprehensive country data
- OpenWeatherMap for real-time weather information
- NewsAPI for news headlines
- Leaflet & React Leaflet for interactive maps
- Flagcdn for high-quality country flags
- React and Vite communities for excellent tools and documentation
Your Name
- GitHub: @mrpawarGit
Made using React and Vite