Projects Human Connection

Human Connection

An Open Source Social Network for the positive change that we need in the World. Human-Connection is being built to provide better Communication Tools for everyone. We want to do more than comments and sharing!


Human Connection

NITRO Backend

Build Status MIT License FOSSA Status Discord Channel

This Prototype tries to resolve the biggest hurdle of connecting our services together. This is not possible in a sane way using our current approach.

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 by our own any more through weird table structures etc.

Advantages:

  • easer data structure
  • better connected data
  • easy to achieve "recommendations" based on actions (relations)
  • more performant and better to understand API
  • better API client that uses caching

We still need to evaluate the drawbacks and estimate the development cost of such an approach

How to get in touch

Connect with other developers over Discord

Quick Start

Forking the repository

Before you start, fork the repository using the fork button above, then clone it to your local machine using git clone https://github.com/your-username/Nitro-Backend.git

Installation with Docker

Run:

docker-compose up

# create indices etc.
docker-compose exec neo4j migrate

# if you want seed data
# open another terminal and run
docker-compose exec backend yarn run db:seed

App is running on port 4000

To wipe out your neo4j database run:

docker-compose down -v

Installation without Docker

Install dependencies:

yarn install
# -or-
npm install

Copy:

cp .env.template .env

Configure the file .env according to your needs and your local setup.

Start the GraphQL service:

yarn dev
# -or-
npm dev

And on the production machine run following:

yarn start
# -or-
npm start

This will start the GraphQL service (by default on localhost:4000) where you can issue GraphQL requests or access GraphQL Playground in the browser:

GraphQL Playground

Configure

Set your Neo4j connection string and credentials in .env. For example:

.env

NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=letmein

You need to install APOC as a plugin for the graph you create in the neo4j desktop app!

Note that grand-stack-starter does not currently bundle a distribution of Neo4j. You can download Neo4j Desktop and run locally for development, spin up a hosted Neo4j Sandbox instance, run Neo4j in one of the many cloud options, spin up Neo4j in a Docker container or on Debian-based systems install Neo4j from the Debian Repository. Just be sure to update the Neo4j connection string and credentials accordingly in .env.

Mock API Results

Alternatively you can just mock all responses from the api which let you build a frontend application without running a neo4j instance.

Just set MOCK=true inside .env or pass it on application start.

Seed and Reset the Database

Optionally you can seed the GraphQL service by executing mutations that will write sample data to the database:

yarn run db:seed
# -or-
npm run db:seed

For a reset you can use the reset script:

yarn db:reset
# -or-
npm run db:reset

Run Tests

Beware: We have no multiple database setup at the moment. We clean the database after each test, running the tests will wipe out all your data!

Run the jest tests:

yarn run test
# -or-
npm run test

Run the cucumber features:

yarn run test:cucumber
# -or-
npm run test:cucumber

When some tests fail, try yarn db:reset and after that yarn db:seed. Then run the tests again

Todo`s

  • add jwt authentication
  • get directives working correctly (@toLower, @auth, @role, etc.)
  • check if search is working
  • check if sorting is working
  • check if pagination is working
  • check if upload is working (using graphql-yoga?)
  • evaluate middleware
  • ignore Posts and Comments by blacklisted Users

License

FOSSA Status

No documents can be found for project Human Connection

Human Connection - Agile Ventures Tutorial - Wednesday, 24th Apr at 11:45am (UTC)


Latest Project videos

Video Host Published
Human Connection - Agile Ventures Tutorial - Wednesday, 24th Apr at 11:45am (UTC) Robert Schäfer 11:47 24/04
Human Connection Regular Pairing sessions - Wednesday, 24th Apr at 10:30am (UTC) Matthew Rider 10:31 24/04
Human Connection - Pairing on #296 - Tuesday, 23rd Apr at 03:47pm (UTC) Robert Schäfer 15:48 23/04
Human Connection pairing session - Monday, 22nd Apr at 10:53am (UTC) Matthew Rider 10:54 22/04
Human Connection Weekend Collaboration - Saturday, 20th Apr at 11:01am (UTC) Matthew Rider 11:45 20/04
Human Connection Friday style pairing session - Friday, 19th Apr at 10:15am (UTC) Matthew Rider 11:14 19/04
video unavailable ('Start Broadcast' not pressed, or Hangout/YouTube fail) Matthew Rider 11:03 18/04
Human Connection Regular Pairing sessions - Wednesday, 17th Apr at 10:30am (UTC) Matthew Rider 10:30 17/04
Human Connection Regular Pairing sessions - Wednesday, 17th Apr at 10:30am (UTC) Matthew Rider 18:39 16/04
Human Connection pairing session - Tuesday, 16th Apr at 03:09pm (UTC) Matthew Rider 15:10 16/04
video unavailable ('Start Broadcast' not pressed, or Hangout/YouTube fail) Matthew Rider 11:17 16/04
video unavailable ('Start Broadcast' not pressed, or Hangout/YouTube fail) Robert Schäfer 10:01 15/04
Human Connection Weekend Collaboration - Saturday, 13th Apr at 03:00pm (UTC) Matthew Rider 15:01 13/04
video unavailable ('Start Broadcast' not pressed, or Hangout/YouTube fail) Matthew Rider 10:18 12/04
Human Connection Thursday pairing session - Thursday, 11th Apr at 04:45pm (UTC) Matthew Rider 19:21 11/04
Human Connection Developer's Community Meeting - Thursday, 11th Apr at 03:00pm (UTC) Matthew Rider 15:04 11/04
Human Connection pairing session - Thursday, 11th Apr at 10:54am (UTC) Matthew Rider 10:55 11/04
Human Connection Regular Pairing sessions - Wednesday, 10th Apr at 10:30am (UTC) Matthew Rider 10:34 10/04
Human Connection Tuesday pairing session - Tuesday, 9th Apr at 10:38pm (UTC) Matthew Rider 22:39 09/04
Human Connection Monday pairing session - Monday, 15th Apr at 12:00am (UTC) Matthew Rider 14:15 08/04
Human Connection Friday style pairing session - Friday, 5th Apr at 10:15am (UTC) Matthew Rider 10:14 05/04
Human Connection Thursday pairing session - Thursday, 4th Apr at 04:45pm (UTC) Matthew Rider 17:18 04/04
Human Connection Developer's Community Meeting - Thursday, 4th Apr at 03:00pm (UTC) Matthew Rider 15:05 04/04
Open App Ecosystem Meeting - Thursday, 4th Apr at 01:00pm (UTC) Matthew Rider 13:05 04/04
Human Connection Getting Started pairing session - Wednesday, 3rd Apr at 08:45pm (UTC) Matthew Rider 20:47 03/04

No IssueTracker Stories can be found for project Human Connection