{"id":14986630,"url":"https://github.com/fforbeck/vacuum","last_synced_at":"2025-06-22T19:32:22.542Z","repository":{"id":144910314,"uuid":"59436677","full_name":"fforbeck/vacuum","owner":"fforbeck","description":"REST API which allows you to understand the dependency graph of your microservices architecture","archived":false,"fork":false,"pushed_at":"2016-06-05T03:06:26.000Z","size":101,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-11T22:52:45.056Z","etag":null,"topics":["dependency-graph","java","microservice","neo4j","rest-api","swagger-spec"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fforbeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-05-22T22:09:31.000Z","updated_at":"2023-08-28T00:05:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"227c22fa-843f-4dab-80f4-e8d11879a9e2","html_url":"https://github.com/fforbeck/vacuum","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"ce584fd67319ab785b0edf6ce90da096be48a670"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fforbeck/vacuum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fforbeck%2Fvacuum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fforbeck%2Fvacuum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fforbeck%2Fvacuum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fforbeck%2Fvacuum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fforbeck","download_url":"https://codeload.github.com/fforbeck/vacuum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fforbeck%2Fvacuum/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261351828,"owners_count":23145959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dependency-graph","java","microservice","neo4j","rest-api","swagger-spec"],"created_at":"2024-09-24T14:13:15.260Z","updated_at":"2025-06-22T19:32:17.530Z","avatar_url":"https://github.com/fforbeck.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n### About\n---\nVacuum is a REST API which allows you to understand the dependency graph of your microservices architecture.\n\nIt is based on [Swagger.io](http://swagger.io/), you can just submit the URL of your swagger documentation\nand Vacuum will parse it and create the Service-Endpoint graph as you can see in the image bellow.\n\n![Service-Endpoint-Graph](graph-microservice-dependencies.png)\n\n\nThe *green* node is the service host name, captured from Swagger document, it represents the main node and is labeled as `Service`.\n*Blue* nodes are the service paths, also captured from Swagger spec, the nodes labeled as `Endpoint` and have the propety `path`\nwhich descrives its path on that service. Basically, the graph is composed by host names and paths. \n\nThere is only one relationship between `Service` and `Endpoint` which is identified by the label `EXPOSES`. It represents all\nendpoints that are exposed for a given service swagger spec.\n\nOnce you have created the Service-Endpoint graph you can adjust your microservices to send a request\nto Vacuum API.\n\nThe request needs to inform the details about the call that your service A is sending to your service B.\nAfter that, Vacuum will create relationships between both services considering the path and http method in use.\n\nThe relatioship between the Service rely on a request event with these details:\n- origin_host: The service A host name which is firing the call to service B\n- method: The HTTP method\n- target_host: The service B host name\n- target_path: The endpoint that service A is calling from service B\n\n### Requirements:\n---\n\n- [JDK8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)\n- [Neo4j Community 3.0.1](http://neo4j.com/download/)\n\n\n### Basic Usage \n---\n\n#### Creating a Service-Endpoint graph based on a Swagger URL\n```\nPOST \u003chost\u003e:8090/v1/microservices -H 'Content-Type: application/json' -d '{\"swagger_url\": \"\u003cthe_swagger_url\u003e\"}'\n```\n\n#### Registering a call from service A to service B\n```\nPOST \u003chost\u003e:8090/v1/requests -H 'Content-Type: application/json' -d '{\"origin_host\": \"api.uber.com\", \"method\": \"POST\", \"target_host\": \"petstore.swagger.io\", \"target_path\": \"/v2/user/login\"}'\n```\n\n#### Registering another call from service A to service B\n```\nPOST \u003chost\u003e:8090/v1/requests -H 'Content-Type: application/json' -d '{\"origin_host\": \"api.uber.com\", \"method\": \"DELETE\", \"target_host\": \"petstore.swagger.io\", \"target_path\": \"/v2/pet\"}'\n```\n\n### Sample Data\n---\nUnder `scripts` folder you will find the script `fetch_db.sh`, it will provide some sample data to populate Neo4J.\nIt creates two graphs Service-Endpoint and add relatioships (`GET`,`POST`,`DELETE`,`CALL`) for `Service` nodes which represents call events between them.\n\nAfter you have executed the script you can open the Neo4J dashboard http://localhost:7474/browser/\nand execute this Cypher query to see all the entire graph: `MATCH p=()-[r:EXPOSES]-\u003e() RETURN p` \n\n### Basic Queries via Vacuum API\n---\n\n#### Get all microservice which contains term `user` in ther endpoints:\n```\nGET \u003chost\u003e:8090/v1/microservices?path_term=user -H 'Content-Type: application/json'\n```\n\n#### Get all services which rely on service id\n```\nGET \u003chost\u003e:8090/v1/microservices/b36e8649-e82e-4795-8ef6-c2d8eb3e6620/dependants -H 'Content-Type: application/json'\n```\nThe service id is generate and returned when you send a `POST /v1/microservices` with `swagger_url` as body param or you can checkout the `uuid` param on Neo4j dashboard if you have executed the `fetch_db.sh`.\n\n\n### TODO\n---\n- New queries\n- Document Vacuum API with Swagger.io\n- Authentication (API, Neo4J)\n- Unit \u0026 IT Tests\n- Improve DDD\n- Better DOCs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffforbeck%2Fvacuum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffforbeck%2Fvacuum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffforbeck%2Fvacuum/lists"}