The Countries App is a web application that allows users to explore detailed information about different countries, including weather forecasts, news headlines and view country images. It integrates various third-party APIs and Firebase authentication and database for a seamless user experience.
- Search and Filter Countries: Browse a list of countries with options to search by name and filter by region.
- Save/remove countries to/from Favourites: Save a country to a list of Favourites powered by Firestore database.
- Country Details: View detailed information about each country, including population, language, capital, currency and more.
- Weather Forecast: Get current weather data in a selected country capital and a 3-day weather forecast using the OpenWeather API.
- Latest News: Read the latest news headlines and summaries related to the country, fetched from the News API.
- Image Gallery: View pictures of the country fetched from the Unsplash API.
- Firebase Authentication: Sign up, log in, and authenticate users with Firebase.
- React: For building the user interface.
- React Bootstrap and Bootstrap: For styling and responsive layout.
- Bootstrap Icons: For modern icons.
- React Router: For website routing.
- Redux: For state management.
- Axios: For handling API requests.
- Firebase: For authentication and database.
- REST Countries API: For country data.
- OpenWeather API: For weather forecasts.
- News API: For fetching news articles.
- Unsplash API: For fetching images.
- Currency Converter API: For currency exchange rates.
- React Hot Toast: For notifications.
- React Scroll-to-Top: For a scroll-to-top component.
- Node.js (version 14 or above)
- npm or yarn (for managing packages)
- API Keys: You will need API keys for:
-
Clone the repository:
git clone https://github.com/alrammahi-mariia/countries-app.git cd countries-app
-
Install dependencies:
npm install
or, if you're using yarn:
yarn install
-
Set up the environment variables: Create a
.env
file in the root directory and add your API keys:VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_UNSPLASH_API_KEY=your_unsplash_api_key VITE_WEATHER_API_KEY=your_openweather_api_key VITE_NEWS_API_KEY=your_news_api_key
-
Set up Firebase:
- Create a Firebase project and enable authentication with email and password.
- Set up Firestore database.
-
Run the development server:
npm run dev
or, if you're using yarn:
yarn dev
-
Open the application in your browser: Navigate to
http://localhost:5173
to view the app.
Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request.
This project is licensed under the MIT License.
This project was developed as part of the React Advanced course at Business College Helsinki. Thanks to our course instructor, Martin Holland, for the guidance and support throughout the course!