An open API service indexing awesome lists of open source software.

https://github.com/sasmithak/rest-countries

Explore countries worldwide with a React app using the REST Countries API
https://github.com/sasmithak/rest-countries

reactjs redux-persist rest-api restcountries-api webapplication

Last synced: 4 months ago
JSON representation

Explore countries worldwide with a React app using the REST Countries API

Awesome Lists containing this project

README

          

# Curiosity Voyage 🌏 - Explore Countries

Take a tour around the world. This React application lets you browse, search, filter, and view details such as country flag, population, languages used, currencies, capital, bordering countries and many more via the [REST Countries API](https://restcountries.com/).

---

## 🌐 Demo

> _Live demo:_ https://www.curiosityvoyage.me

---

## πŸ“‘ Features

- **Browse** all countries with flags, names, regions, populations, capitals, languages and bordering countries
- **Search** countries by name
- **Filter** by region and by language
- **Detailed view** for each country's official name, currencies, subregion and timezone
- **Bookmark and View the most recently visited countries** within a user state
- **Responsive** UI for mobile and desktop
---

## πŸ“š Tech Stack

- **Front‐end**: React, React Router, React Hooks
- **Styling**: Bootstrap 5 + custom CSS
- **API client**: Fetch wrapper in `src/api/restCountries.js`
- **State management**: Redux
- **Bundler**: Create React App
- **Testing**: Jest & React Testing Library

---

## πŸ‘¨β€πŸ’» Getting Started

### Prerequisites

- **Node.js** v14+
- **npm** v6+ or **yarn**

### Installation

```bash
# Clone the repository
git clone https://github.com/sasmithaK/REST-countries.git
cd REST-countries/frontend

# Install dependencies
npm install
# or
yarn install
```

### Script Description
```bash
npm run dev # Launch development server
npm run build # Build for production
npm run preview # Preview production build locally
```

## πŸ“ Project Structure
```bash
frontend/
β”œβ”€β”€ backend/ #user state management
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ api/ # API client
β”‚ β”œβ”€β”€ assests/ # Media files
β”‚ β”œβ”€β”€ components/ # UI components
β”‚ β”œβ”€β”€ hooks/ # Custom React hooks
β”‚ β”œβ”€β”€ styles/ # CSS styles
β”‚ β”œβ”€β”€ pages/ # Web pages
β”‚ β”œβ”€β”€ store/ # Redux state management
β”‚ β”œβ”€β”€ tests/ # Unit & integration tests
β”‚ β”œβ”€β”€ App.jsx # App entry component
β”‚ └── main.jsx # Main entry file
β”œβ”€β”€ index.html
└── package.json
```