Project Milestone 1 - airavata-courses/ABC GitHub Wiki

Welcome to the ABC wiki!

You can access the app here http://149.165.169.38:3000/login

Initial concept (Napkin diagram):

napkin diagram

Architecture:

architecture1

User Story:

  1. User will be able to create Tweets once logged in
  2. One will be able to search for other users and follow them
  3. Tweets will appear in the feed based on the users they follow.
  4. Current news trends will be displayed to user

Installation:

Requirements Installation:

These requirements are necessary for the whole set of micro-services to run

Mac:

1. MongoDB: brew install mongodb
2. Maven: brew install maven
3. Java: brew cask install java
4. MySql: brew install mysql

Debian:

1. MongoDB:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
2. Maven:
sudo apt install maven
3. Java:
sudo apt install openjdk-8-jdk
4. MySql:
sudo apt-get install mysql-server

Windows:

  1. MongoDB
  1. Maven
  1. Java
  1. MySQL server
  • Install MySQL server if you don't have it already.
  • Update config/connection.json with appropriate data (host, port, username, and password). You can find this file in the branch: develop-user-management-service
  • Start MySQL server
  • Create database with name=”node_mysql”
  1. Node.js

Tweet Management Service:

  • Uses: Java 8, Maven, MongoDB
  • Run Strategy:
    git clone --single-branch --branch develop-feed-service https://github.com/airavata-courses/ABC.git 
    cd ABC/
    
    Once mongo is up and running create DB and required collections using:
    mongo feed-db --eval 'db.createCollection("tweets"); db.createCollection("tweetLikes");'
    
    Mac:
    1. brew services start mongodb
    2. cd ABC/FeedService
    3. mvn package
    4. java -jar ABC/FeedService/target/feedservice-*.jar
    
    Debian:
    1. sudo service mongod start
    2. cd ABC/FeedService
    3. mvn package
    4. java -jar ABC/FeedService/target/feedservice-*.jar
    

Note: If you get any error for * in step 4, navigate to ABC/FeedService/target/ and use the name ending with .jar

User Management Service:

  • Uses: Nodejs, MySQL
  • Run Strategy:
    • Start Apache and MySQL services and setup database as mentioned above.
    • Then run following commands.
    git clone --single-branch --branch develop-user-management-service https://github.com/airavata-courses/ABC.git
    cd ABC/
    npm install
    npm start
    
    • You can run unit tests using npm test

    • Note: In case if you're using dedicated MySql on any OS you'll need to change the port to 3306 in config/connection.js file

News Service:

Following are the requirements for the News Service

  1. Python: 3.x
    • Installing pip
      • MacOS: brew install pip
      • Debain Linux: sudo apt-get install python-pip / sudo apt-get install python3-pip (Python3.x)
      • RHEL Linux: sudo yum install python-pip python-wheel / sudo yum install python3 python3-wheel (Python3.x)
      • Windows: pip comes pre-installed with Python 3.x
  2. Cloning Repo

Steps to run the news service:

1. pip install virtualenv
2. python -m virtualenv flask_env
3. source flask_env/bin/activate
Windows : ./flask_env/Scripts/activate
4. pip install -r requirement.txt
5. export NEWS_API_KEY="<<API_KEY>>" (Please contact us for the key)
Windows : SET NEWS_API_KEY="<<API_KEY>>"
6. python news-application.py

User interface

Once you have all of the three services up and running, kindly proceed with the UI part.

Requirements:

  1. npm/node

Steps to start the UI:

  1. git clone --single-branch --branch develop-web-ui https://github.com/airavata-courses/ABC.git
  2. cd ABC/web-ui
  3. npm install
  4. npm start

NOTE: If you are deploying services on different machines, you may have to update web-ui/src/_constants/project.constants.js with appropriate hostnames (no need to change the ports).

If you are stuck anywhere, please let us know. :)

Contacts:

Akash B. Sheth: [email protected]

Bhushan Malgaonkar: [email protected]

Chetan Patil: [email protected]

⚠️ **GitHub.com Fallback** ⚠️