Giter Site home page Giter Site logo

countries-search-challenge's Introduction

Countries Search Challenge

This repo contains all the code and project progress for a Full-Stack JS Developer Challenge that searchs any country by it's name or ISO 3166-1 2/3 letters country code, displaying the Flag, Languages, Currency, Region, Name and Population of any country!

Live Demo

Visit the live demo of the app in:

Installation

Clone the repo in any folder you want.

git clone https://github.com/DanielBGomez/countries-search-challenge.git
cd countries-search-challenge

Make sure you have installed nodejs and npm in your computer, then install all the dependencies in the project folder

npm i

Compile the front-end assets

npm run build

Start the server

npm run start

Open the project in your browser (https://localhost:3000 by default).

IMPORTANT NOTE: The project requires to be executed in a https server for the front-end scripts to be loaded. That's why the project has a SSL Cert and Key for the domain of the live demo.

This will show you a view in your browser that the webpage is not secure. Just ignore it and continue or use your own SSL Cert and Key.

Full execution

git clone https://github.com/DanielBGomez/countries-search-challenge.git
cd countries-search-challenge
npm i
npm run build
npm run start

countries-search-challenge's People

Contributors

danielbgomez avatar

Watchers

 avatar

countries-search-challenge's Issues

Single Page Application

In this project, I'll be using React as the front-end framework with Styled components.

The front-end sources will be compiled with babel.

Loading states

The loading states provides a better user experience by letting know to the user that something is happening.

UI/UX Design

The first design that appear in my mind after reading the challenge instructions was a search page with a minimal design (like google) with white and gray colors and some kind of blue as the main color. I also wanted to achieve a background with "life" that refers to "the world".

image

When the user types 3 or more letters, the search will begin, moving the components to the top and displaying the autocomplete function that list the resulted elements with some helpers (flag, alpha 3 code, name and alternative spelling for the name) that you can navigate with the cursor or the keyboard arrows (up and down) and click or tab in order to the autocomplete to fill the search input and then press enter in the keyboard or the Search button to display the elements.

image
image

If the result was from an autocomplete flow with tab or click, the displayed country will be opened directly as a modal instead

Server as middleware

Use the router in the Web server to fetch the data from the api and serve it parsed as needed.

Web server

Web server with Express that serves the front-end files.

In this part of the project, I'll be using an old Server class customized for this project.

Note: The server requires to be HTTPS to prevent SSL errors with the front-end scripts, so I'll be using a SSL Certificate from Cloudflare of a custom domain that I own.

Scroll in AutoComplete results

If the autocomplete list is too big for the viewport height, the user can't select the elements under the footer and the ones that overflows the app.

image

AWS Upload

Create a live demo in a AWS EC2 instance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.