A publicly accessible bulletin board may need to be created at short notice, including during an emergency. Reports about unexpectedly large server bills for quickly launched services show why the hosting model should be considered before writing the application. This note records one possible starting point. It is not a description of any particular service.
A request to an AI such as “make a bulletin board that anyone can post to” does not specify how database reads, requests, or data transfers will be billed. Even when the generated code works, the cost of keeping it online may be difficult to estimate if the hosting and billing model is left unspecified.
For this specification, the hosting platform is fixed in advance: Cloudflare Workers Static Assets for the interface, a small Workers API for reading and posting messages, and Cloudflare D1 for storage. The initial implementation must not silently introduce a separately metered database, email service, or other external dependency.
The distinction is in the billing model. A system that charges for database reads and outbound transfer can accumulate costs as usage increases. In the proposed Cloudflare configuration, static assets are served without per-request charges, and Workers and D1 have defined included allowances. This makes the sources of cost easier to identify and estimate; it does not guarantee a fixed bill or unlimited service.
According to the Cloudflare documentation checked on November 23, 2026, Workers Free allows 100,000 Worker requests per day, while Workers Paid starts at a minimum of US$5 per month, with charges for usage beyond the included allowances. D1 Free includes 5 million rows read and 100,000 rows written per day. Rows read means rows examined by queries, not merely rows returned to visitors. Indexing and pagination matter, and exceeding Free limits can interrupt service. Workers spending limits do not cap every charge from D1 or other products.
The proposed first version is deliberately small. Visitors can view and submit text without an account. Posts appear newest first, with categories and pagination. Image uploads, user accounts, email alerts, real-time sockets, and a graphical administration panel are out of scope. Categories, maximum post length, page size, expected traffic, retention rules, and a moderation contact are decisions for the operator, not values for the AI to guess.
The implementation must verify Cloudflare Turnstile on the server, limit repeated requests, validate form inputs, escape user-generated text, use parameterized SQL, and protect administrative actions with a secret. The operator also needs procedures to hide posts, suspend submissions, restore service, and eventually close or remove the bulletin board.
The attached JSON is the implementation specification, version 0.3. It is embedded in this HTML document as non-executing JSON under the ID “cloudflare-board-spec” and is also published as a separate JSON file. An AI assistant with webpage access can be given the direct JSON URL; if it cannot fetch that URL, the operator can supply the JSON text instead.
A suggested instruction is: “Read the JSON specification at the URL below. Before writing code, list unresolved operator decisions and estimate Workers and D1 usage. Follow the specified Cloudflare-only architecture and security checks. Provide tests, deployment instructions, and shutdown procedures. Do not publish without operator review.”
This is a template for developing a modest bulletin board, not a verified emergency-information service. Posts may be inaccurate or outdated; users should consult official sources. Before any real deployment, the person operating the site must confirm the latest pricing, security settings, content moderation arrangements, and operational capacity.
Specification JSON (v0.3): Read the implementation specification
Article URL: https://chinoyoshio.com/chinoyoshio-blog/2026-11-23-cloudflare-bulletin-board-specification
Specification URL: https://chinoyoshio.com/chinoyoshio-blog/2026-11-23-cloudflare-bulletin-board-specification.json
Cloudflare documentation (checked November 23, 2026):
Workers pricing / Workersの料金
D1 pricing / D1の料金
Static Assets billing / 静的配信の料金
Rate Limiting binding / レート制限
Turnstile setup / Turnstileの設定
D1 Free limit enforcement / D1無料枠上限
Preparing a Low-Cost Cloudflare Bulletin Board Before an Emergency
急な掲示板の公開に備えて、Cloudflareを前提に仕様を残す
災害時など、短い時間で誰でも書き込める掲示板が必要になることがあります。一方、急いで公開したサービスでアクセスが増え、想定外のサーバー費用が生じた事例も報じられています。ここでは特定の取り組みを取り上げるのではなく、今後、同じようなものを作るときの前提条件を記録しておきます。
AIに「誰でも投稿できる掲示板を作って公開して」とだけ依頼すると、データベースや公開先の課金方式まで、生成された構成に任せることになります。短時間で動くものができても、閲覧や投稿が増えた後の費用を見通せるとは限りません。そこで、実装を依頼する前に公開先と課金方式を決めておくことにしました。
今回の前提は、Cloudflare Workers Static Assetsで画面を静的配信し、投稿の取得・保存はWorkersの小さなAPIで行い、投稿データをD1に保存する構成です。初版では、Cloudflare以外の従量課金データベースやメール・通知サービスなどを、AIが独断で追加しないことも条件にします。
違いの中心は課金方式です。データベースの読み取り回数や下り転送量で課金される構成では、利用が増えるにつれて請求も伸びる可能性があります。Cloudflareのこの構成では、静的アセットの配信にはリクエストごとの料金がかからず、WorkersやD1にはプランに含まれる利用枠があります。そのため費用の増え方を見積もりやすくなりますが、費用が必ず一定額に収まるという意味ではありません。
2026年11月23日に確認したCloudflare公式資料では、Workers Freeの動的リクエストは1日10万回、Workers Paidは月額最低5米ドルからで、枠を超える利用には追加料金があります。D1 Freeには1日500万行の読み取り、10万行の書き込みの上限があります。D1の読み取り行数は画面に表示した件数ではなく、クエリが実際に調べた行数です。インデックスとページ送りの設計が重要で、無料枠を超えると処理が失敗する場合があります。Workersの利用上限設定だけでD1など全項目の請求が制限されるわけでもありません。
最初に作るものは、利用者登録なしで文章を投稿・閲覧できる小さな掲示板に限定します。投稿は新しい順に並べ、カテゴリとページ送りを用意します。画像添付、アカウント、メール通知、リアルタイム通信、管理画面は初版に含めません。カテゴリ名、本文の文字数上限、表示件数、想定アクセス、保存期間、管理担当者や連絡方法などは、運用する人が決める項目として未設定のまま残しています。
公開する以上、投稿の悪用への対策も必要です。Cloudflare Turnstileは画面に置くだけでなくWorkers側で検証し、連続投稿を制限します。入力内容を検証し、投稿文をHTMLとして解釈させず、D1にはパラメータ化クエリを使います。管理用トークンは公開コードに含めずシークレットに置き、投稿の非表示化や投稿受付の停止、復旧、終了時のデータの扱いまで手順を残します。
そのための実装基準を、改訂版の「掲示板型サイト Cloudflare 仕様書」v0.3としてJSONにまとめました。このHTML内にも「cloudflare-board-spec」というIDでJSONを埋め込み、同じ内容のJSONファイルを単独でも公開できる形にしています。Webページを参照できるAIであればURLを渡して依頼できます。URLを読み取れないAIには、JSONの本文を直接渡します。
AIへの指示文の例は「次のURLのJSON仕様書を読んでください。コードを書く前に未決定事項とWorkers・D1の費用試算を報告し、Cloudflare限定の構成と安全対策に従って作成してください。テスト、設置手順、投稿停止・復旧・削除手順まで示し、運用者の確認前には本番公開しないでください」です。
この仕様は、あくまで小規模な掲示板を作るための出発点です。災害時の投稿には、誤った情報や古い情報が混ざる可能性があります。行政・消防・医療機関などの公式情報に代わるものではなく、公開後の確認や削除対応を含め、人による運用が欠かせません。実際に利用する際には、料金や機能の最新条件と運用体制を改めて確認する必要があります。
掲示板仕様書JSON(v0.3):掲示板仕様書を開く
記事URL:https://chinoyoshio.com/chinoyoshio-blog/2026-11-23-cloudflare-bulletin-board-specification
JSON URL:https://chinoyoshio.com/chinoyoshio-blog/2026-11-23-cloudflare-bulletin-board-specification.json
出典:Cloudflare公式資料(2026年11月23日確認)
Workers pricing / Workersの料金
D1 pricing / D1の料金
Static Assets billing / 静的配信の料金
Rate Limiting binding / レート制限
Turnstile setup / Turnstileの設定
D1 Free limit enforcement / D1無料枠上限
AIに「誰でも投稿できる掲示板を作って公開して」とだけ依頼すると、データベースや公開先の課金方式まで、生成された構成に任せることになります。短時間で動くものができても、閲覧や投稿が増えた後の費用を見通せるとは限りません。そこで、実装を依頼する前に公開先と課金方式を決めておくことにしました。
今回の前提は、Cloudflare Workers Static Assetsで画面を静的配信し、投稿の取得・保存はWorkersの小さなAPIで行い、投稿データをD1に保存する構成です。初版では、Cloudflare以外の従量課金データベースやメール・通知サービスなどを、AIが独断で追加しないことも条件にします。
違いの中心は課金方式です。データベースの読み取り回数や下り転送量で課金される構成では、利用が増えるにつれて請求も伸びる可能性があります。Cloudflareのこの構成では、静的アセットの配信にはリクエストごとの料金がかからず、WorkersやD1にはプランに含まれる利用枠があります。そのため費用の増え方を見積もりやすくなりますが、費用が必ず一定額に収まるという意味ではありません。
2026年11月23日に確認したCloudflare公式資料では、Workers Freeの動的リクエストは1日10万回、Workers Paidは月額最低5米ドルからで、枠を超える利用には追加料金があります。D1 Freeには1日500万行の読み取り、10万行の書き込みの上限があります。D1の読み取り行数は画面に表示した件数ではなく、クエリが実際に調べた行数です。インデックスとページ送りの設計が重要で、無料枠を超えると処理が失敗する場合があります。Workersの利用上限設定だけでD1など全項目の請求が制限されるわけでもありません。
最初に作るものは、利用者登録なしで文章を投稿・閲覧できる小さな掲示板に限定します。投稿は新しい順に並べ、カテゴリとページ送りを用意します。画像添付、アカウント、メール通知、リアルタイム通信、管理画面は初版に含めません。カテゴリ名、本文の文字数上限、表示件数、想定アクセス、保存期間、管理担当者や連絡方法などは、運用する人が決める項目として未設定のまま残しています。
公開する以上、投稿の悪用への対策も必要です。Cloudflare Turnstileは画面に置くだけでなくWorkers側で検証し、連続投稿を制限します。入力内容を検証し、投稿文をHTMLとして解釈させず、D1にはパラメータ化クエリを使います。管理用トークンは公開コードに含めずシークレットに置き、投稿の非表示化や投稿受付の停止、復旧、終了時のデータの扱いまで手順を残します。
そのための実装基準を、改訂版の「掲示板型サイト Cloudflare 仕様書」v0.3としてJSONにまとめました。このHTML内にも「cloudflare-board-spec」というIDでJSONを埋め込み、同じ内容のJSONファイルを単独でも公開できる形にしています。Webページを参照できるAIであればURLを渡して依頼できます。URLを読み取れないAIには、JSONの本文を直接渡します。
AIへの指示文の例は「次のURLのJSON仕様書を読んでください。コードを書く前に未決定事項とWorkers・D1の費用試算を報告し、Cloudflare限定の構成と安全対策に従って作成してください。テスト、設置手順、投稿停止・復旧・削除手順まで示し、運用者の確認前には本番公開しないでください」です。
この仕様は、あくまで小規模な掲示板を作るための出発点です。災害時の投稿には、誤った情報や古い情報が混ざる可能性があります。行政・消防・医療機関などの公式情報に代わるものではなく、公開後の確認や削除対応を含め、人による運用が欠かせません。実際に利用する際には、料金や機能の最新条件と運用体制を改めて確認する必要があります。
掲示板仕様書JSON(v0.3):掲示板仕様書を開く
記事URL:https://chinoyoshio.com/chinoyoshio-blog/2026-11-23-cloudflare-bulletin-board-specification
JSON URL:https://chinoyoshio.com/chinoyoshio-blog/2026-11-23-cloudflare-bulletin-board-specification.json
出典:Cloudflare公式資料(2026年11月23日確認)
Workers pricing / Workersの料金
D1 pricing / D1の料金
Static Assets billing / 静的配信の料金
Rate Limiting binding / レート制限
Turnstile setup / Turnstileの設定
D1 Free limit enforcement / D1無料枠上限