Git Product home page Git Product logo

relate's Introduction

@relate

A framework to quickly set up and manage Neo4j DBMS instances and related entities. Provides the same core features as Neo4j Desktop but through programmatic interfaces.

Some examples of things that can be done with Relate:

  • Installing Neo4j DBMSs with their required Java runtime.
  • Handle lifecycle operations (ie. start, stop, retrieving process and server status).
  • DBMS backups and upgrades.
  • Creating JWT access tokens that can be used instead of passwords.
  • Managing Neo4j Desktop projects.
  • Installing and launching graph apps or extensions.

Table of Contents

Getting Started

The Relate framework offers a few different APIs with the same functionality, you can find a getting started guide in each package's README.

@relate/common - This is the core of the framework. A Typescript library that exposes Nest.js modules, types, and testing utilities. All other Relate surfaces are wrappers of this library.

@relate/cli - Lets you do everything you can do in the common package, but from the command line. The autocompletion and optional interactive prompts make it easy to use to try out functionality.

@relate/web - Web server that exposes both GraphQL and REST endpoints. This server is available both as a standalone app and as a NestJS module.

Main Concepts

Environment

In Relate, data is organized through environments. An environment can be either local or remote. Local environments will store all data in your filesystem, while remote environments are expected to interact with an instance of @relate/web hosted somewhere else.

You can have multiple environments of either type and in the case of the local environment, you can configure each environment to be stored anywhere in your filesystem.

DBMS

Whenever we refer to a DBMS (database management system) in the framework, we refer to an instance of the Neo4j DBMS. Starting from Neo4j 4.0 each DBMS can contain multiple databases.

Project

A project in Relate is a folder with some extra metadata and with possible associations to databases or DBMSs.

Contributing

If you'd like to contribute, please read our contributing guidelines.

relate's People

Contributors

akollegger avatar dependabot[bot] avatar emmaagh avatar huboneo avatar linuslundahl avatar nglgzz avatar oskarhane avatar renovate[bot] avatar team-devtools-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

relate's Issues

[FEATURE] Offer to install correct JDK if not available

Just installed @relate/cli on a fresh OSX installation using npm. It all worked smoothly with the exception of missing Java 11. Would it be possible to add an installation step or cli command for installing any pre-requisites relate has?

Reproduce Steps

Expected Behavior

Can you propose a solution?

Your Environment

OSX 10.15.7 (catalina)

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

For enhancements or other issues, please describe in as much detail as possible how the app should be changed and how this would benefit users/developer

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/jszip Unavailable
npm npm-run-all Available

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): replace dependency npm-run-all with npm-run-all2 5.0.0
  • chore(deps): update actions/cache action to v4
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update dependency @oclif/test to v4
  • chore(deps): update dependency @types/supertest to v6
  • chore(deps): update dependency chai to v5
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-plugin-jest to v28
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency globby to v14
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency node to v20 (node, @types/node)
  • chore(deps): update dependency nodemon to v3
  • chore(deps): update dependency object-treeify to v4
  • chore(deps): update dependency oclif to v4
  • chore(deps): update dependency ora to v8
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency rimraf to v6
  • chore(deps): update dependency supertest to v7
  • chore(deps): update pnpm to v9
  • chore(deps): update pnpm/action-setup action to v4
  • chore(deps): update typescript dependencies (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser, typedoc-plugin-markdown)
  • fix(deps): update dependency @oclif/core to v4
  • fix(deps): update dependency @oclif/plugin-autocomplete to v3
  • fix(deps): update dependency @oclif/plugin-help to v6
  • fix(deps): update dependency chalk to v5
  • fix(deps): update dependency file-type to v19
  • fix(deps): update dependency got to v14
  • fix(deps): update dependency open to v10
  • fix(deps): update dependency p-limit to v6
  • fix(deps): update dependency swagger-ui-express to v5
  • fix(deps): update dependency uuid to v10 (uuid, @types/uuid)
  • fix(deps): update nestjs dependencies (major) (@nestjs/apollo, @nestjs/common, @nestjs/config, @nestjs/core, @nestjs/graphql, @nestjs/platform-express, @nestjs/testing, graphql-tools)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • changesets/action v1
.github/workflows/setup/action.yml
  • actions/setup-node v3@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
  • pnpm/action-setup v2.2.4@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
.github/workflows/tests.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
npm
package.json
  • @changesets/cli 2.26.1
  • @types/node-fetch 2.6.3
  • @typescript-eslint/eslint-plugin 5.59.11
  • @typescript-eslint/parser 5.59.11
  • eslint 8.39.0
  • eslint-config-prettier 8.8.0
  • eslint-plugin-import 2.27.5
  • eslint-plugin-jest 27.2.1
  • eslint-plugin-prettier 4.2.1
  • fs-extra 9.1.0
  • husky 8.0.3
  • jest 29.5.0
  • license-checker 25.0.1
  • lint-staged 13.2.2
  • npm-run-all 4.1.5
  • object-treeify 1.1.33
  • ora 5.4.1
  • prettier 2.8.8
  • rimraf 5.0.0
  • rxjs 7.8.1
  • tar 6.1.14
  • typescript 5.1.3
  • pnpm 8.4.0
packages/cli/package.json
  • @nestjs/common 9.4.3
  • @nestjs/config 2.3.3
  • @nestjs/core 9.4.3
  • @oclif/core 2.8.5
  • @oclif/plugin-autocomplete 2.1.9
  • @oclif/plugin-help 5.2.9
  • chalk 4.1.2
  • cross-env 7.0.3
  • enquirer 2.3.6
  • fs-extra 9.1.0
  • graphql 16.6.0
  • lodash 4.17.21
  • node-fetch 2.6.9
  • open 9.1.0
  • rxjs 7.8.1
  • semver 7.5.2
  • tslib 2.5.0
  • @oclif/test 2.3.17
  • @types/fs-extra 9.0.13
  • @types/jest 29.5.1
  • @types/lodash 4.14.194
  • @types/node 18.16.4
  • @types/node-fetch 2.6.3
  • @types/semver 7.3.13
  • chai 4.3.7
  • globby 10.0.2
  • jest 29.5.0
  • npm-run-all 4.1.5
  • oclif 3.9.0
  • ts-jest 29.1.0
  • ts-node 10.9.1
  • typescript 5.1.3
  • node >=8.0.0
packages/client/package.json
  • @types/jest 29.5.1
  • jest 29.5.0
  • npm-run-all 4.1.5
  • ts-jest 29.1.0
  • typescript 5.1.3
packages/common/package.json
  • @neo4j/code-signer 1.1.4
  • class-validator 0.14.0
  • decompress 4.2.1
  • fs-extra 9.1.0
  • got 11.8.6
  • jsonwebtoken 9.0.0
  • lodash 4.17.21
  • neo4j-driver-lite 5.8.0
  • node-forge 1.3.1
  • p-limit 3.1.0
  • rxjs 7.8.1
  • semver 7.5.2
  • tar 6.1.14
  • tree-kill 1.2.2
  • uuid 9.0.0
  • @nestjs/common 9.4.3
  • @nestjs/config 2.3.3
  • @nestjs/core 9.4.3
  • @nestjs/testing 9.4.3
  • @types/decompress 4.2.4
  • @types/fs-extra 9.0.13
  • @types/got 9.6.12
  • @types/jest 29.5.1
  • @types/jsonwebtoken 9.0.2
  • @types/jszip 3.4.1
  • @types/lodash 4.14.194
  • @types/node 18.16.4
  • @types/node-forge 1.3.2
  • @types/semver 7.3.13
  • @types/tar 6.1.4
  • @types/uuid 9.0.1
  • graphql 16.6.0
  • jest 29.5.0
  • nock 13.3.1
  • npm-run-all 4.1.5
  • ts-jest 29.1.0
  • typedoc 0.24.8
  • typedoc-plugin-markdown 3.15.3
  • typescript 5.1.3
  • @nestjs/common ^9.0.0
  • @nestjs/config ^2.1.0
  • @nestjs/core ^9.0.0
  • graphql ^16.5.0
packages/types/package.json
  • lodash 4.17.21
  • @types/jest 29.5.1
  • @types/lodash 4.14.194
  • jest 29.5.0
  • ts-jest 29.1.0
  • typedoc 0.24.8
  • typedoc-plugin-markdown 3.15.3
  • typescript 5.1.3
packages/web/package.json
  • @apollo/server 4.9.3
  • @nestjs/apollo 11.0.6
  • @nestjs/common 9.4.3
  • @nestjs/config 2.3.3
  • @nestjs/core 9.4.3
  • @nestjs/graphql 11.0.6
  • @nestjs/platform-express 9.4.3
  • chokidar 3.5.3
  • class-transformer 0.5.1
  • class-validator 0.14.0
  • cookie-parser 1.4.6
  • express 4.18.2
  • file-type 16.5.4
  • fs-extra 9.1.0
  • graphql 16.6.0
  • graphql-subscriptions 2.0.0
  • graphql-tools 8.3.20
  • graphql-type-json 0.3.2
  • graphql-ws 5.13.1
  • lodash 4.17.21
  • multer 1.4.5-lts.1
  • node-fetch 2.6.9
  • rxjs 7.8.1
  • sofa-api 0.16.3
  • swagger-ui-express 4.6.3
  • @nestjs/testing 9.4.3
  • @types/cookie-parser 1.4.3
  • @types/express 4.17.17
  • @types/fs-extra 9.0.13
  • @types/jest 29.5.1
  • @types/lodash 4.14.194
  • @types/multer 1.4.7
  • @types/node 18.16.4
  • @types/semver 7.3.13
  • @types/supertest 2.0.12
  • @types/swagger-ui-express 4.1.3
  • @types/uuid 9.0.1
  • cross-env 7.0.3
  • jest 29.5.0
  • nock 13.3.1
  • nodemon 2.0.22
  • npm-run-all 4.1.5
  • rimraf 5.0.0
  • semver 7.5.0
  • supertest 6.3.3
  • ts-jest 29.1.0
  • typescript 5.1.3
nvm
.nvmrc
  • node 18

  • Check this box to trigger a request for Renovate to run again on this repository

It would be nice if relate project:list showed the project name I used in desktop

and also file paths / locations

currently it only shows uid's

relate env:list
Name                        Type  Active Httporigin            
[f576d29b] Neo4j_Desktop    LOCAL true   http://127.0.0.1:3000 
[fdb25706] Neo4j_Desktop_v1 LOCAL false  http://127.0.0.1:3000 

$ relate project:list
Id                                   Name                                         
090de75d-0555-4d6c-8271-6f7588a56690                                              
246ee62e-dc31-4ce4-826b-f8491a14179e project-b1f0e6be-e4c0-4b01-954f-ad2cab50dafb 
7e950d73-9e05-4ebb-b5b5-06534052e2e9 project-8229a067-791a-487a-9a0d-cc4adff02583 
870096cb-026b-4ca1-a51f-d7280eca5c72 project-8d682c35-813f-4845-b106-190455f7be36 
bd9176e3-1a48-43ad-9b4c-a1b181bf001a project-2fcc4141-b994-4bbe-a3f2-a865c9922ace 
d3d75e71-7daf-4d96-add8-00d583e9a848                                             

CLI relate db:drop name-with-hyphens

Neo4j supports database names according to the rules mentioned here: https://neo4j.com/docs/operations-manual/current/manage-databases/configuration/

However, names using hyphens must be surrounded in backticks when provided in a commands like DROP DATABASE.

Could relate always surround database names with backticks, to prevent errors resulting from the use of hyphens?

Motivating example...

Using relate to drop a database with a hyphenated name results in an error:

❯ relate db:drop "graphql-api" -D neo4j-cc
Dropping database... !
 ›   Error: Unable to run a database write query.
 ›
 ›   DBMS query error:
 ›   Invalid input '-': expected
 ›     "."
 ›     "DESTROY"
 ›     "DUMP"
 ›     "IF"
 ›     "NOWAIT"
 ›     "WAIT"
 ›     <EOF> (line 1, column 22 (offset: 21))
 ›   "DROP DATABASE graphql-api"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.