Skip to content

Installation Guide

Pashalis Grivas edited this page Jan 3, 2021 · 16 revisions

Step-by-step instructions for creating and filling a Neo4j graph database with random users and posts and running NeoBook (the social network app) local on your machine or on a server!


  1. Run git clone (url of the repository) into a directory in order to download the project.
  2. Download and install Neo4j Desktop or Server
  3. Download and Load an already filled database ("NeoBook Database" instance: 200,000 Users, 800,470 Nodes & 3,082,665 Relationships) OR:
Create and fill (optional) a graph database
  1. Create a database
  2. Change the url, username and password values in 'connect_to_db.py' file to match your server credentials.
  3. Start your neo4j database. (if you already haven't)
  4. Filling Database with Dummy Data
    • Option 1 - [In 'Fill Database (200,000 Users)' directory]:
      • Install python dependencies (Install Python 3 if you haven't)
      • Run the 'insert_users.py' with: (Creates 200k users with random information)
        • python insert_users.py command
      • Run 'insert_relationships.py' with: (Creates 'follow' relations between users using 'Data/Slashdot0902.txt' relationship data.
        • python insert_relationships.py command
      • Run the 'insert_posts.py' with: (Creates posts with random content for each user)
        • python insert_posts.py command
        • give the minimum and maximum number of users' posts
    • Option 2 - [In 'Fill Database (50 Users) - Test Mode' directory]:
      • Install python dependencies (Install Python 3 if you haven't)
      • Run the 'insert_users.py' with: (Creates 50 users with random information)
        • python insert_users.py command
      • Run 'insert_relationships.py' with: (Creates 'follow' relations between the 50 users using 'Data/Slashdot0902.txt' relationship data.
        • python insert_relationships.py command
      • Run the 'insert_posts.py' with: (Creates posts with random content for each user)
        • python insert_posts.py command
        • give the minimum and maximum number of users' posts

Running NeoBook - App

  1. Copy the 'app' folder (or only the contents of the folder) to 'htdocs' directory (if you're using XAMPP) or 'var/www' directory (if you're using Apache HTTP Server on Linux)
  2. Open the website with your browser using the following address:
  3. Create a new user or sign-in as an existing one with his id as 'Username' and 'Password'

Notes
  • Python scripts at step '6.' should be executed only once.
  • In some cases additional PHP dependencies may be needed:
    • Install 'Composer Dependency Manager for PHP' (on Windows)
    • In 'app' directory (or 'htdocs' directory) run:

Clone this wiki locally