{"id":21076346,"url":"https://github.com/rapter1990/springbootneo4jshortestpath","last_synced_at":"2025-05-16T06:32:12.997Z","repository":{"id":38973068,"uuid":"494173547","full_name":"Rapter1990/SpringBootNeo4jShortestPath","owner":"Rapter1990","description":"Spring Boot Neo4j Shortest Path","archived":false,"fork":false,"pushed_at":"2022-11-02T12:36:04.000Z","size":254,"stargazers_count":14,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T06:34:07.687Z","etag":null,"topics":["dijkstra-shortest-path","docker","docker-compose","java","neo4j","shortest-paths","spring-boot","testcontainer"],"latest_commit_sha":null,"homepage":"","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/Rapter1990.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}},"created_at":"2022-05-19T17:46:14.000Z","updated_at":"2024-04-15T13:31:08.000Z","dependencies_parsed_at":"2023-01-20T21:06:13.760Z","dependency_job_id":null,"html_url":"https://github.com/Rapter1990/SpringBootNeo4jShortestPath","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FSpringBootNeo4jShortestPath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FSpringBootNeo4jShortestPath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FSpringBootNeo4jShortestPath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FSpringBootNeo4jShortestPath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rapter1990","download_url":"https://codeload.github.com/Rapter1990/SpringBootNeo4jShortestPath/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225413229,"owners_count":17470541,"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":["dijkstra-shortest-path","docker","docker-compose","java","neo4j","shortest-paths","spring-boot","testcontainer"],"created_at":"2024-11-19T19:27:56.802Z","updated_at":"2024-11-19T19:27:57.449Z","avatar_url":"https://github.com/Rapter1990.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calculating Shortest Path through Neo4j in Spring Boot\n\n\u003cimg src=\"screenshots/springboot_neo4j.png\" alt=\"Main Information\" width=\"800\" height=\"300\"\u003e\n\n### 📖 Information\n\n\u003cul style=\"list-style-type:disc\"\u003e\n  \u003cli\u003eIts aims to calculate the shortest path in terms of total connection and duration between two nodes\u003c/li\u003e\n  \u003cli\u003eHere is the explanation of the project\n      \u003cul\u003e\n        \u003cli\u003eImplement the process of CRUD for both City and its Route\u003c/li\u003e\n        \u003cli\u003eUse Dijkstra Single-Source Shortest Path algorithm supported by Neo4j to calculate the path\u003c/li\u003e\n      \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n### 🔨 Run the App\n\n\u003cb\u003eMaven\u003e\u003c/b\u003e\n\n\u003cb\u003e1 )\u003c/b\u003e Download Neo4j Desktop 1.4.15\n\n\u003cb\u003e2 )\u003c/b\u003e Create a new Project and then create a new local dmbs with its version 4.2.1\n\n\u003cb\u003e3 )\u003c/b\u003e Click Start Button\n\n\u003cb\u003e4 )\u003c/b\u003e Download your project from this link `https://github.com/Rapter1990/SpringBootNeo4jShortestPath`\n\n\u003cb\u003e5 )\u003c/b\u003e Go to the project's home directory :  `cd SpringBootNeo4jShortestPath`\n\n\u003cb\u003e6 )\u003c/b\u003e Create a jar file though this command `mvn clean install`\n\n\u003cb\u003e7 )\u003c/b\u003e Run the project though this command `mvn spring-boot:run`\n\n\n\u003cb\u003eDocker\u003c/b\u003e\n\n\u003cb\u003e1 )\u003c/b\u003e Install \u003cb\u003eDocker Desktop\u003c/b\u003e. Here is the installation \u003cb\u003elink\u003c/b\u003e : https://docs.docker.com/docker-for-windows/install/\n\n\u003cb\u003e2 )\u003c/b\u003e Open \u003cb\u003eTerminal\u003c/b\u003e under \u003cb\u003eresources\u003c/b\u003e folder to run \u003cb\u003eNeo4j\u003c/b\u003e on \u003cb\u003eDocker\u003c/b\u003e Container\n```\n    docker-compose up -d\n```\n\u003cb\u003e3 )\u003c/b\u003e Open \u003cb\u003eNeo4j Browser\u003c/b\u003e in the brower\n```\n    http://localhost:7474/browser/\n```\n\u003cb\u003e4 )\u003c/b\u003e Rebuild image app if necessary\n```\n    docker build -t springbootneo4jshortestpath .\n```\n\n\nExplore Rest APIs\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n    \u003cth\u003eMethod\u003c/th\u003e\n    \u003cth\u003eUrl\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eValid Request Body\u003c/th\u003e\n    \u003cth\u003eValid Request Params\u003c/th\u003e\n    \u003cth\u003eValid Request Params and Body\u003c/th\u003e\n    \u003cth\u003eNo Request or Params\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003egetCityById\u003c/td\u003e\n      \u003ctd\u003eGet City By Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#getCityById\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003egetAllCities\u003c/td\u003e\n      \u003ctd\u003eGet All Cities\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#getAllCities\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003egetCityByName\u003c/td\u003e\n      \u003ctd\u003eGet City By Name\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#getCityByName\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003ecreateCity\u003c/td\u003e\n      \u003ctd\u003eCreate City\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#getCityByName\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePUT\u003c/td\u003e\n      \u003ctd\u003eupdateCity\u003c/td\u003e\n      \u003ctd\u003eUpdate City\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#updateCity\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eDELETE\u003c/td\u003e\n      \u003ctd\u003edeleteCity\u003c/td\u003e\n      \u003ctd\u003eDelete City\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#deleteCity\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003egetByRouteId\u003c/td\u003e\n      \u003ctd\u003eGet Route By Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#getByRouteId\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003egetAllRoutes\u003c/td\u003e\n      \u003ctd\u003eGet All Routes By City Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#getAllRoutes\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003ecreateRoute\u003c/td\u003e\n      \u003ctd\u003eCreate Route by City Id and Destination City Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#createRoute\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePUT\u003c/td\u003e\n      \u003ctd\u003eupdateRoute\u003c/td\u003e\n      \u003ctd\u003eUpdate Route by City Id and Destination City Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#updateRoute\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eDELETE\u003c/td\u003e\n      \u003ctd\u003edeleteRoute\u003c/td\u003e\n      \u003ctd\u003eDelete Route By City Id and Route City\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"README.md#deleteRoute\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n       \u003ctd\u003eGET\u003c/td\u003e\n       \u003ctd\u003egetShortestPath\u003c/td\u003e\n       \u003ctd\u003eGet Shortest Path by Total Connection\u003c/td\u003e\n       \u003ctd\u003e\u003ca href=\"README.md#getShortestPath\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n       \u003ctd\u003eGET\u003c/td\u003e\n       \u003ctd\u003egetShortestPathInTime\u003c/td\u003e\n       \u003ctd\u003eGet Shortest Path by Total Hours\u003c/td\u003e\n       \u003ctd\u003e\u003ca href=\"README.md#getShortestPathInTime\"\u003eInfo\u003c/a\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n### Used Dependencies\n* Spring Boot Web\n* Spring Boot Test\n* Neo4j\n* Docker\n* Mapper\n\n## Valid Request Body\n\n##### \u003ca id=\"createCity\"\u003eCreate City\n```\n    http://localhost:8077/api/v1/city\n\n    {\n        \"name\" : \"İstanbul\"\n    }\n```\n\n##### \u003ca id=\"getShortestPath\"\u003eGet Shortest Path by Total Connection\n```\n    http://localhost:8077/api/v1/shortestpath/shortest-path\n\n    {\n        \"from\" : \"İstanbul\",\n        \"destination\" : \"Ankara\"\n    }\n```\n\n##### \u003ca id=\"getShortestPathInTime\"\u003eGet Shortest Path by Total Hours\n```\n    http://localhost:8077/api/v1/shortestpath/shortest-path-in-time\n\n    {\n        \"from\" : \"İstanbul\",\n        \"destination\" : \"Ankara\"\n    }\n```\n\n\n\n## Valid Request Params\n\n##### \u003ca id=\"getCityById\"\u003eGet City By Id\n```\n    http://localhost:8077/api/v1/city/id/{cityId}\n```\n\n##### \u003ca id=\"getCityByName\"\u003eGet City By Name\n```\n    http://localhost:8077/api/v1/city/name/{cityName}\n```\n\n##### \u003ca id=\"deleteCity\"\u003eDelete City By Id\n```\n    http://localhost:8077/api/v1/city/{cityId}\n```\n\n##### \u003ca id=\"getByRouteId\"\u003eGet Route By Id\n```\n    http://localhost:8077/api/v1/route/{routeId}\n```\n\n##### \u003ca id=\"getAllRoutes\"\u003eGet All Routes By City Id\n```\n    http://localhost:8077/api/v1/route/{cityId}/routes\n```\n\n##### \u003ca id=\"deleteRoute\"\u003eDelete Route By City Id and Route City\n```\n    http://localhost:8077/api/v1/route/{cityId}/routes\n```\n\n## Valid Request Params and Body\n\n##### \u003ca id=\"updateCity\"\u003eUpdate City\n```\n    http://localhost:8077/api/v1/city/{cityId}\n\n    {\n        \"name\" : \"Ankara\"\n    }\n```\n\n##### \u003ca id=\"createRoute\"\u003eCreate Route by City Id and Destination City Id\n```\n    http://localhost:8077/api/v1/route/{cityId}/{destinationCityId}/create-route\n\n    {\n        \"from\" : \"İstanbul\",\n        \"destination\" : \"Ankara\",\n        \"departureTime\" : \"9:00\",\n        \"arriveTime\" : \"11:30\"\n    }\n```\n\n##### \u003ca id=\"updateRoute\"\u003eUpdate Route by City Id and Destination City Id\n```\n    http://localhost:8077/api/v1/route/{cityId}/update-route/{routeId}\n\n    {\n        \"from\" : \"Ankara\",\n        \"destination\" : \"Antalya\",\n        \"departureTime\" : \"9:00\",\n        \"arriveTime\" : \"11:00\"\n    }\n```\n\n## No Request or Params\n\n##### \u003ca id=\"getAllCities\"\u003eGet All Cities\n```\n    http://localhost:8077/api/v1/city/cities\n```\n\n\n### Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here to show the screenshots of project\u003c/summary\u003e\n    \u003cp\u003e Figure 1 \u003c/p\u003e\n    \u003cimg src =\"screenshots/screenshot_1.PNG\"\u003e\n    \u003cp\u003e Figure 2 \u003c/p\u003e\n    \u003cimg src =\"screenshots/screenshot_2.PNG\"\u003e\n\u003c/details\u003e    \n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fspringbootneo4jshortestpath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapter1990%2Fspringbootneo4jshortestpath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fspringbootneo4jshortestpath/lists"}