Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Nostrでウェブサイトをホスティングできる仕組みを作った(新時代の分散型SNS勉強会 202...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kaiji
December 08, 2023
520
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nostrでウェブサイトをホスティングできる仕組みを作った(新時代の分散型SNS勉強会 2023/12/09)
kaiji
December 08, 2023
Transcript
17 slides
Nostrでウェブサイトをホスティングできる仕組みを作った Hostr Written By: kaiji 2023/12/08
kaiji
[email protected]
@studiokaiji @studiokaiji 自己紹介
01 Hostrとは?
Hostrとは? Nostrを使った分散型のウェブホスティングソリューション WebサイトをNostrのリレー上に記録し、ホスティングができる仕組みi HTML、CSS、JS等のウェブサイトの基本ファイルに加え、SVGやJSONといったテキスト ファイルをEventとして記録するi この仕組みを使いやすくするためのコマンドラインツール「Hostr CLI」もリリース済み。
02 Hostr・Hostr CLIの機能
Hostr・Hostr CLIの機能 1コマンドで、すぐにデプロイ $ hostr deploy --path=/BUILT/SPA/DIR/PATH --identifier=hostr-lp ビルド済みのウェブサイトの データのパス
サイトの識別子 (replaceable events用)
Hostr・Hostr CLIの機能 今すぐ利用できるリレー・ウェブサーバー ウェブホスティングのために構築された公開リレーとウェブサーバーで、誰でも今すぐ分散型ウェブホスティ ングが可能に。 リレー wss://r.hostr.cc ウェブサーバー [npub] https://h.hostr.cc,
https:// .hostr.cc
Hostr・Hostr CLIの機能 セキュアアクセス localstorageやNIP-07などを利用している、ドメインに依存したウェブサイトでも、npubをサブドメインに することで、安全にHostrサイトを利用可能。 通常イベント https://h.hostr.cc/e/[nevent] セキュアアクセスイベント https:// .hostr.cc/e/
[npub] [nevent]
03 アーキテクチャ
アーキテクチャ フロー 開発者 リレー サーバー ユーザー SPAを記録した Eventを送信 Eventを返却 サイトの
データを返す サイトとして 読み取り可能な データに変換 ウェブサイトへの 取得リクエスト Eventを取得
仕様(NIP-106 PR ベース) 識別子 通常イベンB 7 nevent *ただしHostrのサーバーでは 通常のevent
idもサポート 置き換え可能なイベンB 7 dタグ 通常イベンB HTML: 539 CSS: 539x JS: 539 Others: 1064,1065 置き換え可能なイベンB HTML: 3539 CSS: 3539x JS: 3539 Others: 30064,30065 kind アーキテクチャ
04 パフォーマンス
パフォーマンス 初回読み込み Hostr + nostr-rs-relay Express.js サーバー IPFS(Kubo) 0 500
1500 3500 5000 4.12 s 622 ms 412 ms Server, Relay: Client: Tokyo Fukushima IPFS ノードと Nostr リレーは、それぞれのゲートウェイおよびサーバーとは別のインスタンス上で実行され、 インターネット経由で接続されますr IPFS は DHT を使用して検索を実行するため、数値はかなり変化します。あくまでも一例としてご覧ください。
05 これから実装・応用したいこと
これから実装・応用したいこと セキュアイベント u 現在のHostrでは、セキュアルートでのアクセスをサイト作成者が強制できないf u Nostrクライアントをはじめとした、セキュアルートでのアクセスが必須なサイトの実装には不向きf u eventのタグに onlySecure 属性を付け、値が
true だった場合、セキュアルート(npubがサブドメインのルート)にリ ダイレクトするf u セキュアイベントに対応していないウェブサーバーの場合はHTTPリクエストエラーを返す。
これから実装・応用したいこと Nostr CMS Nostr上で動くWordPressのようなCMSs 長文投稿とアプリケーション固有データを管理s 柔軟な書き込みルールを備えた公開データベースs
Hostrサイトをノーコードで構築可能s Nostr上で全て動作。
Ready to Use Relay Nostr Native Hostable Any SPA Secure
Access Faster than IPFS*1 660% Hostr nostr-webhost Replaceable Event Built-in Web Server *1. 開発者の環境での計測
More Decks by kaiji
See All by kaiji
What is Nostr Other Stuff?
studiokaiji
0
270
Hostr - Decentralized Web Hosting Solution on Nostr
studiokaiji
0
380
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
15
41k
Un-Boring Meetings
codingconduct
0
510
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
320
Believing is Seeing
oripsolob
1
290
Google's AI Overviews - The New Search
badams
0
1.7k
What's in a price? How to price your products and services
michaelherold
247
13k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
790
4 Signs Your Business is Dying
shpigford
187
23k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
850
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590