Thingstr Implemented
I built Thingstr. With Thingstr, you can react to entities on Wikidata on Nostr. Wikidata assigns IDs to and organizes virtually everything in the world, so using Thingstr means you can record and share reactions about anything on Nostr.
Japanese follows. 日本語はあとで。
I built Thingstr: https://thingstr.pages.dev/
With Thingstr, you can react to entities on Wikidata on Nostr. Wikidata assigns IDs to and organizes virtually everything in the world, so using Thingstr means you can record and share reactions about anything on Nostr.
Please try it out and share your thoughts. Also, I'm creating a pull request to NIPs, so I'd appreciate it if you could take a look at that too.
This article is for the 16th day of https://adventar.org/calendars/12046 (relay blogging). The article for the 15th day was "絵で振り返るNostr 2025年" (Nostr 2025 Retrospective in Pictures) https://yakihonne.com/article/naddr1qvzqqqr4gupzpc9ge0t4a0lya7a63fjl749mgdv9ssz0dhqt5jnytz3y6lmy9525qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qgwwaehxw309ahx7uewd3hkctcqz4g97jznd56rswpd2e9rj32vf454q7t623fqcg2gt7 by Atasinti-san. The article for the 16th day will be "Nostr AdventCalendar 2025 & Nostrasia2025 逆AdventCalendar" (Nostr AdventCalendar 2025 & Nostrasia2025 reverse-AdventCalendar) https://bewith.bz/?p=378 by bro-san.
Idea
The origin was an idea I proposed exactly one year ago in an article titled “Thinking of Things.”
https://yakihonne.com/article/naddr1qq255efedpr9snp3v4p564tgd4ury4n8fc6yxq3qq7qyk7rvdga5qzmmyrvmlj29qd0n45snmfuhkrzsj4rk0sm4c4psxpqqqp65wr0wmfc
At the time this article was written, it was just an idea without any implementation. This time, I've implemented this concept in a form that can be touched and tried, so I'll introduce it.
How to Use
Take a look at the top page. You should see the latest reactions displayed.
https://thingstr.pages.dev/
Log in with NIP-07 via the icon in the top right corner to add stars. You can also see entities that others have reacted to.
Searching for Entities
Enter keywords in the search box above to search for entities. When you navigate to an entity page, you can view reactions to that entity and see other related entities.
Limitations
Currently, events created by Thingstr use tags that are not standardized as NIPs. Therefore, Thingstr records are stored only on my dedicated relay. Please be aware that future schema changes could render past events incompatible or cause data loss on relays.
User Reactions
Clicking a user icon displays a list of that user's reactions.
Nostr events generated by Thingstr
The easy way to see how reactions are represented as events is to view the JSON from the three-dot menu on the user page.
The event shown below is the event for “I reacted with a + to the entity called Nostr.”
{
"content": "+",
"created_at": 1764890087,
"id": "8c897b7cb728c19e897385d957457f88e9dedf0e23520413e7ff86a3f328d5e9",
"kind": 17,
"pubkey": "07804b786c6a3b400b7b20d9bfc945035f3ad213da797b0c50954767c375c543",
"sig": "22c6a1032dd6353a62bca183edefb20175224d8092794a7c562bad60befcffa01fc2d3d7f7eba994630389bb07c23c4e7fcc485a92136a61567764ee6d2d1338",
"tags": [
[
"k",
"wikidata"
],
[
"i",
"wd:Q116423243"
],
[
"L",
"wikidata:P31"
],
[
"l",
"wdt:P31 wd:Q132364"
]
]
}
Reactions use kind:17 as defined in NIP-25. The usage of the k tag and i tag to specify the reaction target does not currently exist in NIP-73. I have proposed it.
The k tag contains wikidata. Since Nostr's Wikidata ID is Q116423243, we append Wikidata's RDF prefix wd to form the i tag.
l/L Tags
The L tag and l tag are attached. This describes that “the reaction target Q116423243 (Nostr) is P31 (an instance of) Q132364 (communication protocol).”
By attaching additional information about the entity using l/L tags, we believe this can be used to search reactions by specifying the field. That is, if you want to get reactions about instances of “Communication Protocol”,
{“#L”: “wikidata:P31”, “#l”: “wdt:P31 wd:Q132364”}
Note that the prefix for P31 is wdt, not wd. Wikidata uses the wdt prefix for properties. This l/L tag is an extension to NIP-32.
At the time of implementing thingstr, I thought this approach was acceptable. However, upon re-reading NIP-32, I found:
If using an
Ltag,ltags MUST include a mark matching anLtag value in the same event.
and realized that the above implementation does not meet the specification. Therefore, I'm proposing to annotate in this format:
{
"kind": 17, // NIP-25 reaction event
"content": "+",
"tags": [
// NIP-73 external content IDs
["k", "wikidata"],
["i", "wd:Q116423243"], // Subject (target entity): Q116423243 "nostr"
["L", "wikidata"], // Prefix namespace
["l", "wdt:P31 wd:Q132364", "wikidata"] // Predicate + Object: P31 "instance of" + Q132364 "communication protocol"
],
// other fields...
}
https://github.com/nostr-protocol/nips/pull/2161 Vitor-san has commented on the issue. I hope we can make it a good one.
Protocol-wise possible but not implemented in thingstr's UI
There are several gaps between what is possible with the above protocol extensions and what thingstr has implemented as its UI. The items listed below are only omitted to keep thingstr's UI simple, but are protocol-wise feasible.
Emoji Reactions
NIP-25 states that any emoji can be used when recording reactions. It also defines the “-” emoji to signify a downvote. Handling these independently could allow for more detailed reaction meanings. For example, it might be possible to assign 👣 to places you've visited and 👀 to places you want to go.
Repeated Reactions
Protocol-wise, multiple reactions can be recorded for the same target. For use cases like recording visit dates to a location, multiple entries should be possible. UI allowing creation of events with specified times (and relays accepting them) could also be beneficial. The thingstr UI uses toggles for reactions, where clicking an existing reaction removes it. However, this approach isn't strictly necessary.
Comments
As a natural extension, commenting should be possible via NIP-22.
Future works
I think of Thingstr itself as a conceptual proposal. It's fun to play with, but it's not a practical tool for everyday use. Why not implement a more practical, domain-specific site yourself?
Thingstrを作りました。 https://thingstr.pages.dev/
Thingstrを使うと、WikidataにあるエンティティにNostr上でリアクションできます。Wikidataには世界中のあらゆる「もの」や「こと」にIDが付与されて整理されているので、Thingstrを使えばあらゆる「もの」「こと」に関するリアクションをNostrで記録、共有できるということになります。
ぜひ触ってみて、感想をお寄せください。また、NIPsへのPull requestを作成していますので、それもご覧いただければと思います。
この記事は https://adventar.org/calendars/12046 の16日目の記事です。15日目の記事はAtasintiさんの「絵で振り返るNostr 2025年」 https://yakihonne.com/article/naddr1qvzqqqr4gupzpc9ge0t4a0lya7a63fjl749mgdv9ssz0dhqt5jnytz3y6lmy9525qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qgwwaehxw309ahx7uewd3hkctcqz4g97jznd56rswpd2e9rj32vf454q7t623fqcg2gt7 でした。17日目の記事はbroさんによる「Nostr AdventCalendar 2025 & Nostrasia2025 逆AdventCalendar」 https://bewith.bz/?p=378 です。
アイディア
発端は私がちょうど一年前に「Thinking of Thingstr」という記事で提案したアイディアです。
https://yakihonne.com/article/naddr1qq255efedpr9snp3v4p564tgd4ury4n8fc6yxq3qq7qyk7rvdga5qzmmyrvmlj29qd0n45snmfuhkrzsj4rk0sm4c4psxpqqqp65wr0wmfc
この記事を書いた時点ではただのアイディアで、実装が伴っていませんでした。今回、このコンセプトを実際に触って試せる形に実装しましたので紹介します。
使い方
トップページを見てみましょう。最新のリアクションが表示されているはずです。
https://thingstr.pages.dev/
右上のアイコンからNIP-07でログインすると、☆をつけることができます。他の人がリアクションしたエンティティも見えます。
エンティティの検索
上の検索窓にキーワードを入れると、エンティティを検索できます。エンティティページに移動すると、そのエンティティに対するリアクションや、関連する他のエンティティが見られます。
制限事項
現状、Thingstrが作成するイベントでは、NIPsとして標準化されていないタグの使い方をしています。そのため、Thingstrの記録はThingstr専用のリレーにのみ保存しています。今後のスキーマの変更等が発生して過去分のイベントが非互換になったり、リレーのデータが吹き飛んだりする可能性があることをご承知おきください。
ユーザのリアクション
ユーザアイコンをクリックすると、そのユーザのリアクションが一覧できます。
Thingstrが生成するNostrイベント
リアクションがどのようなイベントとして表現されているのかを見るには、ユーザーページにあるスリードットメニュからJSONを表示するのが一番確実です。
以下に示すイベントが、私が「Nostrというエンティティに対して+リアクションをした」というイベントです。
{
"content": "+",
"created_at": 1764890087,
"id": "8c897b7cb728c19e897385d957457f88e9dedf0e23520413e7ff86a3f328d5e9",
"kind": 17,
"pubkey": "07804b786c6a3b400b7b20d9bfc945035f3ad213da797b0c50954767c375c543",
"sig": "22c6a1032dd6353a62bca183edefb20175224d8092794a7c562bad60befcffa01fc2d3d7f7eba994630389bb07c23c4e7fcc485a92136a61567764ee6d2d1338",
"tags": [
[
"k",
"wikidata"
],
[
"i",
"wd:Q116423243"
],
[
"L",
"wikidata:P31"
],
[
"l",
"wdt:P31 wd:Q132364"
]
]
}
リアクションはNIP-25で定義されているkind:17を使用しています。この、リアクション対象を指定するkタグとiタグの使い方が、NIP-73には現時点では存在していません。提案中です
kタグには"wikidata"を入れています。NostrのWikidataにおけるIDはQ116423243なので、これにWikidataのRDFプレフィクス”wd”を付加してiタグとしています。
l/Lタグ
Lタグとlタグがついています。これは、「リアクション対象のQ116423243(Nostr)が、Q132364(通信プロトコル)のP31(インスタンス)である」ということを記述しています。
エンティティに関する付加情報をl/Lタグを用いて付与することで、分野を特定してリアクションを検索する際に利用できると考えています。つまり、「通信プロトコル」のインスタンスに関するリアクションを取得したければ
{"#L": "wikidata:P31", "#l": "wdt:P31 wd:Q132364"}
というフィルタが使えるということです。ここで、P31のプレフィクスはwdではなくwdtになっていることに注意してください。Wikidataではプロパティに対してwdtプレフィクスを付与します。このl/LタグはNIP-32への拡張になります。
thingstrを実装していた時点ではこのような形がよいかと思ったのですが、改めてNIP-32を読んでみると
If using an
Ltag,ltags MUST include a mark matching anLtag value in the same event.
と書いてあり、上記の実装だと仕様を満たさないことがわかりました。そのため、
{
"kind": 17, // NIP-25 reaction event
"content": "+",
"tags": [
// NIP-73 external content IDs
["k", "wikidata"],
["i", "wd:Q116423243"], // Subject (target entity): Q116423243 "nostr"
["L", "wikidata"], // Prefix namespace
["l", "wdt:P31 wd:Q132364", "wikidata"] // Predicate + Object: P31 "instance of" + Q132364 "communication protocol"
],
// other fields...
}
という形式でアノテートする提案をプルリクエストしています。 https://github.com/nostr-protocol/nips/pull/2161 Vitorさんからissueにコメントをいただいています。いいものにできるといいと思っています。
プロトコル的には可能だがthingstrのUIに実装されていないこと
上記のプロトコル拡張で可能なことと、thingstrがUIとして実装していることの間にはいくつか隔たりがあります。以下に示す事項はthingstrのUIをシンプルに保つためにそうしているだけで、プロトコル的には実現が可能なことです。
絵文字リアクション
NIP-25には、リアクションを記録する際に任意の絵文字を利用できる、としています。またdownvoteを意味する-も定義されています。これらを独立して扱うことで、リアクションの意味をより詳細化させることができるでしょう。
例えば、訪れた場所に👣、行きたい場所に👀を付与する、といったことも可能でしょう。
複数回のリアクション
プロトコル的には、同一の対象に対して複数回のリアクションを記録できます。ある場所に訪れた日付を記録するようなユースケースであれば、複数回の記録ができて然るべきでしょう。また、時刻を指定してイベントを作成できるUI(とそれを受け入れるリレー)があってもよいでしょう。
thingstrのUIでは、リアクションをトグルにしており、すでにあるリアクションをクリックするとそれを削除するUIになっています。ただ、必ずしもそうである必要はないということです。
コメント
自然な拡張として、NIP-22によるコメントが行えるはずです。
発展
Thingstr自体はコンセプトの提案として捉えています。遊ぶには楽しいのですが、普段遣いできるような実用的な道具とは言えないでしょう。あなたも、分野に特化したより実用的なサイトを実装してみませんか?