This version of Trrack has been archived. Please refer to https://github.com/Trrack/trrackjs for the latest updates and releases. This archival only affects the github repository. The npm versions of trrack are still available at
@visdesignlab/trrack
.
Trrack is a library to create and track provenance (history) in web-based apps. Trrack allows you to create and maintain a non-linear provenance graph representing the history of the state of your visualization. Through this graph, you can easily implement complete action recovery, as well as store custom metadata and annotations.
Trrack also allows for easy sharing of a visualization's current state through URL sharing. To share entire session history, Trrack allows for the import and exporting of provenance graphs, as well as has built in integration with firebase to store the graphs.
For full documentation, see http://vdl.sci.utah.edu/trrack/trrack-docs/index.html
Also check out the paper to learn about the design philosophy.
If you're using Trrack in an academic project, please cite:
Z. T. Cutler, K. Gadhave and A. Lex, “Trrack: A Library for Provenance Tracking in Web-Based Visualizations”, osf.io preprint. https://doi.org/10.31219/osf.io/wnctb.
Trrack does back-end history management only. If you want to use the history/provenance visualization as well, check out the trrack-vis library, which is designed to provide a customizable front-end for the Trrack library.
Here are some examples showing you how to get started:
Here are examples of some systems which use Trrack
npm install --save-dev @visdesignlab/trrack
npm install --save-dev @visdesignlab/trrack-vis
yarn add @visdesignlab/trrack
yarn add @visdesignlab/trrack-vis
<!-- Trrack -->
<script src="//cdn.jsdelivr.net/combine/npm/firebase@7/firebase-app.min.js,npm/firebase@7/firebase-database.min.js,npm/mobx@6/dist/mobx.umd.production.min.js,npm/lz-string@1/libs/lz-string.min.js,npm/deep-diff@1/dist/deep-diff.min.js,npm/@visdesignlab/trrack/dist/trrack.umd.production.min.js"></script>
<!-- Trrack Vis -->
<script src="//cdn.jsdelivr.net/combine/npm/react@17/umd/react.production.min.js,npm/react-dom@17/umd/react-dom.production.min.js,npm/react-move@6/dist/react-move.min.js,npm/typestyle@2/umd/typestyle.min.js,npm/semantic-ui-react@2/dist/umd/semantic-ui-react.min.js,npm/d3@6.2.0/dist/d3.min.js,npm/@visdesignlab/trrack-vis/dist/trrackvis.umd.development.min.js"></script>
To use Trrack, your application has to be explicit about state: any action that you want to track has to be captured as part of a state that you pass to the Trrack library.
Trrack allows instant sharing of state via URL parameter. State sharing is turned on by default. Changing the state of your application will automatically update the URL parameter. Pasting the entire URL into a different web browser will import the state automatically.
The graph which Trrack creates and utilizes may be visualized using Trrack-Vis. Trrack-Vis has default icons associated with the event type object. TrrackVis exports a React component. To use Trrack-Vis in a javascript environment, you will need to import and use the ProvVisCreator function. See this simple example for how to set up Trrack-Vis with default functionality. For further documentation and a list of customizable parameters that can be passed to Trrack-Vis, see http://vdl.sci.utah.edu/trrack/trrack-vis-docs/interfaces/provvisconfig.html
To integrate FireBase with Trrack, you first need to set up a Firebase project. Once you've done so, navigate to Settings -> Project settings -> general, and you should find a "firebaseConfig" object on that page. That exact object will be passed into initProvenance. Once done, Trrack will automatically store all created nodes to your Firebase project.
To utilize Trrack with other servers, you will use exportProvenanceGraph
to export the entire graph json and importProvenanceGraph
to import the same json file.
Generated using TypeDoc