JSONBin.io is a hosted JSON store. Frogspawn uses it as a lightweight state backend: the facilitator control panel writes exercise state to a bin, and participant inboxes poll that bin for updates.
Current Frogspawn state shape:
{
"day": 0,
"deployed": [],
"deployedAt": {}
}- Go to https://jsonbin.io and click Sign Up.
- Verify your email address.
-
Log in and click Create a Bin.
-
Paste in the initial record:
{ "day": 0, "deployed": [], "deployedAt": {} }
3. Give it a name, e.g. `frogspawn-artic-table-top`.
4. Click **Create**.
5. Copy the **Bin ID** from the URL — it looks like `684d2a3f...` (24 hex chars).
---
## 3. Get your API keys
In the JSONBin dashboard go to **API Keys**:
| Key | Purpose | Where to use |
|-----|---------|--------------|
| **Master Key** | Read + Write + Privacy updates | Control panel only — never commit this to git |
| **Access Key** (optional) | Read-only | Stored in `settings.json` for inbox/control reads |
If you set the bin to **Public** (in its settings) the Access Key is not
needed for reads; polling inboxes will work without any key.
---
## 4. Add the Bin ID to your activity settings
Edit `activities/<activity-name>/settings.json` and add these fields:
```json
{
"title": "ARTIC Table-Top exercise",
"description": "...",
"location": "...",
"date": "2025-10-25",
"pollInterval": 20000,
"jsonbinBinId": "PASTE_YOUR_BIN_ID_HERE",
"jsonbinAccessKey": "PASTE_READ_ONLY_ACCESS_KEY_OR_LEAVE_EMPTY_IF_PUBLIC"
}
Do not put the Master Key in
settings.json. It is entered by the facilitator at runtime in the control panel.
- Open
controls.html?activity=artic-table-topin your facilitator browser. - A Master Key input field is shown in the toolbar.
- Paste your Master Key and press Connect.
- The status badges show key status, read status, and bin visibility.
- Use Start Day in the table to advance deployment day, or toggle individual documents.
- Use Reset to return to day 0.
Master key storage behavior:
- Default: stored in
sessionStoragefor the current tab. - If you enable Remember until cleared, it is stored in
localStoragescoped by bin ID.
The Master Key is stored only in sessionStorage for that tab and is never
sent to any endpoint other than api.jsonbin.io.
Participants open one of:
https://<your-host>/inbox.html?activity=artic-table-top
or
https://<your-host>/inbox.html?url=https://<your-host>/activities/artic-table-top/
The inbox polls JSONBin on a timer. When the facilitator updates state, participants see changes within one poll cycle.
Polling precedence in inbox is:
- URL
?interval=override settings.jsonpollInterval- default
20000ms
Example override:
inbox.html?activity=artic-table-top&interval=30000
JSONBin's free tier allows 10 000 requests/month. At 10 s polling:
| Concurrent inboxes | Requests/hour | Free tier exhausted in |
|---|---|---|
| 10 | 3 600 | ~70 hours |
| 30 | 10 800 | ~23 hours |
| 50 | 18 000 | ~14 hours |
For larger groups or longer events, increase the interval and/or upgrade to a JSONBin paid plan.
-
Log in to JSONBin and set the record back to:
{ "day": 0, "deployed": [], "deployedAt": {} } -
Or use the Reset button in control panel.
Notes:
- Reset sets current day to 0.
- Documents with
autoDeploy: truefor day 0 are re-applied. - Deployments from later days are removed.
The control panel has a privacy switch to toggle bin visibility:
- Public -> inboxes can read without access key.
- Private -> inboxes need access key (or master key fallback in controls).
Important:
- Privacy updates require the owner account's master key for that bin.
- If JSONBin returns
401/403, the key is valid format but not authorized for that specific bin/account.
- The Master Key gives full read/write access to all your bins. Treat it like a password.
- The Access Key is read-only; it is safe to commit to
settings.jsonin a private repository, but avoid public repos. - If a bin is set to Public, no key is needed for reads; anyone who knows the Bin ID can read the current day — which is fine for a training exercise.
- JSONBin does not support real-time WebSocket push; updates arrive at the next poll cycle.