View a live demo at https://doenet.github.io/library-demo/
Doenet web services powers the Doenet JavaScript library, which provides
- identity in a FERPA-protected manner
- progress reporting, i.e., scores for a gradebook or LMS
- xAPI event logging, i.e., statements stored in an LRS
- page state synchronization
This is embedded in a broader RESTful API which understands learners, instructors, courses, assignments, etc., and which is what powers the Doenet Atlas.
Besides node and the like, this service depends on redis and mongodb.
To test this in a development environment, you should create a .env
file for dotenv. This might
look as follows for development.
PORT=4000
NODE_ENV=development
MONGODB_DATABASE=lrs
MONGODB_PASS=thepassword
MONGODB_USER=theuser
MONGODB_HOST=localhost
MONGODB_PORT=27017
REDIS_HOST=localhost
REDIS_PORT=27017
REDIS_PASS=thepassword
SECRET=some.shared.secret
Look at @doenet's devops repo to see how this is deployed in a production setting with multiple VMs.
In production, the backend is built via a nix expression called default.nix which uses the pinned packages in yarn.nix; this relies on running yarn2nix, specifically
yarn2nix > yarn.nix
to capture the contents of yarn.lock in a format suitable for Nix.