API Overview

Algebrakit exposes its core functionality and the frontend web components as a RESTful web service. The look and feel of these web components can be configured to match the visual style of your LMS.

These documentation pages describe the general setup of the Algebrakit services, including a description of the web service API and the frontend API. Refer to the menu on the left to navigate through these documentation pages. For code examples, refer to code examples on Github. For more detailed questions, please use the contact form to reach out to us.

Main components

Algebrakit is a system with the following main components:

  1. The web service, which exposes Algebrakit’s evaluation engine, handles exercise sessions and allows access to exercises stored in Algebrakit’s CMS.
  2. The frontend API, which handles web component creation and configuration, emitting learning events and the like.
  3. The frontend web components, which are injected into your web page and interact between Algebrakit and the student.
  4. The Algebrakit CMS, an online environment where authors are allowed to create new exercises or arrange existing randomized exercises.

Exercise life cycle

The life cycle of an exercise is as follows:

  1. Create sessions: New sessions are initialized from your LMS’ backend. Algebrakit replies with a session id.
  2. Insert web components: Your LMS inserts a custom html tag with session attribute for each web component. These tags will automatically be replaced by the correct math web component.
  3. Session events: The web component takes care of initializing itself and communicating with Algebrakit for evaluation, hints and feedback.
  4. Collect results: The LMS uses the session id to get the session results from Algebrakit. This can be done directly after the session or any time later on.

Exercise Flow

This approach guarantees that no ‘confidential’ information, such as the exercise’s answer, is sent to the frontend. In addition, the amount of data that is sent back and forth between front and back end is minimal.

Frontend - your web page

To be able to use Algebrakit in your solution, you need to load the frontend API first. Questions are included through dedicated tags that each refer to the applicable sessions. The frontend API will automatically detect the tags, figure out the question type and launch the corresponding web component.

      ...  <!-- Whatever your page contains... -->

      <!--Insert an Algebrakit question here -->
      <akit-exercise session-id="{id}"></akit-exercise>

      ...  <!-- Whatever your page contains... -->

      <!--Load frontend API -->
      <script src="https://widgets.algebrakit.com/akit-widgets.min.js"></script>

Note that the sessions are created server side, through a call to the Algebrakit web service.

Also note that this is a minimal setup; see the frontend API documentation to read more about configuration, listening to events and sending commands.