diff --git a/.gitbook/assets/grafik (1).png b/.gitbook/assets/grafik (1).png index 20ebd3480..cc5dade55 100644 Binary files a/.gitbook/assets/grafik (1).png and b/.gitbook/assets/grafik (1).png differ diff --git a/.gitbook/assets/grafik (2).png b/.gitbook/assets/grafik (2).png index cc5dade55..8fabb8555 100644 Binary files a/.gitbook/assets/grafik (2).png and b/.gitbook/assets/grafik (2).png differ diff --git a/.gitbook/assets/grafik (3).png b/.gitbook/assets/grafik (3).png index 8fabb8555..20ebd3480 100644 Binary files a/.gitbook/assets/grafik (3).png and b/.gitbook/assets/grafik (3).png differ diff --git a/.gitbook/assets/grafik (4).png b/.gitbook/assets/grafik (4).png index 8fabb8555..dab3eef27 100644 Binary files a/.gitbook/assets/grafik (4).png and b/.gitbook/assets/grafik (4).png differ diff --git a/.gitbook/assets/grafik.png b/.gitbook/assets/grafik.png index dab3eef27..8fabb8555 100644 Binary files a/.gitbook/assets/grafik.png and b/.gitbook/assets/grafik.png differ diff --git a/README.md b/README.md index a96e41e80..2d53745c5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ > With this Prototype we can explore using the combination of GraphQL and the Neo4j Graph Database for achieving the connected nature of a social graph with better development experience, as we do not need to connect data on our own any more through weird table structures etc. > > **Advantages:** - +> > * easier data structure > * better connected data > * easy to achieve "recommendations" based on actions \(relations\) diff --git a/backend/data-import.md b/backend/data-import.md index d08b89129..0f55b9e2d 100644 --- a/backend/data-import.md +++ b/backend/data-import.md @@ -1,34 +1,38 @@ -# Import of legacy data +# Import -This guide helps you to import data from our legacy servers, which are using FeathersJS and MongoDB. +This guide helps you to import data from our legacy servers, which are using FeathersJS and MongoDB. -### Prerequisites -You need [docker](https://www.docker.com/) installed on your machine. -Furthermore you need SSH access to the server and you need to know the following login credentials and server settings: +## Prerequisites -| Environment variable | Description | -|----------------------|----------------------------------| -| SSH_USERNAME | Your ssh username on the server | -| SSH_HOST | The IP address of the server | -| MONGODB_USERNAME | Mongo username on the server | -| MONGODB_PASSWORD | Mongo password on the server | -| MONGODB_AUTH_DB | Mongo authentication database | -| MONGODB_DATABASE | The name of the mongo database | -| UPLOADS_DIRECTORY | Path to remote uploads folder | +You need [docker](https://www.docker.com/) installed on your machine. Furthermore you need SSH access to the server and you need to know the following login credentials and server settings: -### Run the database migration +| Environment variable | Description | +| :--- | :--- | +| SSH\_USERNAME | Your ssh username on the server | +| SSH\_HOST | The IP address of the server | +| MONGODB\_USERNAME | Mongo username on the server | +| MONGODB\_PASSWORD | Mongo password on the server | +| MONGODB\_AUTH\_DB | Mongo authentication database | +| MONGODB\_DATABASE | The name of the mongo database | +| UPLOADS\_DIRECTORY | Path to remote uploads folder | + +## Run the database migration Run `docker-compose` with all environment variables specified: -```sh + +```bash SSH_USERNAME=username SSH_HOST=some.server.com MONGODB_USERNAME='hc-api' MONGODB_PASSWORD='secret' MONGODB_DATABASE=hc_api MONGODB_AUTH_DB=hc_api UPLOADS_DIRECTORY=/var/www/api/uploads docker-compose up ``` Download the remote mongo database: -```sh + +```bash docker-compose exec db-migration-worker ./import.sh ``` Import the local download into Neo4J: -```sh + +```bash docker-compose exec neo4j import/import.sh ``` + diff --git a/backend/installation/README.md b/backend/installation/README.md index bdd7383a5..040c1c22d 100644 --- a/backend/installation/README.md +++ b/backend/installation/README.md @@ -1,10 +1,10 @@ # Backend Installation +The Backend repository can be found on GitHub. [https://github.com/Human-Connection/Nitro-Backend](https://github.com/Human-Connection/Nitro-Backend) -The Backend repository can be found on GitHub. -[https://github.com/Human-Connection/Nitro-Backend](https://github.com/Human-Connection/Nitro-Backend) - -{% hint style="info" %} TODO: Create documentation section for How to Start and Beginners. {% endhint %} +{% hint style="info" %} +TODO: Create documentation section for How to Start and Beginners. +{% endhint %} Here are some general informations about our [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962). @@ -16,7 +16,7 @@ Click on the fork button. ### Clone your new Repository -Set the current working folder to the path in which the backend repository should be cloned (copied). +Set the current working folder to the path in which the backend repository should be cloned \(copied\). ```bash $ cd PATH-FOR-NITRO-BACKEND @@ -30,6 +30,7 @@ For cloning your new repository to your local machine modify the following comma $ git clone https://github.com/YOUR-GITHUB-USERNAME/Nitro-Backend.git ``` {% endtab %} + {% tab title="SSH" %} ```bash $ git clone git@github.com:YOUR-GITHUB-USERNAME/Nitro-Backend.git @@ -51,6 +52,7 @@ Add the original Human Connection repository as `upstream`. This prepares you to $ git remote add upstream https://github.com/Human-Connection/Nitro-Backend.git ``` {% endtab %} + {% tab title="SSH" %} ```bash $ git remote add upstream git@github.com:Human-Connection/Nitro-Backend.git @@ -66,29 +68,26 @@ $ cp .env.template .env Configure the file `.env` according to your needs and your local setup. - ## Installation and Usage with Docker {% hint style="info" %} -TODO: How to install Docker for Human Connection … -(Also maybe there should be a main docker installation guide for the whole system at once!?) +TODO: How to install Docker for Human Connection … \(Also maybe there should be a main docker installation guide for the whole system at once!?\) {% endhint %} For further informations see also our [Docker documentation](docker.md). - ## Local Installation Make sure that you have a recent version of [yarn](https://yarnpkg.com/en/) or [npm](https://www.npmjs.com) installed before you proceed. E.g. we have the following versions: -```sh +```bash $ yarn --version 1.12.3 $ npm --version 6.4.1 ``` -If the `yarn` or `npm` command is unknown you may use the [docker installation](#installation-and-usage-with-docker) (see above) or contact the developer team at [Discord](https://discord.gg/6ub73U3) if you have any questions: +If the `yarn` or `npm` command is unknown you may use the [docker installation](./#installation-and-usage-with-docker) \(see above\) or contact the developer team at [Discord](https://discord.gg/6ub73U3) if you have any questions: ### Install Dependencies @@ -149,3 +148,4 @@ This will start the GraphQL service \(by default on [http://localhost:4000](http {% hint style="warning" %} But before you can issue GraphQL requests or access GraphQL Playground you have to install, start and seed your Neo4j database. See next step … {% endhint %} + diff --git a/backend/installation/configuration.md b/backend/installation/configuration.md index aea5ca51b..31101382a 100644 --- a/backend/installation/configuration.md +++ b/backend/installation/configuration.md @@ -1,6 +1,5 @@ # Neo4j Installation and Configuration - ## Configure Enviroment Set your Neo4j connection string and credentials in `.env`. For example: @@ -15,29 +14,23 @@ NEO4J_PASSWORD=letmein {% endcode-tabs-item %} {% endcode-tabs %} - ## Neo4j Installation {% hint style="warning" %} You **need to install APOC** as a plugin for the graph you create in neo4j! {% endhint %} -Note that grand-stack-starter does not currently bundle a distribution of Neo4j. -Now there are a lot alternatives how to install Neo4J. +Note that grand-stack-starter does not currently bundle a distribution of Neo4j. Now there are a lot alternatives how to install Neo4J. {% tabs %} - {% tab title="Neo4j Desktop" %} - -You can [download Neo4j Desktop](https://neo4j.com/download-center/) run locally for development. -Choose tab **Neo4j Desktop**. +You can [download Neo4j Desktop](https://neo4j.com/download-center/) run locally for development. Choose tab **Neo4j Desktop**. ![Neo4j Download-Center screenshot](../../.gitbook/assets/screenshot-neo4j-download-center-current-releases.png) -After the download is done install the Neo4j Desktop application and open it. -E.g. we have the following version: +After the download is done install the Neo4j Desktop application and open it. E.g. we have the following version: -``` +```text Neo4j Desktop 1.1.13 ``` @@ -45,24 +38,18 @@ Click on the empty project **My Project** to choose it. Click in the **Add Graph** area and after two buttons appear in it click on **Create a Local Graph**. -Optionally, set the name of the new Graph for clarity to **Human Connection DB**. -Set the password to **letmein** which is our default password of our `.env.template`. You can choose another password and later change your connection settings, too. Then click on **Create** and the database will be generated. +Optionally, set the name of the new Graph for clarity to **Human Connection DB**. Set the password to **letmein** which is our default password of our `.env.template`. You can choose another password and later change your connection settings, too. Then click on **Create** and the database will be generated. -After generation of the database was successful, please click in the **Add Plugin** area. -Then click the **Install** button of the **APOC** area. -Now an additional **Install** button appears and you click on it again. If the **APOC-Plugin** is installed by now close the **Plugins** window. +After generation of the database was successful, please click in the **Add Plugin** area. Then click the **Install** button of the **APOC** area. Now an additional **Install** button appears and you click on it again. If the **APOC-Plugin** is installed by now close the **Plugins** window. In the **Human Connection DB** area is a **Manage** button. By clicking it the area switches into a manage area with a lot of information and setting possibilities. -Start the Graph database by clicking the **Play-Symbol** button. -In the **Logs** tab you'll find the status of the start up. - -If you have a look in the **Details** tab you find the connection info. The bolt port should be `7687` as we set it for our [environment configuration](#configure-environment) above. +Start the Graph database by clicking the **Play-Symbol** button. In the **Logs** tab you'll find the status of the start up. +If you have a look in the **Details** tab you find the connection info. The bolt port should be `7687` as we set it for our [environment configuration](configuration.md#configure-environment) above. {% endtab %} {% tab title="Neo4j Non-Desktop Alternatives" %} - You can spin up a [hosted Neo4j Sandbox instance](https://neo4j.com/download-center/), run Neo4j in one of the [many cloud options](https://neo4j.com/developer/guide-cloud-deployment/), [spin up Neo4j in a Docker container](https://neo4j.com/developer/docker/) or on Debian-based systems install [Neo4j from the Debian Repository](http://debian.neo4j.org/). Just be sure to update the Neo4j credentials in `.env`. **Install APOC plugin on Debian-based systems** @@ -72,22 +59,21 @@ Install `neo4j` from the Debian Repository, then [download the APOC plugin](http ```text wget https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.1/apoc-3.5.0.1-all.jar -P /var/lib/neo4j/plugins ``` - {% endtab %} - {% endtabs %} - ## Seeding Database with Data Now we have to seed our database with default data, so that GraphQL requests or playing with our GraphQL Playground returns anything else than an empty response. To fill the database with some seed data, run the following command in your terminal: + ```bash $ yarn run db:seed ``` To wipe out the database: + ```bash $ yarn run db:reset ``` @@ -95,3 +81,4 @@ $ yarn run db:reset Now your backend is ready for requests. You can click on the **Open Browser** button in Neo4j Desktop to check if the seeding was successful or open [http://localhost:7474/](http://localhost:7474/) in your browser. Click the **Data-Symbol** at the left upper corner and then click on the **Node Label** + **User** to see a graph of the user relations, as an example. + diff --git a/backend/middleware.md b/backend/middleware.md index e50943661..9b0843288 100644 --- a/backend/middleware.md +++ b/backend/middleware.md @@ -1,10 +1,8 @@ # Middleware +![](../.gitbook/assets/grafik%20%284%29.png) - -![](../.gitbook/assets/grafik.png) - -### Middleware keeps resolvers clean +## Middleware keeps resolvers clean A well-organized codebase is key for the ability to maintain and easily introduce changes into an app. Figuring out the right structure for your code remains a continuous challenge - especially as an application grows and more developers are joining a project. diff --git a/backend/todos.md b/backend/todos.md index b9d44b392..1030b9028 100644 --- a/backend/todos.md +++ b/backend/todos.md @@ -1,7 +1,3 @@ ---- -description: Want to help on the Backend / API part? ---- - # Todo's Github Issues: [https://github.com/Human-Connection/Nitro-Backend/issues](https://github.com/Human-Connection/Nitro-Backend/issues) diff --git a/documentation/edit-this-documentation.md b/documentation/edit-this-documentation.md index e74e02cdb..34fb7b88d 100644 --- a/documentation/edit-this-documentation.md +++ b/documentation/edit-this-documentation.md @@ -4,20 +4,17 @@ Go to the section and theme you want to change: On the left navigator. Click **Edit on GitHub** on the right. -On the **Issue** tab you’ll find the open issues. -Read what need to be done by clicking on the issue you like to fix. +On the **Issue** tab you’ll find the open issues. Read what need to be done by clicking on the issue you like to fix. -By going backwards in the browser **(!)**, again go to the **Code** tab. +By going backwards in the browser **\(!\)**, again go to the **Code** tab. -Click on the **edit pencil** on the right side directly above the text to edit this file on your fork of Human Connection (HC). +Click on the **edit pencil** on the right side directly above the text to edit this file on your fork of Human Connection \(HC\). You can see a preview of your changes by clicking the **Preview changes** tab aside the **Edit file** tab. If you are ready, fill in the **Propose file change** at the end of the webpage. -After that you have to send your change to the HC basis with a pull request. -Here make a comment which issue you have fixed. At least the number. - +After that you have to send your change to the HC basis with a pull request. Here make a comment which issue you have fixed. At least the number. ## Markdown your documentation @@ -28,14 +25,16 @@ To design your documentation see the syntax description at GitBook: ### Some quick Examples #### Headlines -```markdown + +```text # Main headline ## Smaller headlines ### Small headlines ``` #### Tabs -```markdown + +```text {% tabs %} {% tab title=„XXX“ %} XXX @@ -48,22 +47,28 @@ XXX ``` #### Commands - ```LANGUAGE (for text highlighting) - XXX - ``` + +```text +```LANGUAGE (for text highlighting) +XXX +``` +``` #### Links -```markdown + +```text [https://XXX](XXX) ``` #### Screenshots or other Images -```markdown + +```text ![XXX](https://XXX) ``` #### Hints for ToDos -```markdown + +```text {% hint style="info" %} TODO: XXX {% endhint %} ``` @@ -71,7 +76,9 @@ XXX ### Host on Human Connection -{% hint style="info" %} TODO: How to host on Human Connection (GitHub) ... {% endhint %} +{% hint style="info" %} +TODO: How to host on Human Connection \(GitHub\) ... +{% endhint %} ### Quick Solution @@ -87,31 +94,27 @@ Right click on it and choose kind of **Open link in new tab**. Copy the URL and paste it were you need it. - ## Screenshot modification ### Add an arrow or some other marking stuff {% tabs %} - -{% tab title=„mac OS“ %} - +{% tab %} #### In the Preview App -Got to: **Menu** + **Tools** (GER: Werkzeuge) + **Annotate** (GER: Anmerkungen) + etc. - +Got to: **Menu** + **Tools** \(GER: Werkzeuge\) + **Annotate** \(GER: Anmerkungen\) + etc. {% endtab %} -{% tab title=„Windows“ %} - -{% hint style="info" %} TODO: How to modify screenshots ... {% endhint %} - +{% tab %} +{% hint style="info" %} +TODO: How to modify screenshots ... +{% endhint %} {% endtab %} -{% tab title=„Linux“ %} - -{% hint style="info" %} TODO: How to modify screenshots ... {% endhint %} - +{% tab %} +{% hint style="info" %} +TODO: How to modify screenshots ... +{% endhint %} {% endtab %} - {% endtabs %} + diff --git a/web-frontend/installation.md b/web-frontend/installation.md index 0350057f7..2421c662a 100644 --- a/web-frontend/installation.md +++ b/web-frontend/installation.md @@ -4,7 +4,7 @@ This documentation should be split into a **local** and a **docker** installation variant. Also maybe there should be a main docker installation guide for the whole system at once!? {% endhint %} -### Clone Repository +## Clone Repository The Frontend Repository can be found on github. [https://github.com/Human-Connection/Nitro-Web](https://github.com/Human-Connection/Nitro-Web) @@ -13,29 +13,29 @@ The Frontend Repository can be found on github. git@github.com:Human-Connection/Nitro-Web.git ``` -### Install Dependencies +## Install Dependencies -{% hint style="danger" %} -Current you have to use the `--ignore-engines` parameter on install, as the izitoast wrapper package claims to not work on node >= 9 which is not true. If the Author does not responde we might fork the package or make our own component out of it. So it's a temporary issue. +{% hint style="info" %} +Make sure you are running on Node 10: `node --version` {% endhint %} {% tabs %} {% tab title="Yarn" %} ```bash -cd styleguide && yarn install --ignore-engines && cd .. -yarn install --ignore-engines +cd styleguide && yarn install && cd .. +yarn install ``` {% endtab %} {% tab title="NPM" %} ```bash -cd styleguide && npm install --ignore-engines && cd .. -npm install --ignore-engines +cd styleguide && npm install && cd .. +npm install ``` {% endtab %} {% endtabs %} -### Development +## Development To start developing you need to start the server with the dev command. This will give you "hot reload" which updates the browser content \(mostly\) without reloading the whole page. @@ -63,9 +63,7 @@ Login to the app with one the following credentials: * email: moderator@example.org * email: admin@example.org -password: 1234 (same for all profiles) +password: 1234 \(same for all profiles\) ![You should see this under http://localhost:3000](../.gitbook/assets/screenshot.png) - - diff --git a/workflow/testing/README.md b/workflow/testing/README.md index 896bda972..c2fbb7620 100644 --- a/workflow/testing/README.md +++ b/workflow/testing/README.md @@ -2,7 +2,7 @@ ## [Integration Testing](integration-testing.md) -To test all the pieces together, from the user perspective, we use integration tests. They also show if the the backend and the frontend are working as expected in conjunction and also if the browser likes our app. +To test all the pieces together, from the user perspective, we use integration tests. They also show if the the backend and the frontend are working as expected in conjunction and also if the browser likes our app. [more...](integration-testing.md) @@ -14,9 +14,7 @@ Individual Vue Components should also be documented and tested properly. This gu ## [Unit Testing](unit-testing.md) -Expecially the Backend relies on Unit Tests, as there are no Vue Components. +Expecially the Backend relies on Unit Tests, as there are no Vue Components. [more...](unit-testing.md) - - diff --git a/workflow/testing/integration-testing.md b/workflow/testing/integration-testing.md index a4d217bb2..be4fade71 100644 --- a/workflow/testing/integration-testing.md +++ b/workflow/testing/integration-testing.md @@ -16,7 +16,7 @@ To run the tests, open the directory of our Nitro Frontend in your console and r $ cypress run ``` -![Console output after running cypress test](../../.gitbook/assets/grafik%20%284%29.png) +![Console output after running cypress test](../../.gitbook/assets/grafik.png) After the test run, you will get also some video footage of the test run which you can then analyse in more detail. @@ -24,7 +24,7 @@ After the test run, you will get also some video footage of the test run which y If you are like me, you might want to see some visual output. The interactive cypress environment also helps at debugging your tests, you can even time travel between individual steps and see the exact state of the app. -![Interactive Cypress Environment](../../.gitbook/assets/grafik%20%282%29.png) +![Interactive Cypress Environment](../../.gitbook/assets/grafik%20%281%29.png) ### Write some Tests