Giter VIP home page Giter VIP logo

media_management_lti's Introduction

Image Media Manager (IMM)

A media management application for collecting and maintaining media in online course environments. This application supports the IIIF standard for image management, and seamlessly integrates with other applications such as Mirador and LTI-compliant learning management systems like Canvas and edX.

Build Status

alt text

Quickstart

Prerequisites:

The following components are required for running this LTI tool:

  1. media_management_api: API backend for storing and managing data
  2. loris: Image server for delivering images from an S3 bucket
  3. An AWS S3 bucket that the API can write to and Loris can read from.

To proceed with this quickstart, ensure that you have docker installed and that those components are configured appropriately.

Configure LTI django application:

  • Setup the secure settings:
$ cp media_management_lti/settings/secure.py.example media_management_lti/settings/secure.py
  • Generate API credentials on the media_management_api admin interface
  • Update media_management_lti/settings/secure.py with the client_id and client_secret that were generated. These API credentials are used to obtain API tokens for end-users.

Install TLS certificates to support HTTPS on localhost

  • Install the mkcert tool. E.g, $ brew install mkcert on MacOS.
  • Run $ mkcert -install and $ mkcert localhost 127.0.0.1. A TLS certificate and key pair will be generated. See output for the location of the pair on your filesystem.
  • Update the runsslserver command in ./docker-compose.yml with the paths to the TLS certificate and key. Alternatively, as expected by ./docker-compose.yml, rename the certificate to cert.pem and the key to key.pem, and ensure they are in project root, i.e. ./cert.pem and ./key.pem.

Start docker services:

$ docker-compose up
$ docker-compose exec web python manage.py migrate
$ docker-compose exec web python manage.py createsuperuser
$ open http://localhost:8080

Note that the web service talks to the media_management_api web service on the same network.

Build javascript (e.g. angularjs):

The final step is to build the angularjs client code stored in the app/ directory.

In order to do this, it's necessary to use gulp, a NodeJS build tool, and run the gulp build command in the app/ directory. Rather than installing a gulp locally, the commands below build a docker container expressly for that purpose and then execute the necessary command(s).

$ cd app
$ docker build -t gulp .
$ docker run --rm -v `pwd`:/code gulp npm install
$ docker run --rm -v `pwd`:/code gulp gulp build
$ docker run --rm -v `pwd`:/code gulp gulp watch

Notes:

  • The --rm flag is used to remove the container after the command is executed since the result of the command is saved to the volume that was mounted (e.g. current directory).
  • The -v flag mounts the app directory so that the build is saved outside of the container.

Other tasks:

  • Access the database: docker-compose exec db psql -U media_management_lti
  • Run unit tests: bash run-tests.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.