Skip to content

Building a Full Stack Social Network Web Application with React JS using Redux, NodeJS, Socket.IO and MongoDB. Utilizing Python's NetworkX library to represent graphs and the FastAPI framework to display follower suggestion results on the frontend. The Link Prediction Model includes algorithms such as CN, Jaccard, AA, and Katz

Notifications You must be signed in to change notification settings

NHViet03/Web_Social_Network_with_Link_Prediction

Repository files navigation

Social Network Website Using Link Prediction Models for Follower Suggestions

Logo

Project Introduction

We developed a social network website inspired by Instagram. The project includes a website for users and another for administrators using a NoSQL database. The user site provides all the basic features of a social network such as posting, liking, commenting on posts, as well as following, messaging, etc. between users. The admin site allows for statistical analysis and management of content such as posts, users, user reports, and more. In addition, using graph theory and link prediction algorithms, we employ four link prediction algorithms based on node similarity: Common Neighbor, Jaccard, Adamic-Adar, and Katz Index.

  • This project is used to serve as a final term project for two courses in the Information Systems department at UIT: Web Application Development - IS207 (9.5) and Social Network - IS353.O21 ()

Team Members

ID Name Facebook Contribution %
21522791 Nguyễn Hoàng Việt Nguyễn Hoàng Việt 100
21520400 Nguyễn Hoàng Phúc Nguyễn Hoàng Phúc 100

Technologies Used

  • Frontend: React, Redux, Bootstrap
  • Backend: NodeJS, ExpressJS, FastAPI
  • Real-time: Socket.IO
  • Database: MongoDB
  • Graph Theory & Link Prediction: NetworkX

Database Schema

Schema

Main Features of the Website


Main Features for Users

  • Login / Register (API Token)
  • Create/Like/Comment/Report Posts
  • Follow/Search/View Other Users' Profiles
  • Real-time Notifications/Messaging/Calling
  • Manage Own Profile

Main Features for Admins

  • Dashboard
  • Manage Posts
  • Manage Users
  • Manage Post Reports

Demo of Some Interfaces

User Interface
  • Login

SignUp

  • Home Page

Home

  • Create Post

Create Post

  • Comment on Post

Comment Post

  • Search and Explore

Search Explore

  • Messaging

Message

  • Notifications and Profile

Notify Profile

Admin Interface
  • Dashboard

Admin Dashboard

  • Manage Posts

Admin Post

  • Manage Users

Admin User

  • User Statistics and Send Email

Admin Send Mail

  • Manage Post Reports

Admin Report

Installation Guide

Prerequisites

  • Node.js
  • npm or yarn
  • Python 3.x (for FastAPI and NetworkX)
  • MongoDB (local or cloud instance)

Frontend Setup

  1. Clone the repository and navigate to the client directory:
    git clone https://github.com/NHViet03/Web_Social_Network_with_Link_Prediction
    cd /Web_Social_Network_with_Link_Prediction/client
    
  2. Install dependencies:
    npm install
    
  3. Start the client frontend server:
    npm start
    
  4. Navigate to the admin directory and install dependencies:
    cd /Web_Social_Network_with_Link_Prediction/admin
    npm install
    
  5. Start the admin frontend server:
    npm start
    

Backend Setup

  1. Navigate to the backend directory and Install dependencies:
    cd /Web_Social_Network_with_Link_Prediction
    npm install
    
  2. Set up environment variables, create a .env file with:
    MONGODB_URL=your_mongodb_connection_string
    ACCESS_TOKEN_SECRET=your_access_key
    REFRESH_TOKEN_SECRET=your_refresh_key
    
  3. Start the backend server:
    npm start
    

FastAPI Setup (for follower suggestion)

  1. Install FastAPI, NetworkX and required libraries:
    pip install fastapi uvicorn networkx
    npm install
    
  2. Navigate to the FastAPI directory:
    cd /Web_Social_Network_with_Link_Prediction/fastAPIServer
    
  3. Start the FastAPI server::
    python -m uvicorn index:app --reload
    

Related Project

References

About

Building a Full Stack Social Network Web Application with React JS using Redux, NodeJS, Socket.IO and MongoDB. Utilizing Python's NetworkX library to represent graphs and the FastAPI framework to display follower suggestion results on the frontend. The Link Prediction Model includes algorithms such as CN, Jaccard, AA, and Katz

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published