Carrier is a framework for bulletin board systems in PHP 8.5: one process serves telnet, SSH, rlogin and a browser terminal at the same time, so a caller on SyncTERM can chat with one in Chrome.
composer create-project carrier/app my-boardNeeds PHP 8.5 (CLI) with the gmp, mbstring, openssl, pdo_sqlite, sodium and pcntl extensions, and Composer 2.

One process for telnet, SSH, rlogin and the web
php carrier serve starts all four listeners in one PHP process, including an SSH server written in PHP. Every caller gets a node and a fiber of their own. Who's online, node pages and the teleconference are shared in memory, so callers on different transports see and talk to each other.
telnet 2323 ─┐ ssh 2222 ─┤ ╔═════════════════════╗ rlogin 2513 ─┼──►║ php carrier serve ║ web 8080 ─┘ ║ ║ ║ 1 telnet Phosphor ║ ║ 2 telnet Ghost ║ ║ 3 web Sysop ║ ║ 4 waiting ║ ╚══════════╤══════════╝ │ teleconference


PHP code and the screens it draws
Screens from the board kit, next to the code or art that draws them.
app/Modules/WhosOnline.php
A module is a class with a handle() method. Each caller runs in their own fiber, so the code reads top to bottom. $session->nodes holds every node in the process, whatever the transport.
final class WhosOnline extends Module
{
protected string $activity = "Checking who's online";
public function handle(Session $session, Terminal $terminal): void
{
$this->header($terminal, $session, "Who's online", 'whosonline');
$terminal->writeln('|08 Node ' . Fmt::cell('Handle', 20) . Fmt::cell('Location', 18) . Fmt::cell('Doing', 26) . 'Via');
$terminal->writeln(Fmt::rule(78));
for ($node = 1; $node <= $session->nodes->maxNodes(); $node++) {
$other = $session->nodes->node($node);
if ($other === null) {
if ($node <= 4) {
$terminal->writeln(sprintf(' |08%4d waiting for a call', $node));
}
continue;
}
$terminal->writeln(sprintf(
' |15%4d %s%s |03%s |07%s |08%s',
$node,
$other === $session ? '|14' : '|11',
Fmt::cell($other->user?->handle ?? '(logging in)', 19),
Fmt::cell($other->user?->location ?? '', 17),
Fmt::cell($other->activity, 25),
strtoupper($other->connection->protocol()),
));
}
$terminal->writeln(Fmt::rule(78));
$terminal->pause();
}
}
matrix.ans
%VM1 in the art marks the first line of the lightbar. The matrix menu in app/Menus.php supplies the four options. %ND, %MN, %AN and %UP are display codes for the node, the number of nodes, callers online and uptime.
░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓ █▄ █ █▀▀▀▀ ▄▀▀▀▄ █▄ █ █▀▀▀▄ ▄▀▀▀▄ ▄▀▀▀▀ █▀▀▀▀ █▄ ▄█ █▀▀▀▀ █▄ █ ▀▀█▀▀ █ ▀▄█ █▀▀▀ █ █ █ ▀▄█ █▀▀▀▄ █▄▄▄█ ▀▀▀▄ █▀▀▀ █ ▀ █ █▀▀▀ █ ▀▄█ █ █ █ █▄▄▄▄ ▀▄▄▄▀ █ █ █▄▄▄▀ █ █ ▄▄▄▄▀ █▄▄▄▄ █ █ █▄▄▄▄ █ █ █ ░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓ Est. 1994. Still online. ╔═╡ Welcome ╞═════════════════╗ ║ ║ ║ %VM1 ║ ║ ║ ║ ║ ║ ║ ║ ║ ╚═════════════════════════════╝ Node %ND of %MN Sysop Sysop Online %AN callers Uptime %UP............... New here? Choose Apply. Already a member? SSH in as your handle.

%VM1 and the display codes are filled in.login.ans
%ET1 and %ET2 mark the handle and password fields. The Login module reads both at those positions, at the width drawn in the art.
░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓ █ ▄▀▀▀▄ ▄▀▀▀▀ ▀█▀ █▄ █ █ █ █ █ ▀█ █ █ ▀▄█ █▄▄▄▄ ▀▄▄▄▀ ▀▄▄▄█ ▄█▄ █ █ ░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓▒▒░░░░▒▒▓▓██▓▓ ╔═╡ Identify yourself ╞═════════════════════════╗ ║ ║ ║ ║ ║ Handle %ET1░░░░░░░░░░░░░░░░░░░░░░░░░░ ║ ║ ║ ║ Password %ET2░░░░░░░░░░░░░░░░░░░░░░░░░░ ║ ║ ║ ║ Type NEW as your handle to apply ║ ╚═══════════════════════════════════════════════╝

Kits
php carrier install <kit> copies a kit's files into the board's app/ and resources/, where they become the board's own code to edit. composer create-project carrier/app installs board and web. After an upgrade, --force replaces the files with the kit's current version.
-
board
The BBS.
app/Menus.php, the config files, the modules (login, messages, e-mail, teleconference, oneliners, voting, bulletins, settings, sysop tools), models, migrations and the default theme.Installed by create-project
php carrier install board -
web
The browser terminal. An xterm.js page with the VGA font, and
app/Web/StatusApi.phpfor the who's online, last callers and oneliners panel beside it.Installed by create-project
php carrier install web -
games
Glowcrawl, Viper and Hi-Lo Casino in
app/Doors/, and The Oracle indoors/fortune/with its entry inapp/Config/doors.config.php.php carrier install games -
amber
A second theme in
resources/themes/amber/, styled after an amber monochrome monitor. Callers choose it in their settings.php carrier install amber
Door games
The games kit adds four doors. Glowcrawl, Viper and Hi-Lo Casino are PHP modules that run inside the board and share high scores between callers. The Oracle is a separate program that the board starts and connects to the caller over stdio.




Native door
A module with a #[Door] attribute. The board discovers it, lists it in the door menu and enforces its node limit and the caller's time left.
#[Door(
'viper',
title: 'Viper',
description: 'The snake game, at 2400 baud speeds.',
order: 2,
)]
final class Viper extends DoorGameExternal door
An entry in app/Config/doors.config.php. The board writes a DOOR32.SYS drop file and pipes the caller to the program. DOOR.SYS, DORINFOn.DEF and CHAIN.TXT are supported too.
new DoorDefinition(
name: 'fortune',
title: 'The Oracle (external door)',
description: 'A separate program reading DOOR32.SYS over stdio.',
command: [PHP_BINARY, root_path('doors/fortune/fortune.php'), '{dropFile}'],
cwd: root_path('doors/fortune'),
dropFile: 'door32',
encoding: 'utf8',
maxNodes: 4,
order: 90,
),Try the demo board
A live Carrier board. Call it in the browser here, or with telnet or SSH. Type new as the handle to apply for an account.
Telnet
telnet carrierbbs.comSSH, as a guest
ssh new@carrierbbs.comStart a board
-
Create it
The starter project installs the board and web kits and seeds message areas, a welcome thread, a poll and a few oneliners.
composer create-project carrier/app my-board -
Start it
One process answers on four ports.
cd my-board php carrier serve -
Call in
Over telnet, SSH or the browser at
http://localhost:8080. The first account you apply for becomes the sysop.telnet localhost 2323
