No description
  • HTML 45.8%
  • Ruby 39.4%
  • PLpgSQL 9.7%
  • CSS 2.7%
  • JavaScript 1.1%
  • Other 1.3%
Find a file
kontei ea9f5cf63d
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Add Claude usage guide to digest export page
Adds a "Claudeへの渡し方" section matching the turn export page style,
with step-by-step instructions and a copy-paste prompt for generating
the digest novel from full-turn JSON data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 23:34:05 +09:00
.github Initial commit: PBW system implementation 2026-03-29 23:41:43 +09:00
app Add Claude usage guide to digest export page 2026-05-23 23:34:05 +09:00
bin Add Solid Queue configuration and schema 2026-04-19 00:00:16 +09:00
config Allow post authors and admins to delete board posts 2026-05-18 22:02:49 +09:00
db Add turn summary field for player-facing situation overview 2026-05-18 22:46:07 +09:00
docker Update docs to reflect current implementation state (v1.2) 2026-05-18 21:50:05 +09:00
docs Update docs to reflect v1.3 features 2026-05-18 23:01:21 +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 Initial commit: PBW system implementation 2026-03-29 23:41:43 +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
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 GM manual to reflect current features 2026-04-10 13:27:29 +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体
  • ターン行動提出(秘密行動対応)
  • 個人リプライ・共通リプライ・共有イベントの閲覧
  • 配信済みターンでの自分の提出行動確認
  • 掲示板(スレッド・投稿)

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
└── design_draft.md
docker/
├── docker-compose.yml
├── deploy.sh
└── INSTALL.md
docs/
├── gm_manual.md
├── player_guide.md   # /guide で表示されるプレイヤーガイドMarkdown編集可
└── design_draft.md
world_files/
└── {world_files_path}/   # 世界観ごとのディレクトリ
    ├── _icon.{ext}        # 世界観アイコンGM管理画面からアップロード
    ├── _map.{ext}         # エリア地図GM管理画面からアップロード
    └── *.md               # 設定資料集MDファイルGM管理画面からアップロード

ライセンス

Private