Skip to content

syorito-hatsuki/Country-Service

Repository files navigation

Contributors Forks Stargazers Issues Apache 2.0 LinkedIn


Country-Service

Demo project for Nordea

Download Demo · Report Bug · Request Feature

Banner

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

This project for me was a test task at Nordea for the Junior Backend position.

Task

Implement a microservice which provides a list of countries and, in addition, provides more detailed information per country.

  1. Use spring-boot
  2. Use maven
  3. Use best practices and microservice approach
  4. Implement the following REST API with spring-boot:
GET /countries/
{
  "countries": [
    {
      "name": "Finland",
      "country_code": "FI"
    }
  ]
}
GET /countries/{name}
{
  "name": "Finland",
  "country_code": "FI",
  "capital": "Helsinki",
  "population": 5491817,
  "flag_file_url": "<url to the flag file>"
}
  1. Country service must fetch the relevant information for countries from some other service
  2. Test the implementation as well as it's needed from your perspective
  3. All the implementations must be runnable locally with our own computer. Write needed instructions to README.md file.
  4. Publish all sources code and relevant files in github or similar service and send the link to the repo so that the implementation can be reviewed.
  • You get bonus points if:
    • you use and understand reactor (https://www.baeldung.com/reactor-core)
    • you create a separate wep application which utilizes the created REST API and shows the relevant country information in a browser

(back to top)

Built With

  • Apache-Maven
  • Spring-Boot
  • React

(back to top)

Getting Started

Clone the repo

git clone https://github.com/syorito-hatsuki/Country-Service.git
Back-end

Prerequisites

Install java 17 or newer. Select the correct way for your system

OS Download Away
Windows https://adoptium.net/temurin/releases/
Ubuntu sudo apt install openjdk-17-jre
Arch Linux sudo pacman -S jre-openjdk

Installation

  1. Open folder backend

    cd ./backend
  2. Build JAR using maven

    ./mvnw jar:jar

Usage

  1. Run JAR file
    java -jar country_service-2.0.0.jar
Front-end

Prerequisites

Install NodeJS. Select the correct way for your system

OS Download Away
Windows https://nodejs.org/en/download
Ubuntu sudo apt install nodejs npm
Arch Linux sudo pacman -S nodejs npm

Installation

  1. Open folder backend

    cd ./frontend
  2. Install dependencies

    npm install

Usage

  1. Run Node app
    npm run start

(back to top)

License

Distributed under the Apache 2.0. See LICENSE.txt for more information.

(back to top)

Contact

Kit Lehto - @kit-lehto - kit.lehto.d@gmail.com

Project Link: https://github.com/syorito-hatsuki/Country-Service

(back to top)