← Back to archive

Repo of the Day

benallfree/pocketpages: Multi Page App (MPA) framework for PocketBase

Published: Oct 24, 2026

Open repository ↗

Multi Page App (MPA) framework for PocketBase. Contribute to benallfree/pocketpages development by creating an account on GitHub.

Summary

PocketPages is a lightweight EJS templating and routing engine that runs as a PocketBase JavaScript hook, adding a multi-page, server-rendered web layer to PocketBase projects. It supports a PHP-like template workflow while remaining compatible with complementary client-side reactive tools such as AlpineJS and HTMLx.

What it is useful for

PocketPages is useful for engineers who want to build conventional server-rendered pages as part of a PocketBase application rather than rely entirely on a client-side application architecture. The project’s goals include quick prototypes, a simple path from small ideas to larger applications, and an SEO-friendly multi-page platform without needing to manage separate SSR, SSG, or SPA setups.

The EJS syntax provides a familiar alternative for developers accustomed to PHP-style templates. For example, the README places a home page at pb_hooks/pages/index.ejs and renders a greeting with:

<%= `Hello, world!` %>

PocketPages can also serve as the server-rendered foundation in applications that selectively use AlpineJS, HTMLx, or similar tools for browser-side interaction. The README states that pages can render in under 40 ms, although it does not describe the benchmark setup or provide enough detail to reproduce that figure.

How engineers can use it

The documented local setup requires both Bun and PocketBase. Install Bun with the README’s command:

curl -fsSL https://bun.sh/install | bash

Then download the appropriate PocketBase release and place its binary somewhere in PATH.

Start PocketPages from the repository root:

bun dev

In a second terminal, start PocketBase for either the main site package:

cd packages/site
pocketbase serve --dev

or the minimal starter:

cd packages/starters/minimal
pocketbase serve --dev

Once both processes are running, the README says the project can be accessed locally, but it does not specify a local URL or port. Engineers can then build pages in the pb_hooks/pages directory using EJS and the PocketPages router. The repository includes a main site, a minimal starter, documentation, core features, starter kits, and showcases according to its contributing section.

For routing, deployment, and other setup details beyond this local workflow, the README directs users to the project’s official documentation.