From 9625533ed4c9049b5392c1b111bf1f281d8dd789 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 13 Jun 2025 19:41:20 -0500 Subject: [PATCH] Add t-tag guidance --- CONTEXT.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CONTEXT.md b/CONTEXT.md index 4d06c0c..ccfc043 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -189,6 +189,31 @@ When designing tags for Nostr events, follow these principles: const events = await nostr.query([{ kinds: [30402], '#t': ['electronics'] }]); ``` +#### `t` Tag Filtering for Community-Specific Content + +For applications focused on a specific community or niche, you can use `t` tags to filter events for the target audience. + +**When to Use:** +- ✅ Community apps: "farmers" → `t: "farming"`, "Poland" → `t: "poland"` +- ❌ Generic platforms: Twitter clones, general Nostr clients + +**Implementation:** +```typescript +// Publishing with community tag +createEvent({ + kind: 1, + content: data.content, + tags: [['t', 'farming']] +}); + +// Querying community content +const events = await nostr.query([{ + kinds: [1], + '#t': ['farming'], + limit: 20 +}], { signal }); +``` + ### Kind Ranges An event's kind number determines the event's behavior and storage characteristics: