Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

neo4j-bloom

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neo4j-bloom

Neo4j Bloom is a business productivity application for interactive exploration of graph data.

  • 2.5.1
  • npm
  • Socket score

Version published
Weekly downloads
898
decreased by-17.16%
Maintainers
1
Weekly downloads
 
Created
Source

Neo4j Insight

MasterBuildCross Version Tests
masterbuildcross version tests

Development setup

  1. Clone this repo
  2. Install yarn globally (not required but recommended): npm install -g yarn
  3. Add NPM Access Token for @neo4j-bloom libraries, see setup
  4. Install project dependencies: yarn

Development server

yarn dev and point your web browser to http://localhost:8085.

Styling

This repo uses tailwindcss, with Neo4j design system as a extension. All CSS is set in src/main.css.

src/main.css is processed by PostCss and generate the actual CSS used in the app. Whenever you use a tailwind class name or a change is made in src/main.css Vite will process it automatically (yarn vite:dev).

Tailwind CSS IntelliSense is recommended to get css name auto-hint.

To enable Tailwind CSS IntelliSense with classnames, please add the following entry to the VS Code Settings JSON

  "tailwindCSS.experimental.classRegex": [
        ["classnames\\(([^)]*)\\)", "'([^']*)'"],
        ["cn\\(([^)]*)\\)", "'([^']*)'"]
    ]

classnames and cn is the imported name,

import cn from 'classnames' 

or

import classnames from 'classnames'

Setting up Neo4j Desktop

The Bloom running locally needs to connect to Neo4j Desktop (where the Neo4j DBMS lives). To do this, start Neo4j Desktop.

Once this is set up, start a DBMS in Desktop - Desktop will expose this active DBMS to the default port bolt://localhost:7687,and Bloom will use that default port for connecting to the instance.

The login credentials on the Bloom page is the same as the login credentials of the DBMS (note - the default username is neo4j, the password can be reset for that DBMS in Desktop)

Setting up Neo4j Aura

Neo4j Aura is the Neo4j database running in the cloud. In order to test Bloom against Aura, perform the following steps:

  1. Log in into Aura and create a free database
  2. Install the cerificate neo4j-insight/openssl/bloom-fake.neo4j.io.crt in your system (on Mac, open keychain access, drag and drop the certificate, double click it and choose "Always trust")
  3. In a terminal, go to /etc/hosts file and add 127.0.0.1 bloom-fake.neo4j.io to a new line
  4. Run yarn startSSL
  5. Connect via https://bloom-fake.neo4j.io:8085?connectURL=neo4j%2Bs://{aura_dbms_id}.databases.neo4j.io:7687 where 'aura_dbms_id' can be found in the Connection URI in ur newly created Aura database (note: in Chrome, type thisisunsafe in order to bypass the ssl checks).
Testing a release against Aura

Peform the same steps as above for installing the certificate and editing the hosts file. Then Bloom can be hosted using serve with the below command: npx serve -l tcp://bloom-fake.neo4j.io --ssl-cert={path_to_bloom}/neo4j-insight/openssl/bloom-fake.neo4j.io.crt --ssl-key={path_to_bloom}/neo4j-insight/openssl/bloom-fake.neo4j.io.key assets

Setting up Neo4j Enterprise

Please have a look at this doc for setup instructions.

Testing

  • yarn test to run a single unit test run. A linter will run first.
  • yarn dev to have continous unit testing on every file change.
  • yarn run e2e {browserNames} to run end-to-end tests with TestCafe (you can specify the browsers to run in a comma-separated list or type all. More info is available in the TestCafe documentation and our testcafe README).
  • video record: by default failed test will have screenshot and video as artifacts, if you don't want to get video, simply add this behind your command: --video "" --video-options "" (for example: yarn e2e chrome testcafe/legend.test.js --video "" --video-options "") Under different OS, dependency package for video might be different, if test hanging due to wrong ffmpegPath under testcaferc.json, go to ./node_modules/@ffmpeg-installer/ find out the correct path.

Logging

The logging library loglevel is being applied under the hood, refer to the docs to see for further information or details if required.

To see all logging options, such as setting log levels, printing the logs or downloading log files, open the web browser's console and type bloom_help() and hit enter. A list of options is presented.

All available levels and loggers are printed when entering bloom_help() in the web browser's console.

Available loggers: ROOT, NEVADA, DRIVER, SSO, PERF

Available levels: trace, debug, info, warn, error, silent

There are also URL query parameters available to set the log levels of individual or all loggers.

  • The parameter LOGS_LEVEL=<level> will set the logging level to level for all loggers
  • The parameter <LOGGER>_LEVEL=<level> will set the logging level to level for the logger <LOGGER>

Examples:

http://localhost:8085?ROOT_LEVEL=warn set the logging level warn for the logger ROOT (the application logs)

http://localhost:8085?LOGS_LEVEL=debug set the logging level debug for the all loggers

http://localhost:8085?LOGS_LEVEL=error&DRIVER_LEVEL=debug&NEVADA_LEVEL=info set the logging level error for all loggers yet for the DRIVER logger the level is set to debug and for the NEVADA logger the level is set to info

You are able to download all log files via the Experimental drawer or via a command outlined in bloom_help().

URL query parameters

Meant for users:

URL query parameterExampleDescription
discoveryURL=urldiscoveryURL=https://localhost:8083/discovery.jsonSee Bloom docs
connectURL=urlconnectURL=bolt://localhost:7687See Bloom docs
search=termsearch=Tom HanksSee Bloom docs
perspective=perspectiveNameperspective=perspective 12See Bloom docs
run=booleanrun=trueSee Bloom docs
sso_redirect=idp_idsso_redirect=keycloak-oidcUse for the auto-redirect to a SSO provider login page
LOGS_LEVEL=levelLOGS_LEVEL=warnSet the logging level to level for all loggers
LOGGER_LEVEL=levelDRIVER_LEVEL=debugSet the logging level to level for the logger LOGGER

Meant only for developers and application development:

URL query parameterExampleDescription
logout_timeout=secondslogout_timeout=200Sets the logout timeout to seconds, meant only for E2E tests
grid_layout=booleangrid_layout=trueSets the visualization layout type to a grid layout, meant only for E2E tests, Default: false
ntid=uuidntid=jdsf-342-sdf-dfsdfTracking ID provided by Aura when launching Bloom from within the Aura console
auth_flow_step=argauth_flow_step=redirect_uriSSO: If the user arrives back to the client application with the URL param auth_flow_step=redirect_uri we know it's time to proceed in the SSO auth process
idp_id=idp_ididp_id=keycloak-oidcSSO: The user should arrive with a URL param named idp_id that we can map to the information in the discovery data to figure out how to proceed

Devtools

Download these two chrome extensions:

FAQs

Package last updated on 27 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc