Skip to content

Open Protocol: touched.json v1 ​

touched.page is designed so any website—a static GitHub Pages blog, a Cloudflare Worker, a self-hosted touched-node, or a custom Python/Go/Rust backend—can participate in the cross-medium network by serving one CORS-enabled JSON file.

Interactive Protocol Playground ​

Test a touched.page/v1 JSON payload live in your browser, catch accidental privacy leaks (email, private, archive), verify NIP-36 contentWarning: "nsfw" behavior, or fetch any CORS-enabled touched.json URL directly with zero backend proxy.

touched.json2274 chars
Live Validation & Client PreviewValid · 2 reviews / 1 posts
All schema, source-key, NIP-36, and privacy checks passed.
林深 · Lin@lin
Review夯二周目通关
极乐迪斯科 / Disco Elysium

开局摘领带死了两次,对话树写得真绝,冰面上看到竹节虫那段直接坐直了。

game · ZA/UM · 2019steam:632470
Review人上人一周目通路线NSFW · Browser Blur
Rance X -決戦-

系列三十年收官真没糊弄人,策略深度放到今天还是独一档。

game · AliceSoft · 2018erogamescape:25420
Post
二周目《极乐迪斯科》:为什么内陆帝国线最值得走

一周目靠逻辑和视觉计算硬推主线,二周目拉满内陆帝国和感同身受,整个马丁内斯的对话走向完全变了样。

/disco-inland-empire-runsteam:632470

1. Public Space Protocol (touched.page/v1) ​

Discovery & Headers ​

Every public space advertises touched.json alongside RSS in <head>:

html
<link rel="alternate" type="application/rss+xml" title="RSS" href="/@handle/rss.xml" />
<link rel="alternate" type="application/json" title="touched.json" href="/@handle/touched.json" />

Required HTTP headers:

http
Content-Type: application/json; charset=utf-8
Access-Control-Allow-Origin: *
Cache-Control: public, max-age=60

Complete Schema ​

json
{
  "protocol": "touched.page/v1",
  "generatedAt": "2026-12-01T14:20:00.000Z",
  "profile": {
    "handle": "lin",
    "displayName": "Lin",
    "bio": "Organizing games, anime, books, and albums.",
    "avatarUrl": "https://example.com/avatar.png",
    "spaceUrl": "https://library.example.com",
    "rssUrl": "https://library.example.com/rss.xml",
    "touchedJsonUrl": "https://library.example.com/touched.json",
    "blogUrl": "https://lin.example.com",
    "tierLabels": {
      "5": "S",
      "4": "A",
      "3": "B",
      "2": "C",
      "1": "D"
    }
  },
  "reviews": [
    {
      "id": "rev-disco-2026",
      "rating": 5,
      "tierLabel": "S",
      "statusText": "2nd playthrough done",
      "note": "Died trying to grab my tie in the first ten minutes. Still the sharpest branching dialogue I have ever played.",
      "updatedAt": "2026-12-01T10:30:00.000Z",
      "work": {
        "publicId": "k7m4p9x2",
        "title": "Disco Elysium",
        "titlesI18n": {
          "zh-CN": ["极乐迪斯科"],
          "en": ["Disco Elysium"]
        },
        "category": "game",
        "subtype": "rpg",
        "creator": "ZA/UM",
        "releaseYear": 2019,
        "coverUrl": "https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/632470/library_600x900_2x.jpg",
        "workUrl": "https://touched.page/works/k7m4p9x2",
        "sources": [
          {
            "namespace": "steam",
            "externalId": "632470",
            "canonicalUrl": "https://store.steampowered.com/app/632470/",
            "label": "steam"
          }
        ]
      }
    },
    {
      "id": "rev-rancex-2026",
      "rating": 3,
      "tierLabel": "B",
      "statusText": "Route cleared",
      "note": "Dense turn-based strategy wrapping up a 30-year cast.",
      "contentWarning": "nsfw",
      "updatedAt": "2026-11-20T09:00:00.000Z",
      "work": {
        "publicId": "r9x4k2n7",
        "title": "Rance X",
        "category": "game",
        "subtype": "visual_novel",
        "creator": "AliceSoft",
        "releaseYear": 2018,
        "workUrl": "https://touched.page/works/r9x4k2n7",
        "sources": [
          {
            "namespace": "erogamescape",
            "externalId": "25420",
            "canonicalUrl": "https://erogamescape.dyndns.org/~ap2/ero/toukei_kaiseki/game.php?game=25420",
            "label": "erogamescape"
          }
        ]
      }
    }
  ],
  "posts": [
    {
      "id": "post-disco-inland",
      "slug": "disco-inland-empire-run",
      "title": "Replaying Disco Elysium: why Inland Empire is the run to pick",
      "summary": "My first playthrough leaned on Logic and Visual Calculus. Maxing Inland Empire and Empathy turned half of Martinaise into a different game.",
      "url": "https://library.example.com/articles/disco-inland-empire-run",
      "publishedAt": "2026-11-29T08:00:00.000Z",
      "updatedAt": "2026-11-29T08:00:00.000Z",
      "workPublicIds": ["k7m4p9x2"],
      "workSources": [
        {
          "workPublicId": "k7m4p9x2",
          "namespace": "steam",
          "externalId": "632470",
          "canonicalUrl": "https://store.steampowered.com/app/632470/",
          "label": "steam"
        }
      ]
    }
  ]
}

Privacy & NIP-36 Rules ​

  • Strictly public output: Never emit emails, password hashes, tokens, private records, archive entries, silent unrated collects (ready with empty note and no rating), private mutes, or unconsented OAuth bindings / blog URLs.
  • NIP-36 contentWarning: "nsfw": Emit "contentWarning": "nsfw" on reviews of NSFW works and NSFW posts (or posts referencing NSFW works); omit the field completely on safe items. Readers MUST enforce the viewer's nsfwMode (hide | blur | show) and never route NSFW cover images through a server-side proxy cache.
  • Forward-compatible extensibility: Consumers MUST ignore unknown fields so future revisions can add optional profile.identity ({ pubkey, npub, relays }) and item-level proof ({ eventId, sig }) without breaking v1 parsers.

2. Browser Direct Node Pull (Zero SSRF) & Smart Dedup ​

Cross-node subscriptions run strictly inside the viewer's browser:

  1. Zero Server Egress / Zero SSRF: Neither touched.page nor touched-node fetches user-submitted remote node URLs server-side.
  2. Manual External Subscriptions: Any user can subscribe to up to 50 external touched.json URLs from Home / (Following tab). Subscriptions live in browser localStorage (tp-external-nodes-v1) with a 5-minute cache and 6-second AbortController timeout, sanitized strictly via safe DOM APIs (createElement + textContent, https:// / http:// links only).
  3. Opt-In Direct Self-Hosted Node Pull: When a followed user opts in (node_url_public = true, off by default), the viewer's browser fetches their touched.json directly over CORS (5s timeout, 5-min cache) and deduplicates against hub-cached entries:
    • Reviews match by canonical namespace:externalId (falling back to normalized title).
    • Posts match by stable slug (falling back to normalized title).
    • Fresher direct-node items replace stale hub cards with a quiet Direct node · <host> badge; if the peer's home server is offline, the browser seamlessly keeps the hub-cached copy.

3. Portability: OPML 2.0 & Full Backup (touched.page/backup/v1) ​

Authenticated via session cookie or scoped API key (Authorization: Bearer tp_live_...), all endpoints emit Cache-Control: no-store:

  • GET /api/me/following.json — portable following graph (including opted-in nodeUrl values)
  • GET /api/me/following.opml — standard OPML 2.0 XML compatible with NetNewsWire, Folo, Reeder, and Miniflux
  • GET /api/me/export.json — full touched.page/backup/v1 archive (profile, preferences, works + titlesI18n + sourceRefs, all states including private/archive, custom theme lists, tags, posts, following, and strictly private mutes)
  • POST /api/me/import — idempotent restore (up to 2 MB), safe to run across Cloud and touched-node

4. Join the Network in 5 Minutes (30-Line Starters) ​

Pick whichever stack you already run, publish /touched.json, and paste its URL into Home -> Following -> External nodes!

Starter A: Static JSON on GitHub Pages / Hugo / Astro ​

Drop public/touched.json into any static site generator (GitHub Pages automatically serves Access-Control-Allow-Origin: * on public sites):

json
{
  "protocol": "touched.page/v1",
  "generatedAt": "2026-12-01T00:00:00.000Z",
  "profile": {
    "handle": "yourname",
    "displayName": "Your Name",
    "spaceUrl": "https://yourname.github.io",
    "touchedJsonUrl": "https://yourname.github.io/touched.json"
  },
  "reviews": [
    {
      "id": "outer-wilds",
      "rating": 5,
      "tierLabel": "S",
      "statusText": "Finished",
      "note": "A solar system that runs on curiosity alone.",
      "updatedAt": "2026-11-28T12:00:00.000Z",
      "work": {
        "title": "Outer Wilds",
        "category": "game",
        "creator": "Mobius Digital",
        "releaseYear": 2019,
        "sources": [
          { "namespace": "steam", "externalId": "753640", "canonicalUrl": "https://store.steampowered.com/app/753640/" }
        ]
      }
    }
  ],
  "posts": []
}

Starter B: Cloudflare Worker (Zero-Origin Edge Node) ​

ts
export default {
  async fetch(req: Request): Promise<Response> {
    if (req.method === 'OPTIONS') {
      return new Response(null, {
        headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, OPTIONS' },
      });
    }
    const payload = {
      protocol: 'touched.page/v1',
      generatedAt: new Date().toISOString(),
      profile: {
        handle: 'edge-reader',
        displayName: 'Edge Reader',
        spaceUrl: 'https://reader.example.workers.dev',
        touchedJsonUrl: 'https://reader.example.workers.dev/touched.json',
      },
      reviews: [
        {
          id: 'disco-elysium',
          rating: 5,
          tierLabel: 'S',
          statusText: 'Completed',
          note: 'Every inner voice argues like an unforgettable novel.',
          updatedAt: '2026-11-30T10:00:00.000Z',
          work: {
            title: 'Disco Elysium',
            category: 'game',
            creator: 'ZA/UM',
            releaseYear: 2019,
            sources: [{ namespace: 'steam', externalId: '632470', canonicalUrl: 'https://store.steampowered.com/app/632470/' }],
          },
        },
      ],
      posts: [],
    };
    return new Response(JSON.stringify(payload), {
      headers: {
        'Content-Type': 'application/json; charset=utf-8',
        'Access-Control-Allow-Origin': '*',
        'Cache-Control': 'public, max-age=60',
      },
    });
  },
};

Starter C: Python FastAPI ​

python
from datetime import datetime, timezone
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

app = FastAPI()
app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["GET"])

@app.get("/touched.json")
def touched_json():
    return {
        "protocol": "touched.page/v1",
        "generatedAt": datetime.now(timezone.utc).isoformat(),
        "profile": {
            "handle": "py-reader",
            "displayName": "Py Reader",
            "spaceUrl": "https://library.example.org",
            "touchedJsonUrl": "https://library.example.org/touched.json",
        },
        "reviews": [
            {
                "id": "invisible-cities",
                "rating": 5,
                "tierLabel": "S",
                "statusText": "Read twice",
                "note": "Fifty-five imaginary cities that all describe Venice.",
                "updatedAt": "2026-11-29T08:00:00Z",
                "work": {
                    "title": "Invisible Cities",
                    "category": "book",
                    "creator": "Italo Calvino",
                    "releaseYear": 1972,
                    "sources": [
                        {"namespace": "douban", "externalId": "1858513", "canonicalUrl": "https://book.douban.com/subject/1858513/"}
                    ],
                },
            }
        ],
        "posts": [],
    }

Open-core ecosystem under MIT License. Built around works, writing, and data sovereignty.