Skip to content

Wiki app with data for all countries | React ★★★ API and UI tests | Cypress

License

Notifications You must be signed in to change notification settings

andreynav/countries-wiki

Repository files navigation

GitHub repo size GitHub deployments Website

General Notes

The project is a web application with information about countries all around the world. You can select an available region of the world or search for the specific country directly. The project is made using React, React Router and Styled components. The project use REST Countries API. The project based on Frontend Mentor Challenge.

Demo

You can open and use the app by countries-wiki app link.

Project structure

The project has multilayer structure:

  • cypress - used to keep UI and API tests
  • public - used to keep static content for builds
  • api - used to keep API calls functionality
  • assets - used to keep static content
  • components - used to keep react components
  • hooks - used to keep hooks
  • styles - used to keep styles
  • types - used to keep TypeScript common types
  • utils - used to keep utils for helping

Dependencies

The project has the next dependencies in the package.json file.

GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod)

Installation

  1. Clone project to your PC by the following command:
  git clone https://github.com/andreynav/countries-wiki.git
  1. Open the root directory and enter the following command:
  yarn
  1. In the root directory create .env file and add inside it a row PORT=3002 (or any desired port).

Running project

To run project, open the root directory and enter the following command:

  yarn start

The command runs the app in the development mode. Open http://localhost:3002 to view it in your browser.

Running Cypress tests

To run tests first you need to run the project and after that open the root directory and enter the following command:

    npx cypress open 

You also can run test via command line interface:

    yarn cy-all-cli

See available running scripts in package.json script section.

License

The project is open source software provided under the Apache License 2.0.