The project is a static browser prototype served by a small Node server.
Primary server:
Archive Hub/server.js
Primary URL:
http://127.0.0.1:4179/
The Archive Hub and all cases must run under the same origin so they can share localStorage.
Use:
http://127.0.0.1:4179/
http://127.0.0.1:4179/case001/prototype/
http://127.0.0.1:4179/case002/prototype/
Do not use standalone case ports. They do not share Archive state with the Hub.
Archive Hub/
index.html
styles.css
script.js
case-engine.js <- shared case prototype engine
server.js
Case 001 - The Door Is Real/
artifacts/
notes/
playtest/
prototype/
case-config.js <- case-specific data and hooks
artifacts-data.js <- pre-embedded artifact content
index.html
styles.css
artifact-manifest.md
case-data.json
case-design.md
Case 002 - The Half Synthetic Community/
Case 003 - The Human Premium/
Case 004 - The Lost Archive/
The server auto-discovers cases by scanning sibling folders matching Case \d+ - *.
It exposes /cases/index.json listing discovered case IDs and titles.
The Hub fetches this at startup. No code changes are needed when a new case folder is added.
Unlock thresholds for locked cases live in each case's case-data.json as unlockAfter: N.
All case prototype logic lives in a single shared engine:
Archive Hub/case-engine.js
It is served at /case-engine.js and loaded by every case prototype.
Each case's prototype/case-config.js sets window.CASE_CONFIG with:
caseId— used when recording Archive choicesstoragePrefix— unique localStorage key prefix per caseevidence— array of artifact metadata (title, file, act, type, date, unlock, keywords)unlockLevel(state)— function returning current unlock tier (0-3)leadLabels— four phase labels shown in the sidebar lead bannerleadUnlockMessages— messages shown when a lead tier unlocksendingRequired— artifact IDs that must be read to enable the endingendingReadyMessage/endingLockedMessageoutcomes— Publish / Bury / Preserve copy and archive status labelsonOpenEvidence(item, archiveState)— optional hook for cross-case effectsonInit(getArchiveState)— optional hook for case-specific init (e.g. archive context panel)
Each case's prototype/artifacts-data.js sets window.CASE_ARTIFACTS with pre-embedded markdown content.
Load order in index.html:
<script src="case-config.js"></script>
<script src="artifacts-data.js"></script>
<script src="/case-engine.js"></script>Archive state is stored in browser localStorage under:
network.archive.state
It tracks:
- case choices (Publish / Bury / Preserve per case ID)
- base meter values
The meters are:
- Public Attention
- Witness Trust
- Archive Integrity
- Network Awareness
Per-case read/flagged/notes state is stored under each case's storagePrefix:
case001.read
case001.flagged
case001.notes
case001.theory.speaker / .proof / .hidden
- Create
Case 00X - Title/folder. - Draft
case-design.mdandartifact-manifest.md. - Write 15 artifacts in
artifacts/. - Create
case-data.json(used by the Hub — see existing cases for schema). - Create
prototype/case-config.jssettingwindow.CASE_CONFIG. - Generate
prototype/artifacts-data.jssettingwindow.CASE_ARTIFACTS. - Copy an existing
prototype/index.htmlandprototype/styles.css. - Update the
<title>, eyebrow,<h1>, briefing paragraph, and search placeholder inindex.html. - The server discovers the case automatically. No server or Hub changes required.
- Test through
http://127.0.0.1:4179/.