{"id":27108597,"url":"https://github.com/samad0san/neo4j-scala","last_synced_at":"2026-05-08T07:32:58.830Z","repository":{"id":286464144,"uuid":"961480536","full_name":"samAd0san/Neo4j-Scala","owner":"samAd0san","description":"Neo4j is a native graph database designed to store and manage data as graphs using nodes, relationships, and properties. It uses the Cypher query language for efficient querying and supports ACID transactions, making it ideal for use cases like social networks, fraud detection, recommendation systems, and network analysis.","archived":false,"fork":false,"pushed_at":"2025-05-18T10:21:01.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T11:27:56.704Z","etag":null,"topics":["cytoscapejs","javascript","json","mock-data","neo4j","neovis","scala"],"latest_commit_sha":null,"homepage":"","language":"Cypher","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/samAd0san.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,"zenodo":null}},"created_at":"2025-04-06T16:00:39.000Z","updated_at":"2025-05-18T10:21:05.000Z","dependencies_parsed_at":"2025-04-06T17:20:43.941Z","dependency_job_id":"699be3a7-96a0-40d5-9b29-f416d5f06b4d","html_url":"https://github.com/samAd0san/Neo4j-Scala","commit_stats":null,"previous_names":["samad0san/neo4j-scala"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samAd0san/Neo4j-Scala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samAd0san%2FNeo4j-Scala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samAd0san%2FNeo4j-Scala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samAd0san%2FNeo4j-Scala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samAd0san%2FNeo4j-Scala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samAd0san","download_url":"https://codeload.github.com/samAd0san/Neo4j-Scala/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samAd0san%2FNeo4j-Scala/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266535695,"owners_count":23944275,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cytoscapejs","javascript","json","mock-data","neo4j","neovis","scala"],"created_at":"2025-04-06T22:21:24.804Z","updated_at":"2025-10-13T00:22:35.714Z","avatar_url":"https://github.com/samAd0san.png","language":"Cypher","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integrate Neo4j with Scala\n\n### 1. Create/Run the Neo4j Docker Image on Docker Desktop/Instance\n```bash\ndocker run \\\n    --name neo4j-4.4 \\\n    -p 7474:7474 -p 7687:7687 \\\n    -e NEO4J_AUTH=neo4j/password \\\n    -e NEO4JLABS_PLUGINS='[\"apoc\"]' \\\n    -e NEO4J_dbms_security_procedures_unrestricted=apoc.\\\\* \\\n    neo4j:4.4.23\n```\nor\n```bash\ndocker run --name=neo4j -p 7474:7474 -p 7687:7687 -e NEO4J_AUTH=neo4j/password neo4j:latest\n```\n\n### 2. Add Dependencies\nbuild.sbt\n```scala\n// Neo4j Dependencies\nlazy val commonDependencies = Seq(\n  \"org.neo4j.driver\" % \"neo4j-java-driver\" % \"4.4.10\",\n)\n```\n\n### 3. Configure\napplication.conf\n```scala\nneo4j {\n  uri = \"bolt://localhost:7687\"\n  user = \"neo4j\"\n  password = \"neo4j\" # run neo4j docker image\n  connection {\n      timeout = 5s # Connection timeout\n      encryption = false # Disable for local testing\n  }\n}\n```\n\n### 4. Test Neo4j Connection\nMain.scala\n```scala\nimport org.neo4j.driver.{AuthTokens, Driver, GraphDatabase}\n\n// Testing Neo4j Connection\n  val testNeo4jConnection = () =\u003e {\n    Try {\n      val uri = config.getString(\"neo4j.uri\")\n      val user = config.getString(\"neo4j.user\")\n      val password = config.getString(\"neo4j.password\")\n\n      val driver: Driver = GraphDatabase.driver(uri, AuthTokens.basic(user, password))\n      val session = driver.session()\n      val result = session.run(\"RETURN 'Hello, Neo4j!' AS message\")\n      val message = result.single().get(\"message\").asString()\n\n      println(s\"Neo4j connection: $message\")\n\n      session.close()\n      driver.close()\n    } match {\n      case Success(_) =\u003e println(\"Neo4j connection successful.\")\n      case Failure(exception) =\u003e\n        println(s\"Neo4j connection failed: ${exception.getMessage}\")\n    }\n  }\n\n  def main(args: Array[String]): Unit = {\n    println(\"Hello World!\")\n\n    // Neo4j Connection\n    testNeo4jConnection()\n  }\n```\n\n### 5. Download and Install Neo4j Desktop\n1. Create a new project\n2. Click on 'Add' -\u003e 'Remove Connection' (for docker container)\n3. Give any 'name' and for connect url ```bolt://localhost:7687```\n4. Give the username and password which you passed during creation/running the neo4j docker container\n5. The Database will be added then connect -\u003e open -\u003e run queries\n6. Sample cypher query ```$ MATCH (n) RETURN n``` to return all the data present, and ```$ MATCH (n) DETACH DELETE n``` to delete all the data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamad0san%2Fneo4j-scala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamad0san%2Fneo4j-scala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamad0san%2Fneo4j-scala/lists"}