Sign inSign up

socialcomputing/coursemapper-webserver-webapp

By socialcomputing

Updated almost 2 years ago

CourseMapper-webserver, webapp service

Image
0

100K+

socialcomputing/coursemapper-webserver-webapp repository overview

CI

re-frame logo

CourseMapper is a collaborative course annotation and analytics platform that fosters collaboration and interaction around pdf/video learning materials, supported by visual learning analytics.

🚀 Get Started

Live instances
Build and run
  • make up to run the application using Docker Compose
  • make tilt to automatically rebuild during development using Tilt
  • make mounted to run processes using Docker Compose, but mount source code from host machine
  • see the manual below to install dependencies and run processes locally, without containers

Visit the proxy service on port 8000 to use the application.

🖥️ Application stack

The services making up the coursemapper-webserver project use the following images, hosted on Docker Hub:

🔨 Development Setup Guide

Step 1: Pre-requisites
Step 2: Installation Guide for CourseMapper webserver
  • Using your file explorer, go inside the directory webserver, copy the example.env file and paste it in the same folder. Rename the copied environment file to .env

  • Open a command prompt/terminal in the webserver directory

  • Type the command in the command prompt/terminal to install node packages

    npm ci
    

    If you face issue with npm ci command, try npm install or npm install --force command. Caution: npm install and npm install --force will delete all the existing node packages, install the new ones and update the package-lock.json file. Please make sure you do not push your changes to the package-lock.json file.

  • After the packages are installed, type the following command to run the server

    npm run watch:dev
    

    The server will run at http://localhost:8080

  • Stop the server by pressing Cntl + c inside the command prompt

Step 3: Installation Guide for CourseMapper webapp
  • Open a command prompt/terminal in the webapp directory

  • Type the command in the command prompt/terminal to install the Angular CLI

    npm i -g @angular/cli
    
  • Type the command in the command prompt/terminal to install node packages

    npm ci
    
  • After the packages are installed, type the following command to run the server

    ng serve
    

    The server will run at http://localhost:4200

  • Stop the server by pressing Cntl + c inside the command prompt

Step 4: Installation Guide for CourseMapper coursemapper-kg
  • Using your file explorer, go inside the directory coursemapper-kg

    • Copy the example.env file and paste it in the same folder. Rename the copied environment file to .env. Change the values (NEO4J_USER, NEO4J_PASSWORD, REDIS_PASSWORD) of the environment variables in the .env file to your own values.
  • Open a command prompt/terminal in the coursemapper-kg directory (with administration rights for Windows)

  • Install and activate python virtual environment for Windows

    • Type the following commands to install and activate the virtual environment:

      • Install python virtual environment (only first time)

        pip install pipenv
        
      • Install python package (only first time)

        pipenv install
        
      • Activate the virtual environment (every time when you want to start the server)

        pipenv shell
        

        (Optional) To check the location of your Python virtual environment, type pipenv --venv the following command in your command prompt

  • Download the spacy package (only first time)

    python -m spacy download en
    
  • Move to the directory coursemapper-kg, open a terminal, copy the codes below and paste it in the terminal one at a time to download the necessary nltk and sentence transformer packages.

    Make sure that you have downloaded the models from number 7 and 8 from step 1 above.

    python -c "import nltk;nltk.download('stopwords'); nltk.download('punkt'); nltk.download('wordnet'); import spacy; spacy.cli.download('en_core_web_sm'); from sentence_transformers import SentenceTransformer; SentenceTransformer('all-mpnet-base-v2'); from flair.embeddings import TransformerDocumentEmbeddings;  TransformerDocumentEmbeddings('sentence-transformers/msmarco-distilbert-base-tas-b'); from app.services.course_materials.kwp_extraction.model import KeyphraseExtractor; KeyphraseExtractor(); KeyphraseExtractor('squeezebert/squeezebert-mnli');"
    
  • Run the worker

    pipenv run python -m app.worker
    
Step 5: Postman configuration
  • Open the Postman software and import the file CourseMapper.postman_collection.json found under docs folder
Step 6: MongoDB Compass configuration
  • Open MongoDB Compass and type mongodb://localhost:27017 in the URI textbox and press connect button
  • Find the database coursemapper_v2 in the left panel

Tag summary

Content type

Image

Digest

sha256:1a807407b

Size

24.1 MB

Last updated

about 2 years ago

docker pull socialcomputing/coursemapper-webserver-webapp