Skip to main content

Production-Ready PocketBase Framework

Build robust backend applications with auto-generated OpenAPI documentation, real-time monitoring, structured logging, and GDPR-compliant analytics—all built on PocketBase.

Quick Start

Get up and running with pb-ext in minutes

1

Install Go and pb-ext

Make sure you have Go 1.25.7+ installed, then create your project:
mkdir my-pb-project && cd my-pb-project
go mod init my-pb-project
go get github.com/magooney-loon/pb-ext
2

Create your main.go

Set up your server with the basic configuration:
cmd/server/main.go
package main

import (
    "log"
    app "github.com/magooney-loon/pb-ext/core"
    "github.com/pocketbase/pocketbase/core"
)

func main() {
    srv := app.New(app.InDeveloperMode())
    app.SetupLogging(srv)

    srv.App().OnServe().BindFunc(func(e *core.ServeEvent) error {
        app.SetupRecovery(srv.App(), e)
        return e.Next()
    })

    if err := srv.Start(); err != nil {
        log.Fatal(err)
    }
}
3

Install pb-cli and run

Install the build toolchain and start your server:
go install github.com/magooney-loon/pb-ext/cmd/pb-cli@latest
pb-cli --run-only
Your server will start at http://127.0.0.1:8090. Access the PocketBase admin at /_/ and the pb-ext dashboard at /_/_.

Key Features

Everything you need for production-ready backend services

Auto-Generated API Docs

Generate OpenAPI/Swagger documentation automatically from your Go code using AST parsing—no manual annotations required.

Cron Job Management

Schedule and track background jobs with detailed execution logs, statistics, and a built-in management dashboard.

System Monitoring

Monitor CPU, memory, disk, network, and runtime metrics in real-time with the built-in dashboard.

Structured Logging

Track requests with unique trace IDs, capture errors, and integrate seamlessly with your observability stack.

Visitor Analytics

GDPR-compliant analytics tracking page views, devices, and browsers without storing personal data.

Versioned API Routing

Manage multiple API versions simultaneously with isolated routers, schemas, and OpenAPI specs.

Ready to Build?

Start building production-ready backend services with pb-ext. Follow our quickstart guide or explore the API reference.