{"id":15993956,"url":"https://github.com/jexp/neo4j-web-extension","last_synced_at":"2025-03-27T08:30:47.853Z","repository":{"id":30963143,"uuid":"34521296","full_name":"jexp/neo4j-web-extension","owner":"jexp","description":"Demo for how to build self contained demo-web-ui's for Neo4j Server","archived":false,"fork":false,"pushed_at":"2015-10-21T15:41:54.000Z","size":418,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T11:11:31.278Z","etag":null,"topics":[],"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/jexp.png","metadata":{"files":{"readme":"readme.adoc","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":"2015-04-24T13:50:06.000Z","updated_at":"2020-03-23T03:00:42.000Z","dependencies_parsed_at":"2022-09-08T16:23:28.136Z","dependency_job_id":null,"html_url":"https://github.com/jexp/neo4j-web-extension","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/jexp%2Fneo4j-web-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fneo4j-web-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fneo4j-web-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fneo4j-web-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jexp","download_url":"https://codeload.github.com/jexp/neo4j-web-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245809641,"owners_count":20676025,"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":[],"created_at":"2024-10-08T07:03:50.206Z","updated_at":"2025-03-27T08:30:47.427Z","avatar_url":"https://github.com/jexp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Neo4j Server Extension for minimalistic Web-UI\n\nThis is an Demo for an Extension for http://neo4j.com/download[Neo4j Server] that not only provides and endpoint that provides graph data\nbut also exposes html, css, js and image files from a `resources/webapp` directory, contained in the jar.\n\nThis can be used for small, self-containted demos, visualizations or proof of concept style applications, but not for real applications that should use Neo4j Server as a database backend server.\n\n=== The Demo: Popoto.js\n\nAs my demo I provide a setup that exposes http://popotojs.com[popoto.js] automatcially on top of the data you have in your graph.\n\nThe `StaticWebResource` provides the web-files of the visualization from the `resources/webapp` directory.\nAnd `PopotoResource` adds a second endpoint to provide a `config/config.js` which uses label, property and index information to provide the necessary config for popoto's visualization.\n\n*Note that you have to disable auth for this demo as I haven't added means for it to retrieve a username/password.*\n\nYou can use the demo by cloning and building (`mvn clean install`) this repository.\nAnd then copy the resulting jar in the server's plugin directory.\nAnd edit `neo4j-server.properties` to register the package name with an endpoint.\n\n[source]\n----\ncp target/neo4j-web-extension-2.2-SNAPSHOT.jar ~/Downloads/neo4j-enterprise-2.2.1/plugins/\necho 'org.neo4j.server.thirdparty_jaxrs_classes=extension.web=/popoto' \u003e\u003e  ~/Downloads/neo4j-enterprise-2.2.1/conf/neo4j-server.properties\n~/Downloads/neo4j-enterprise-2.2.1/bin/neo4j restart\nopen http://localhost:7474/popoto\n----\n\n.This shows the demo on top of the example Northwind dataset\nimage::popoto_in_neo_demo.jpg[]\n\nYou can also download https://dl.dropboxusercontent.com/u/14493611/neo4j-web-extension-2.2-SNAPSHOT.jar[the JAR from here].\n\n=== How does it work?\n\nIt is actually quite simple.\nThis is the core idea of exposing static web resources under the mountpoint.\n\n[source,java]\n----\n@GET\n@Path(\"{file:(?i).+\\\\.(png|jpg|jpeg|svg|gif|html?|js|css|txt)}\")\npublic Response file(@PathParam(\"file\") String file) throws IOException {\n    InputStream fileStream = findFileStream(file);\n    if (fileStream == null) return Response.status(Response.Status.NOT_FOUND).build();\n    else return Response.ok(fileStream, mediaType(file)).build();\n}\n\nprivate InputStream findFileStream(String file) throws IOException {\n    URL fileUrl = findFileUrl(file);\n    System.out.println(\"Find file \" + file + \" url \" + fileUrl);\n    if (fileUrl==null) return null;\n    return fileUrl.openStream();\n}\n----\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fneo4j-web-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjexp%2Fneo4j-web-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fneo4j-web-extension/lists"}