Skip to content

Workspace

Overview

Production foundation

Next.js 16 + PocketBase

Build the product, not the plumbing.

A production-minded foundation with a refined interface, typed API boundaries, secure server-side data access, and deployment checks already in place.

request.flow

01 browser.request('/api/health')

02 contract.safeParse(response)

03 presenter.toViewModel(data)

04 interface.render(healthy)

Contract verified38 ms

Foundation snapshot

100%Strict TypeScript
3Explicit layers
0Browser secrets
A11yBuilt in

Clear by design

One request. Three deliberate boundaries.

The browser talks only to its own Next.js server. Next validates and presents the response. PocketBase remains on the private application network.

01Browser boundary

React interface

Responsive Server and Client Components with focused local state.

02Application boundary

Next.js server

Validated routes, use-case services, repositories, and safe presenters.

03Data boundary

PocketBase

Versioned migrations, collection rules, hooks, and isolated persistence.

Production essentials

The important parts are already here.

Every choice is meant to survive the jump from a starter repository to a maintained product.

01Zod + TypeScript

Typed contracts

Versioned schemas protect the handoff between the independent frontend and backend repositories.

02Least privilege

Secure by default

Private backend networking, server-only environment variables, and strict browser headers.

03Verified backups

Recovery ready

PocketBase data stays outside the image and ships with documented snapshot and restore checks.

04Yarn checks

Quality gates

Formatting, linting, type checks, tests, builds, and an end-to-end compatibility handshake.

Deployment model

Separate repositories. One dependable product.

Each codebase keeps its own history, dependencies, and deployment contract while sharing a small versioned API.

  • Independent releases
  • Private data network
  • Health-checked runtime

Live integration

See the contract working.

Frontend to backend handshake

Checking the private PocketBase service…

Same-origin endpoint/api/health