Skip to content

swapUniba/CrowdPulse3.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is CrowdPulse?

CrowdPulse is software designed to analyse MongoDB databases containing AI-processed data. Therefore, It allows you to analyse data on any brand, any name, and anything you like.

Global requirements

To use this software, you'll need to install the following software and components:

Now you're ready to install and use CrowdPulse by following the documentation.

Project structure

Firstly, CrowdPulse has been completely rewritten from the ground up in TypeScript using Node.js.
In this repository you'll find two subprojects:

  • Backend: An Express implementation for managing front-end requests hosted by default on port 4000.
  • Frontend: A React implementation using Mantine as a component framework hosted by default on port 3000.

Backend

Installation and usage
From the root folder type cd backend and then npm install.
Configure your .env file by editing the following properties:

SERVER_PORT=4000
DATABASE_ACCESS="mongodb://localhost:27017/"

Running: type npm start to start it on the preferred port.


Frontend

  • Installation: from the root folder type cd frontend and then npm install.
  • Running: type npm start to start it.
    The software is now reachable on http://localhost:3000/
  • Building: type npm build and you'll find a new folder called build
    If you want to use the built-in application, you will need a web server such as nginx.

Forever Run

npm forever is an option to run the software continuously without using a screen or anything else.

cd frontend
sudo npm install forever -g
forever start -c "npm start" ./

cd backend
sudo npm install forever -g
forever start -c "npm start" ./

Databases

CrowdPulse supports only MongoDB databases with these collections:

  • Message: contains all the processed and analyzed data
  • Info (optional): that contains info about the current database.

Message collection document structure

The following properties are required:

{
  "raw_text": "the raw message",
  "author_name": "the author name",
  "author_username": "the author username",
  "created_at": "YYYY-MM-DDTHH:MM:SS.000Z",
  "lang": "en",
  "possibly_sensitive": false,
  "twitter_entities": {
    "hashtags": [],
    "mentions": []
  },
  "geo": {
    "user_location": "Milano, Lombardia",
    "coordinates": {
      "latitude": "the geojson world latitude coordinate",
      "longitude": "the geojson world longitude coordinate"
    }
  },
  "processed": true,
  "sentiment": {
    "sent-it": {
      "sentiment": "positive, neutral or negative"
    },
    "feel-it": {
      "sentiment": "positive, neutral or negative",
      "emotion": "joy, sadness, anger or fear"
    }
  },
  "tags": {
    "tag_me": [
      "a tag : 123456 : a tag!!! : https://wikipedia.org/tag/... "
    ]
  },
  "spacy": {
    "processed_text": [
      "hello POS : ADJ",
      "world POS : ADJ"
    ]
  }
}

Info collection document structure (optional)

Only one document is required in the following collection:

  • version: The current collection version
  • targetVersion: 0 for legacy twitter database, 1+ for newer
  • releaseDate: A release date in YYYY-MM-DD format
  • lastUpdateDate: The latest update date in YYYY-MM-DD format
  • htmlDescription: An HTML description
  • icon: You only have to add "iVBORw0KGgoAAAA..." to the data of the base 64 string, e.g. "data:image/png;base64,iVBORw0KGgoAAAA..." and it should be 128x128.
{
  "version": "1.0.0",
  "targetVersion": 0,
  "releaseDate": "2023-02-02",
  "lastUpdateDate": "2023-02-05",
  "htmlDescription": "<h3>Test html description</h3>",
  "icon": "base 64 icon"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •