Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 1.69 KB

File metadata and controls

67 lines (43 loc) · 1.69 KB

Geo-Port service

This service has been built following several architecture paradigms:

Architecture

C4 - components diagram

Setup

  • Go >= 1.20
  • Docker >= 24.0.5

Requirements

Install dependencies by running:

$ make deps

Install golangci-lint locally for Go linting (https://golangci-lint.run/)

To install

# binary will be $(go env GOPATH)/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2

golangci-lint --version

Run unit tests

$ make test

Start the application

  1. Build Docker image
$ make docker-build
  1. Run the container
docker run -v ./data:/data geo-port aup -f /data/ports.json

What is missing ? Unordered response

  • Feature test to verify e2e workflow, inserting ports data through CLI and verify data is correctly stored.

  • Integration test at the component level to test infrastructure store adapter and database together to verify that port store methods store data correctly.

  • Unit tests:

    • service layer tests should cover unhappy paths
  • Proper logging system in a shared infrastructure.

  • Engineering / Product effort to figure if service could be used by concurrent users and what would be the impact on service (especially at application level workflow).