{"id":42175135,"url":"https://github.com/esign-consulting/logistics","last_synced_at":"2026-01-26T21:46:49.556Z","repository":{"id":6992669,"uuid":"43232872","full_name":"esign-consulting/logistics","owner":"esign-consulting","description":"Demo application to create maps with routes in order to find out the best way to deliver products.","archived":false,"fork":false,"pushed_at":"2025-10-23T18:20:20.000Z","size":1057,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T19:35:03.262Z","etag":null,"topics":["angularjs","aws","bootstrap","docker","dockerfile","javaee","jenkinsfile","mongodb","rest-api","sonarqube","swagger","togglz","vagrantfile"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esign-consulting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-09-27T03:30:39.000Z","updated_at":"2025-10-23T18:20:24.000Z","dependencies_parsed_at":"2023-10-17T03:03:00.740Z","dependency_job_id":"4c9c6d84-260c-4bb2-9990-6c07bb3f545d","html_url":"https://github.com/esign-consulting/logistics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esign-consulting/logistics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esign-consulting%2Flogistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esign-consulting%2Flogistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esign-consulting%2Flogistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esign-consulting%2Flogistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esign-consulting","download_url":"https://codeload.github.com/esign-consulting/logistics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esign-consulting%2Flogistics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28788998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:13:08.818Z","status":"ssl_error","status_checked_at":"2026-01-26T21:13:08.448Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angularjs","aws","bootstrap","docker","dockerfile","javaee","jenkinsfile","mongodb","rest-api","sonarqube","swagger","togglz","vagrantfile"],"created_at":"2026-01-26T21:46:48.647Z","updated_at":"2026-01-26T21:46:49.544Z","avatar_url":"https://github.com/esign-consulting.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logistics\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=esign-consulting_logistics\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=esign-consulting_logistics)\n[![Known Vulnerabilities](https://snyk.io/test/github/esign-consulting/logistics/badge.svg)](https://snyk.io/test/github/esign-consulting/logistics)\n[![Docker Build status](https://img.shields.io/docker/image-size/esignbr/logistics)](https://hub.docker.com/r/esignbr/logistics/builds)\n[![Docker Pulls](https://img.shields.io/docker/pulls/esignbr/logistics.svg)](https://hub.docker.com/r/esignbr/logistics)\n[![Demo Application](https://img.shields.io/website-up-down-green-red/http/www.esign.com.br/logistics.svg?label=demo)](http://www.esign.com.br/logistics)\n\nThe goal of the Logistcs application is find out the best route between two places within a map. Once created, add routes to the map, as following:\n\nOrigin | Destination | Distance (Km)\n------ | ----------- | -------------\nA | B | 10\nB | D | 15\nA | C | 20\nC | D | 30\nB | E | 50\nD | E | 30\n\nThe best route is the cheapest one, considering the truck autonomy (Km/l) and the fuel price (l). Based on the routes above, if the truck has to go from **place A** to **place D**, its autonomy is **10 Km/l** and the litre of the fuel cost **$2.50**, the best route will be **A -\u003e B -\u003e D**, because it's the cheapest one: **$6.25**.\n\n## Quality Assurance\n\nThe Logistics application has quality in its core. Beyond unit tests, the following projects were developed in order to validate the whole solution:\n\nProject | Test type | Build status\n------- | --------- | ------------\n[logistics-test-arquillian](https://github.com/esign-consulting/logistics-test-arquillian) | Integration test | [![Build status](https://github.com/esign-consulting/logistics-test-arquillian/workflows/Java%20CI/badge.svg)](https://github.com/esign-consulting/logistics-test-arquillian/actions?query=workflow%3A%22Java+CI%22)\n[logistics-test-restassured](https://github.com/esign-consulting/logistics-test-restassured) | API test | [![Build status](https://github.com/esign-consulting/logistics-test-restassured/workflows/Java%20CI/badge.svg)](https://github.com/esign-consulting/logistics-test-restassured/actions?query=workflow%3A%22Java+CI%22)\n[logistics-test-selenium](https://github.com/esign-consulting/logistics-test-selenium) | UI test | [![Build status](https://travis-ci.org/esign-consulting/logistics-test-selenium.svg?branch=master)](https://travis-ci.org/esign-consulting/logistics-test-selenium)\n[logistics-test-jmeter](https://github.com/esign-consulting/logistics-test-jmeter) | Load test | [![Build status](https://github.com/esign-consulting/logistics-test-jmeter/workflows/Java%20CI/badge.svg)](https://github.com/esign-consulting/logistics-test-jmeter/actions?query=workflow%3A%22Java+CI%22)\n\n![Logistics' tests](https://raw.githubusercontent.com/esign-consulting/logistics/master/logistics-tests.png)\n\n### Static code analysis\n\nThe application code quality is evaluated with [SonarQube](https://www.sonarqube.org). If you want to run the [SonarScanner for Maven](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven) in order to take a look at the [static code analisys](https://en.wikipedia.org/wiki/Static_program_analysis)' results, firstly execute (requires [Docker](https://www.docker.com)):\n\n`docker run --name sonarqube -p 9000:9000 -d sonarqube:8.4.1-community`\n\nAnd then, execute (requires [JDK 11](https://openjdk.java.net/projects/jdk/11) and [Maven](https://maven.apache.org)):\n\n`mvn clean install sonar:sonar`\n\nAfter running the analysis, the Logistics application dashboard will be available in \u003chttp://localhost:9000/dashboard?id=br.com.esign%3Alogistics\u003e.\n\n## The CI/CD Pipeline\n\nEach push to this repository triggers the pipeline below:\n\n1. Travis CI clones this GitHub repository;\n2. After compiling and performing several unit tests in the application source code, Maven triggers the SonarQube static code analisys, and the results are sent to [SonarCloud](https://sonarcloud.io);\n3. Once generated the Java artifacts, they are deployed to [Sonatype OSSRH](https://oss.sonatype.org), a Nexus Repository Manager instance Sonatype uses to provide repository hosting service to open source projects binaries;\n4. The application EAR file is deployed in a Wildfly instance avaliable at [esign.com.br](http://www.esign.com.br). From there, the Logistics application connects to a MongoDB instance hosted by [MongoDB Atlas](https://www.mongodb.com/cloud/atlas);\n5. Several tests are triggered asynchronously. Each one is performed against the Wildfly instance where the latest version of application was deployed.\n\n![Logistics' pipeline](https://raw.githubusercontent.com/esign-consulting/logistics/master/logistics-pipeline.png)\n\n## Running with Docker\n\nYou can run the application as a [Docker](https://www.docker.com) container. Install [Docker](https://docs.docker.com/install) and then run:\n\n`docker run --name logistics -p 8080:8080 -e MONGODB_URI=mongodb://username:password@host:port/logistics -d esignbr/logistics`\n\nThe environment variable **MONGODB_URI** is mandatory and must set the [MongoDB connection URI](https://docs.mongodb.com/manual/reference/connection-string). Remember to replace *username* and *password* with your MongoDB credentials as well as *host* and *port* with the appropriate values, according with where your MongoDB instance is avaliable on.\n\nThe Logistics application can also be executed along with MongoDB by using [Docker Compose](https://docs.docker.com/compose). If you've already installed [Docker](https://docs.docker.com/install) and [Docker Compose](https://docs.docker.com/compose/install), clone the repository and then run:\n\n`docker-compose up -d`\n\nThe application will be available through the URL \u003chttp://localhost:8080/logistics\u003e in your browser.\n\n## Deploying to a local VM\n\nAlternatively, you can deploy both the application and the database to a local VM, by using the [Ansible playbook](playbook.yml). If you want to know how it works, first install [Ansible](https://www.ansible.com), [VirtualBox](https://www.virtualbox.org) and [Vagrant](https://www.vagrantup.com), and then run:\n\n`vagrant up`\n\nVagrant will download the [codeyourinfra](https://app.vagrantup.com/codeyourinfra)/[docker](https://app.vagrantup.com/codeyourinfra/boxes/docker) [Vagrant box](https://www.vagrantup.com/docs/boxes.html) (if it was not done yet), then will bootstrap the local VM and at the end will trigger the Ansible playbook execution.\n\nOnce the local VM is up, open the URL \u003chttp://192.168.33.10:8080/logistics\u003e in your browser, and give the Logistics application a try.\n\nFinally, if you want to cleanup everything, execute the command:\n\n`vagrant destroy -f \u0026\u0026 rm -rf .vagrant/`\n\n## Deploying to AWS\n\nIn order to deploy Logistics into an [EC2 instance](https://aws.amazon.com/ec2), execute the command below with your [AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys):\n\n```bash\ndocker run --rm -v $(pwd)/ansible:/ansible \\\n    -e ANSIBLE_CONFIG=/ansible/ansible.cfg \\\n    -e AWS_ACCESS_KEY_ID=\u003caws_access_key_id\u003e \\\n    -e AWS_SECRET_ACCESS_KEY=\u003caws_secret_access_key\u003e \\\n    codeyourinfra/myansible ansible-playbook /ansible/deploy-to-aws.yml\n```\n\nAfter deploying, check the output to find out what is the EC2 instance public IP address. You can get the IP from the *inventory.yml* file as well. Then, open the Logistics' URL in your browser, replacing the IP with the one you've just got. Finally, if you want to undo everything, just run:\n\n```bash\ndocker run --rm -v $(pwd)/ansible:/ansible \\\n    -e ANSIBLE_CONFIG=/ansible/ansible.cfg \\\n    -e AWS_ACCESS_KEY_ID=\u003caws_access_key_id\u003e \\\n    -e AWS_SECRET_ACCESS_KEY=\u003caws_secret_access_key\u003e \\\n    codeyourinfra/myansible ansible-playbook /ansible/undeploy-from-aws.yml\n```\n\n## Deploying to Azure\n\nIn order to deploy Logistics into an [Azure virtual machine](https://azure.microsoft.com/en-us/services/virtual-machines), execute the command below with your [Azure service principal](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli):\n\n```bash\ndocker run --rm -v $(pwd)/ansible:/ansible \\\n    -e ANSIBLE_CONFIG=/ansible/ansible.cfg \\\n    -e AZURE_CLIENT_ID=\u003cazure_client_id\u003e \\\n    -e AZURE_SECRET=\u003cazure_secret\u003e \\\n    -e AZURE_SUBSCRIPTION_ID=\u003cazure_subscription_id\u003e \\\n    -e AZURE_TENANT=\u003cazure_tenant\u003e \\\n    codeyourinfra/myansible ansible-playbook /ansible/deploy-to-azure.yml\n```\n\nAfter deploying, check the output to find out what is the Azure VM public IP address. You can get the IP from the *inventory.yml* file as well. Then, open the Logistics' URL in your browser, replacing the IP with the one you've just got. Finally, if you want to undo everything, just run:\n\n```bash\ndocker run --rm -v $(pwd)/ansible:/ansible \\\n    -e ANSIBLE_CONFIG=/ansible/ansible.cfg \\\n    -e AZURE_CLIENT_ID=\u003cazure_client_id\u003e \\\n    -e AZURE_SECRET=\u003cazure_secret\u003e \\\n    -e AZURE_SUBSCRIPTION_ID=\u003cazure_subscription_id\u003e \\\n    -e AZURE_TENANT=\u003cazure_tenant\u003e \\\n    codeyourinfra/myansible ansible-playbook /ansible/undeploy-from-azure.yml\n```\n\n## Logistics API\n\nThe Logistics API documentation is generated through [Swagger](https://swagger.io) and can be checked by accessing the `/logistics/docs` endpoint, after deploying the application. In the [Esign Consulting website](http://www.esign.com.br), for example, the Logistics API documentation is available on \u003chttp://www.esign.com.br/logistics/docs\u003e.\n\n## Feature toggles\n\nThe Logistics application has a [feature toggles](https://www.martinfowler.com/articles/feature-toggles.html) admin console that comes with [Togglz](https://www.togglz.org). The console can be accessed through the `/logistics/togglz` endpoint, after deploying the application. In the [Esign Consulting website](http://www.esign.com.br), for example, the Logistics Feature Flags console is available on \u003chttp://www.esign.com.br/logistics/togglz\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesign-consulting%2Flogistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesign-consulting%2Flogistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesign-consulting%2Flogistics/lists"}