Skip to content

Geo-port service adds or updates ports in in-memory hashmap. Service can consume large json files through CLI and add or update port consequently. DDD, Hexagonal, and CQRS architecture.

Notifications You must be signed in to change notification settings

TestardR/geo-port

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

Geo-port service adds or updates ports in in-memory hashmap. Service can consume large json files through CLI and add or update port consequently. DDD, Hexagonal, and CQRS architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published