System for delivering documents and data in an interactive training exercise
Frogspawn is a simple web-based document viewer that displays a list of documents from a JSON file and allows users to view them in an iframe. The system automatically polls for updates to the document list.
- Split-panel interface: Document list on the left, viewer on the right
- Click-to-view: Click any document in the list to display it in the iframe
- Automatic polling: Regularly checks for updates to the JSON file
- Customizable: Configure the JSON source URL and polling interval via URL parameters
- Open
index.htmlin a web browser - Select an activity card on the home page
- Click Open Inbox to launch
inbox.htmlfor that activity - Or click Open Control Panel to launch
controls.htmlfor that activity
The inbox viewer page is now inbox.html.
Frogspawn uses a simple URL-based startup model:
url: Base URL for activity content- If
activityis not provided, this points directly at an activity folder containingdocuments.jsonandsettings.json. - Example:
inbox.html?url=https://example.org/lhfv-table-top/activities/artic-lhfv-outbreak/
- If
activity: Optional activity name- When provided,
urlis treated as the repository base, and inbox loads fromactivities/<activity>/under that base. - Example:
inbox.html?url=https://example.org/lhfv-table-top/&activity=artic-lhfv-outbreak
- When provided,
You can still override specific files directly:
docs: URL todocuments.jsonsettings: URL tosettings.jsonstatus: URL to day/status JSONinterval: Polling interval in milliseconds
Example:
inbox.html?url=https://example.org/lhfv-table-top/activities/artic-lhfv-outbreak/&interval=60000
Explicit override example:
inbox.html?url=https://example.org/lhfv-table-top/&activity=artic-lhfv-outbreak&docs=https://example.com/custom-documents.json
The JSON file should contain an array of document objects with the following structure:
[
{
"title": "Document Title",
"description": "A brief description of the document",
"url": "https://example.com/document.html"
},
{
"title": "Another Document",
"description": "Description of another document",
"url": "https://example.com/another-doc.html"
}
]title(optional): The title of the document, displayed prominently in the listdescription(optional): A description shown below the titleurl(required): The URL of the page to display in the iframe
If only one of title or description is provided, it will be used for both fields.
The repository includes two activity packs in activities/ with their own documents.json, settings.json, documents/, and data/ folders.
By default Frogspawn loads activities.json from the app root.
{
"defaultActivity": "artic-table-top",
"activities": {
"artic-table-top": {
"url": "activities/artic-table-top/"
},
"artic-lhfv-outbreak": {
"url": "activities/artic-lhfv-outbreak/"
}
}
}Open index.html for the launcher page, then launch an activity into inbox.html. For testing with local JSON files, you may need to run a local web server due to CORS restrictions:
# Using Python 3
python3 -m http.server 8000
# Using Python 2
python -m SimpleHTTPServer 8000
# Using Node.js (if you have http-server installed)
npx http-serverThen navigate to http://localhost:8000 in your browser.
Host the app shell and either:
- host activity packs under
activities/<name>/, or - provide a remote catalog with remote activity
baseUrlvalues.
If remote activity assets are on a different origin, ensure CORS allows browser fetches from the Frogspawn origin.
- The iframe will only display pages that allow embedding (check
X-Frame-Optionsheaders) - Ensure your JSON source is from a trusted location
- Be aware of CORS restrictions when loading JSON from external sources
See LICENSE file for details.