Most forum software today assumes you have a build pipeline. Discourse wants Ruby, Docker, Redis and Postgres. Flarum is PHP but still needs Composer and a terminal. That is fine for a company running a big community, but it rules out the hosting most small communities actually have: a $2 shared plan with a file manager and a MySQL database.
Flatbb is a flat, lightweight forum I wrote for exactly that case. Plain PHP 8, no framework, no Composer, no build step, MIT licensed. This post is the whole installation, then the part I find more interesting: writing plugins for it with an AI assistant.
What you need
- Any host with PHP 8.1 or newer (
pdo_sqliteorpdo_mysql,mbstring) - A MySQL 5.7+ database, or nothing at all if you use SQLite
- A way to put files on the server: FTP, the hosting file manager, or
unzipover SSH if you have it
Step 1: download and unzip
Get the zip from https://www.flatbb.com/download and unzip it. You get one folder, flatbb-0.1.10/. Rename it to whatever you like or put its contents straight into your web root.
public_html/
index.php
core/
app/
assets/
plugins/
data/ <- config and SQLite file live here, must be writable
uploads/ <- attachments and avatars, must be writable
If your host lets you set the document root, point it at the folder. If not, the root works too; data/ and uploads/ are protected by the bundled .htaccess (Apache) and the nginx rules in the docs.
Step 2: open the URL
Visit your domain. The installer appears:
- Choose the language.
- Choose MySQL (enter host, database, user, password) or SQLite (nothing to enter).
- Create the admin account.
That is the deployment. There is no step 3. The whole thing took under two minutes on a cheap shared plan when I timed it.
What you get
Categories, tags, flat topics with replies, markdown with mentions and attachments, notifications, full-text search (FTS5 on SQLite, FULLTEXT on MySQL), dark mode, a three-column layout that collapses to one on a phone, and an admin panel for users, groups, categories, layout blocks and plugins. Seven language packs ship in the box.
Upgrades are one click: Admin, Tools, Check for updates. The core is a handful of small PHP files you can read in an afternoon, which matters when something breaks on a host you cannot SSH into.
Plugins: one folder, one manifest
Everything beyond the core is a plugin. A plugin is a folder with a plugin.php that returns a manifest: routes, hooks, settings, admin pages, scheduled jobs, and its own tables through helpers that work on both SQLite and MySQL.
<?php
return [
'id' => 'hello',
'name' => 'Hello',
'version' => '1.0.0',
'description' => 'Shows a greeting above the topic list.',
'hooks' => [
'region.home.top' => 'hello_banner',
],
];
function hello_banner(string $html, array $ctx): string
{
return $html . '<div class="hello-banner">' . h(t('Welcome!')) . '</div>';
}
You install a plugin by uploading the zipped folder in Admin, Plugins, or in one click from the marketplace at https://www.flatbb.com/market.
Writing plugins with an AI assistant
Because the plugin API is small, it fits in a single text file: https://www.flatbb.com/dev/plugins.md. That file is the spec, the hook list and the helper reference in one.
The workflow I use:
- Paste the URL above into Claude Code, Codex or Cursor.
- Describe the plugin: what it does, where it shows up, its settings, who may use it.
- Ask for the finished folder as a zip.
- Upload it under Admin, Plugins.
The assistant gets the naming rules (hello_* functions, plugin_hello_* tables, .hello-* CSS), the security rules (escape with h(), never read superglobals, POST plus CSRF for every state change) and the portability rules (no engine-specific SQL) from the same document, so the result usually passes php flatbb plugin:check first time. Every bundled plugin was built this way.
Links
- Download: https://www.flatbb.com/download
- Source on GitHub: https://github.com/nwnuyhs/flatbb
- Plugin marketplace: https://www.flatbb.com/market
- Plugin docs for AI assistants: https://www.flatbb.com/dev/plugins
If you try it, tell me where it breaks. The support forum runs on Flatbb itself, which is the best test I know.
Top comments (1)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.