This developer README details instructions for building on top of the graph-explorer application, or for configuring advanced settings, like using environment variables to switch to HTTP.
- pnpm >=10.28.1
- node >=24.13.0
Ensure you are running the correct Node version. If you are using NVM, you can simply do:
nvm useOtherwise, use whatever method you use to install Node v24.13.0.
Corepack is used to ensure the package manager used for the project is consistent.
corepack enable- Labelled Property Graph (PG) using Gremlin or openCypher
- Resource Description Framework (RDF) using SPARQL
Install any missing or updated dependencies.
pnpm installStart the development servers.
pnpm devLaunch your web browser of choice and navigate to
http://localhost:5173
At this point, Graph Explorer should be successfully running and it is asking you for connection details. This part is specific to your personal setup.
Building Graph Explorer is simple.
pnpm install
pnpm buildThis will run the build across the both the client code and the proxy server
code. You'll end up with two dist folders:
{ROOT_PATH}/packages/graph-explorer/dist/
{ROOT_PATH}/packages/graph-explorer-proxy-server/dist/
The recommended way to serve Graph Explorer is using the proxy server.
pnpm startIf you need to add, remove, or update a dependency you can easily do so from the root folder in the CLI:
# Adding a package for the react app
pnpm add react --filter graph-explorer
# Adding a dev only dependency for the server app
pnpm add -D vitest --filter graph-explorer-proxy-serverThis repository is composed by 3 packages and a mono-repository structure
itself. Then, you need to take into account 4 different package.json files:
<root>/package.jsonis intended to keep the dependencies for managing the repository. It has utilities like linter, code formatter, or git checks.<root>/packages/graph-explorer/package.jsonis the package file that describes the UI client package.<root>/packages/graph-explorer-proxy-server/package.jsonis the package file for the node server which is in charge of authentication and redirection of requests.<root>/packages/shared/package.jsonis the package file for shared code between the client and server packages.
Each of these package.json files has an independent version property.
However, in this project we should keep them correlated. Therefore, when a new
release version is being prepared, the version number should be increased in all
4 files. Regarding the version number displayed in the user interface, it is
specifically extracted from the <root>/packages/graph-explorer/package.json.
file
Base path used to serve the graph-explorer front end application.
Example: /explorer
- Optional
- Default:
/ - Type:
string
The public hostname of the server. This is used to generate the SSL certificate during the Docker build.
Example: localhost
- Required when using HTTPS connections
- Default is
localhost - Type:
string
Uses the self-signed certificate to serve Graph Explorer over https if true. Only used in Docker via the entrypoint script.
- Optional
- Default
truein Docker, not set otherwise - Type:
boolean
The port to use for the HTTPS server.
- Optional
- Default
443 - Type:
number
The port to use for the HTTP server.
- Optional
- Default
80 - Type:
number
Uses the self-signed certificate to serve the proxy-server over https if true.
- Optional
- Default
falsein code,truein Docker via the entrypoint script - Type:
boolean
- Self-signed certificates will use the hostname provided in the
docker runcommand, so unless you have specific requirements, there are no extra steps here besides providing the hostname. - If you would like to modify the certificate files, be aware that the Dockerfile will make automatic modifications on run in the entrypoint script, so you will need to remove these lines.
- If you only serve one of either the proxy server or Graph Explorer UI over an HTTPS connection and wish to download from the browser, you should navigate to the one served over HTTPS to download the certificate.
- The other certificate files can also be found at /packages/graph-explorer-proxy-server/cert-info/ on the Docker container that is created.
For browsers like Safari and Firefox, trusting the certificate from the browser is enough to bypass the “Not Secure” warning. However, Chrome treats self-signed certificates differently. If you want to use a self-signed certificate on Chrome without the “Not Secure” warning and you do not have your own certificate, or one provided by Let’s Encrypt, you can use the following instructions to add the root certificate and remove the warning. These instructions assume you’re using an EC2 instance to run the Docker container for Graph Explorer.
- After the Docker container is built and running, open a terminal prompt and SSH into your proxy server instance (e.g., EC2).
- Get the container ID by running
sudo docker ps - Copy the root certificate file (rootCA.crt) from the container to EC2:
sudo docker cp {container_id}:~/graph-explorer/packages/graph-explorer-proxy-server/cert-info/rootCA.crt ~/rootCA.crt - Exit SSH session
- Copy the root certificate file from EC2 to your local machine (where you
would run Graph Explorer on Chrome):
scp -i {path_to_pem_file} {EC2_login}:~/rootCA.crt {path_on_local_to_place_file}For example,scp -i /Users/user1/EC2.pem ec2-user@XXX.XXX.XXX.XXX:~/rootCA.crt /Users/user1/downloads - After copying the certificate from the container to your local machine’s file
system, you can delete the rootCA.crt file from the EC2 file store with
rm -rf ~/rootCA.crt - Once you have the certificate, you will need to trust it on your machine. For MacOS, you can open the Keychain Access app. Select System under System Keychains. Then go to File > Import Items... and import the certificate you downloaded in the previous step.
- Once imported, select the certificate and right-click to select "Get Info". Expand the Trust section, and change the value of "When using this certificate" to "Always Trust".
- You should now refresh the browser and see that you can proceed to open the application. For Chrome, the application will remain “Not Secure” due to the fact that this is a self-signed certificate. If you have trouble accessing Graph Explorer after completing the previous step and reloading the browser, consider running a docker restart command and refreshing the browser again.
- If you need more detailed logs, you can change the log level from
infoin the default .env file todebug. The logs will begin printing the error's stack trace. - If Graph Explorer crashes, you can recreate the container or run
pnpm start - If Graph Explorer fails to start, check that the provided endpoint is properly spelled and that you have access to from the environment you are trying to run in. If you are in a different VPC, consider VPC Peering.