A tiny, serverless status dashboard that you can run by simply opening index.html.
Data is stored in a JSON file (resources.json) that you connect to and save into from the browser.
Important:
resources.jsonis not included.
Create it by copyingexample_resources.json→ rename the copy toresources.json(same folder asindex.html).
Then, in the app, click Connect resources.json and select that file.
No backend. No build step. Works offline.
- File-based DB: Uses
resources.jsonas the “database”. - Add projects & environments: Each project row can have many environments.
- Status checks: On load and on demand. Shows:
UP– HTTP OK (CORS allowed)DOWN– HTTP error or network errorUP? (opaque)– Request returned but CORS hid the statusUnknown– Not checked yet
- Save directly to file (Chrome/Edge) via the File System Access API.
- Import/Export JSON fallback (Safari/Firefox).
- Auto-backup to
localStorage.
| File | Purpose |
|---|---|
index.html |
The app UI. Open this file directly. |
script.js |
Logic: state, rendering, status checks, saving. |
resources.json |
Your live data file. Not included by default. Create by copying example_resources.json. Connect this in the UI. |
example_resources.json |
A sample you can copy from or import. |
styel.css |
Your CSS (paste a Bootswatch/Bootstrap theme). (Name matches your file; keep it or rename and update the link.) |
Readme.md |
This file. Project docs. |
index.htmllinks bothstyle.cssandstyel.cssas a convenience. You can standardize later; just keep the link consistent.
- Create your data file: Copy
example_resources.json→ rename toresources.json(same folder). - Open
index.htmlin your browser (double-click is fine). - Click “Connect resources.json” and choose the
resources.jsonyou created. - Add a project (name + optional first environment).
- Click Save after changes, or use Export JSON / Import JSON.
- Use Refresh Statuses or per-row Check to re-ping.
- Chrome / Edge (desktop): Full support, including direct saving to
resources.json. - Safari / Firefox: No direct writes. Use Export/Import to manage the JSON file.
- Mobile: Varies; use desktop for file operations.
-
Direct Save (preferred):
Click Connect resources.json → pick your file → Save writes to it.
Uses the File System Access API. Grant read/write when asked. -
Export / Import (fallback):
Use Export JSON to downloadresources.json, and Import JSON to load one. -
Local backup:
State is mirrored tolocalStorageto survive reloads.
Tip: If direct saving fails, you’ll see an error toast (e.g., permission denied, read-only folder).
-
For each environment URL, the app tries:
- CORS fetch (real status): If allowed by the API, you get the true HTTP status.
- No-CORS fallback: If CORS blocks it, a blind probe runs.
- If it returns, you see “UP? (opaque)” (reachable but status unknown).
- If it fails, you see DOWN.
-
Timeouts: Requests abort after ~10s.
-
Caching: Disabled (
cache: "no-store").
Note: Browsers cannot bypass CORS. If your API blocks cross-origin requests, enable CORS on your health endpoint, or accept the opaque result.
- Add project: Use the top form. Each project renders as a table row.
- Rename project: Edit inline (click Save to write to file).
- Add environment: Use the “Add environment” row within a project.
- Edit environment: Change name/URL inline. Status resets to Unknown until re-checked.
- Delete: Use Delete on a project or environment row.
- Check status: Click Check at project level (all envs) or per env.
resources.json has a single root object with a projects array:
{
"projects": [
{
"id": "p_xxxxxx",
"name": "Project Name",
"environments": [
{
"id": "e_xxxxxx",
"name": "Production",
"url": "https://api.example.com/health",
"lastStatus": {
"state": "unknown | up | down | opaque",
"httpStatus": null,
"checkedAt": null,
"detail": null
}
}
]
}
]
}- IDs are generated (stable keys for UI updates).
lastStatusupdates after each check.
- Paste any Bootswatch or Bootstrap CSS into
styel.css. - Uses standard Bootstrap classes (
table,btn,form-control, etc.). - Add your own overrides in
styel.css.
-
“Save” doesn’t write to file
- Use Chrome/Edge.
- Click Connect resources.json and grant write permission.
- Ensure the folder isn’t read-only (system folders, locked cloud drives).
- If still blocked, use Export/Import.
-
All statuses show “UP? (opaque)”
- API is reachable but CORS blocks the response.
- Enable CORS on the health endpoint, or accept opaque checks.
-
Opening via
file://- That’s fine. Some URLs may still show “opaque” due to CORS.
-
Renaming
style.css/styel.css- Keep the
<link>inindex.htmlpointing to the file you actually use.
- Keep the
- State-driven UI: Single
dataobject → render functions rebuild rows (React-like pattern in vanilla JS). - Progressive enhancement: File System Access API when available; Export/Import +
localStorageotherwise. - Normalization: Incoming JSON is sanitized to ensure required fields.
- Abortable fetch:
AbortControllerprevents hanging calls. - CORS honesty: Surfaces opaque instead of guessing.
- Search & filters (by project/env/status).
- Tags/groups for projects.
- History per environment (uptime sparkline).
- Response time metrics & retries.
- Auto-refresh every N minutes.
- Auth/headers via a CORS-enabled proxy.
- Persist file handle (IndexedDB) so you don’t reconnect after reload.
- 100% client-side. No data leaves your machine.
- Don’t put secrets in URLs. If auth is required, use a proxy you control and enable CORS.
Use freely. MIT-style — do what you like.
