No description
  • HTML 50.3%
  • Ruby 36.7%
  • PLpgSQL 8.3%
  • CSS 2.3%
  • JavaScript 1.2%
  • Other 1.2%
Find a file
kontei 919336e94f
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
Add dynamic sitemap.xml for Google indexing
- SitemapController: 公開World・非draft Game・delivered Turn・掲示板を収録
- GET /sitemap.xml でXML生成(N+1なし、includes使用)
- robots.txt に Sitemap: ディレクティブを追記

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GG4FuYjPQm4ruymZ9tq2s
2026-07-13 21:37:15 +09:00
.github Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
app Add dynamic sitemap.xml for Google indexing 2026-07-13 21:37:15 +09:00
bin Add Solid Queue configuration and schema 2026-04-19 00:00:16 +09:00
config Add dynamic sitemap.xml for Google indexing 2026-07-13 21:37:15 +09:00
db Add appearing characters to replies with GM checkbox UI and AI import support 2026-06-24 10:51:11 +09:00
docker Add git pull to deploy script 2026-05-27 22:58:58 +09:00
docs Document konvps Nginx outage and DNS-resolution fix (2026-06-23) 2026-06-23 10:54:23 +09:00
lib/tasks Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
log Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
public Add dynamic sitemap.xml for Google indexing 2026-07-13 21:37:15 +09:00
script Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
storage Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
test Add Capybara system tests for player and GM workflows 2026-03-30 14:26:14 +09:00
tmp Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
vendor Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
world_files/sample Add sample world_files Markdown and update INSTALL.md 2026-03-30 21:34:05 +09:00
.dockerignore Add /docker/ to .dockerignore to fix build permission error 2026-05-17 12:51:42 +09:00
.gitattributes Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
.gitignore Update .gitignore and remove temp file 2026-03-30 09:22:25 +09:00
.rubocop.yml Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
.ruby-version Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
CLAUDE.md Update CLAUDE.md to reflect current implementation 2026-06-08 22:23:39 +09:00
config.ru Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
Dockerfile Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
Gemfile Improve OAuth/account edit: fix Google login and restrict editable fields 2026-03-30 10:47:00 +09:00
Gemfile.lock Bump devise from 5.0.3 to 5.0.4 2026-05-10 11:13:26 +00:00
package-lock.json Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
package.json Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
Procfile.dev Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
Rakefile Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
README.md Update README and INSTALL.md to reflect current state 2026-05-25 22:47:38 +09:00

PBWPlay By Web

Web上でPlay By Mail形式のTRPGを運営・プレイするためのシステムです。

概要

  • GMが世界観・シナリオ・ターンを管理し、プレイヤーが行動を提出する
  • AIアシスタントClaudeとの連携でターンリプライを自動生成
  • HotwireTurbo + StimulusによるインタラクティブなUI

技術スタック

カテゴリ 技術
バックエンド Ruby on Rails 8.1 / Ruby 4.0
データベース PostgreSQL 17
フロントエンド HotwireTurbo + Stimulus/ Tailwind CSS
認証 Devise + OmniAuthGoogle / X
Markdown Redcarpet
ページネーション Pagy
ジョブキュー Solid Queue
デプロイ Docker Compose

ドキュメント

ローカル環境のセットアップ

必要条件

  • Ruby 4.0.2
  • PostgreSQL 17ポート: 5433
  • Node.jsTailwind CSS用

セットアップ手順

# 依存関係のインストール
bundle install
npm install

# データベースの作成・マイグレーション・シードデータ投入
bin/rails db:create db:migrate db:seed

# 開発サーバーの起動
bin/rails server

環境変数

.env ファイルをプロジェクトルートに作成し、以下を設定してください。

DATABASE_URL=postgresql://localhost:5433/pbw_development
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=yourpassword

主な機能

プレイヤー向け

  • トップページのPBW紹介文・プレイヤーガイド/guide
  • 世界観・シナリオ閲覧(ログイン不要)
  • 世界観サブヘッダー(アイコン・ナビリンク)が全世界観ページに表示
  • 設定資料集・掲示板・キャラクター一覧・エリア(地図表示対応)・派閥の各ページ
  • キャラクター作成・管理World内最大3体
  • ターン行動提出(秘密行動対応)
  • 個人リプライ・共通リプライ・共有イベントの閲覧
  • 配信済みターンでの自分の提出行動確認
  • 掲示板スレッド・投稿、Markdownプレビュー対応
  • 掲示板への画像添付jpg / png / gif / webp、最大5枚
  • 自分の掲示板投稿の削除

GM向け

  • 世界観World・シナリオGame管理
  • エリア・派閥・キャラクター管理
  • ファイル管理世界観アイコン・エリア地図・設定資料MDファイルのアップロード・削除
  • 設定資料(導入・シナリオ追加説明・ルール)管理
  • 世界状態管理GMのみ非公開フラグ対応
  • ターン管理(受付開始 → 締切 → 配信)
  • ターンごとのリプライ方針・サマリー入力AIへの指示
  • GMイベント・共有イベント管理
  • AIエクスポート / インポートClaude連携
  • 総まとめ小説Digest管理・公開

管理者向け

  • ユーザー管理・ロール変更

本番環境

Docker Compose による構成です。詳細は docker/INSTALL.md を参照してください。

konbaseLAN: app / worker / db / redis
konvpsさくらVPS: Nginx + Let's Encryptリバースプロキシ

ディレクトリ構成(主要部分)

app/
├── controllers/
│   ├── gm/          # GM管理画面コントローラー
│   └── admin/       # 管理者画面コントローラー
├── models/
├── services/
│   ├── ai_export_service.rb   # ターンデータをAI用JSONに変換
│   └── ai_import_service.rb   # AI生成JSONをDBに取り込む
└── views/
    ├── gm/
    └── admin/
docs/
├── gm_manual.md
├── player_guide.md       # /guide で表示されるプレイヤーガイドMarkdown編集可
├── design_draft.md
├── implementation_plan.md
└── scenario_construction_guide.md
docker/
├── docker-compose.yml
├── deploy.sh
└── INSTALL.md
world_files/
└── {world_files_path}/   # 世界観ごとのディレクトリ
    ├── _icon.{ext}        # 世界観アイコンGM管理画面からアップロード
    ├── _map.{ext}         # エリア地図GM管理画面からアップロード
    └── *.md               # 設定資料集MDファイルGM管理画面からアップロード

ライセンス

Private