simplebbs / simple-bbs
SQLiteベースのシンプルなボード・スレッド構成BBS
Installs: 2 228
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 5
pkg:composer/simplebbs/simple-bbs
Requires
- php: >=8.1
- twig/twig: ^3.0
- dev-main
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-codex/update-developer-documentation-with-current-specs
- dev-codex/fix-no-such-column-error-for-updated_at
- dev-codex/add-email/password-login-option
- dev-codex-mtg/2025-10-02-01-53-52-restructure-bbs-program-classes
- dev-codex-mtg/2025-10-02-00-35-49-remove-google-login-functionality
- dev-codex-mtg/2025-10-02-00-35-42-remove-google-login-functionality
- dev-codex/fix-class-not-found-error-for-boardcontroller
- dev-codex/fix-boardcontroller-not-found-error
- dev-codex/rename-sample.env-variable-to-shorter-name
- dev-codex/sample.env
- dev-codex/-sample.env-g28da9
- dev-codex/-sample.env-mzc8gu
- dev-codex/-sample.env
- dev-codex/add-environment-configuration-settings
- dev-codex/implement-google-social-login-feature
- dev-codex/fix-class-not-found-error-in-index.php
- dev-codex/refactor-bbs-for-standalone-and-integrated-use
- dev-codex/change-storage-folder-to-.storage
- dev-codex/composer
- dev-codex/create-bbs-structure-with-documentation
This package is auto-updated.
Last update: 2025-12-03 00:16:42 UTC
README
SQLite ベースのシンプルな BBS です。ボード(掲示板)とスレッド(投稿の連なり)を扱うための最小限のクラスだけで構成されています。ボードごとに SQLite のデータベースファイルを分けて保存するため、小規模な掲示板を手軽に設置できます。
インストール
composer require simplebbs/simple-bbs
セットアップ
- Web ルートを
vendor/simplebbs/simple-bbs/publicに向けるか、public/ディレクトリの内容を任意の公開ディレクトリへ配置します。 .storage/ディレクトリを書き込み可能にするか、環境変数STORAGE_PATH(または.envのSTORAGE_PATH) で保存先を指定します。- ブラウザでアクセスすると、ボード作成からスレッド・投稿まで利用できます。
public/index.php では SimpleBBS\Application を生成し、HTTP リクエストを処理します。
クラス概要
SimpleBBS\SimpleBBS- ボード一覧・詳細、スレッド一覧・詳細、スレッド作成、投稿追加・編集を提供します。
SimpleBBS\Admin- ボードの新規作成・更新・削除など管理向けの操作を提供します。
SimpleBBS\Application- クエリパラメータ
routeに基づいて画面を切り替え、Twig テンプレートを描画します。
- クエリパラメータ
例: PHP からの直接利用
use SimpleBBS\Admin;
use SimpleBBS\SimpleBBS;
$storage = __DIR__ . '/bbs-data';
$admin = new Admin($storage);
$bbs = new SimpleBBS($storage);
// ボード作成
$board = $admin->createBoard('雑談', 'general', '自由な話題用ボード');
// スレッド作成
$threadId = $bbs->createThread($board['slug'], 'はじめまして', '管理人', 'よろしくお願いします。');
// 投稿追加
$bbs->addPost($board['slug'], $threadId, '名無しさん', 'こんにちは!');
// 投稿編集
$thread = $bbs->getThread($board['slug'], $threadId);
$firstPostId = $thread['posts'][0]['id'];
$bbs->updatePost($board['slug'], $threadId, $firstPostId, '管理人', '自己紹介スレッドです。');
Application::create() に SimpleBBS や Admin を渡すことで、Web アプリケーションと他システムで同じインスタンスを共有できます。
$app = Application::create($storage, viewsPath: __DIR__ . '/templates');
$app->handle();
必要条件
- PHP 8.1 以上
- SQLite3 拡張
- Composer
ドキュメント
アーキテクチャの詳細は docs/architecture.md を参照してください。