A pnpm-workspaces monorepo. Each workspace ships as an independently-versioned npm package under @plinth-dev. Split for tree-shaking and selective adoption.
Design rationale per package: https://plinth.run/sdk/.
| Package | Status | Responsibility |
|---|---|---|
@plinth-dev/env |
shipped · pre-release | Zod-validated env vars; fail-fast at module load. |
@plinth-dev/api-client |
shipped · pre-release | Server-only typed fetch wrapper; never throws; RFC 7807 problem+json auto-parse. |
@plinth-dev/authz |
shipped · pre-release | Server-only Cerbos gRPC wrapper; fail-closed Decision; bypass rejected at startup in production. |
@plinth-dev/authz-react |
shipped · pre-release | <PermissionsProvider> / usePermissions() / <Can> / <CanAny> / <CanAll> — batched-check-at-layout. |
@plinth-dev/forms |
shipped · pre-release | Server-action forms with Zod validation; createAction + <FormWrapper> + <FormField> + useFormContext. |
@plinth-dev/tables |
shipped · pre-release | Headless data tables with URL state; <ServerTable> + useTableUrlState + parseTableSearchParams. |
@plinth-dev/otel-web |
shipped · pre-release | Browser OpenTelemetry SDK init; fetch + document-load auto-instrumented; trace propagation to backend. |
Each shipped package has its own package.json, semver pre-release version, README, and minimal dependency surface.
pnpm add @plinth-dev/env @plinth-dev/api-client zodEach package has its own README with copy-paste install + minimal example.
pnpm install # install all workspace deps
pnpm -r build # build all packages
pnpm -r test # run all tests
pnpm typecheck # tsc --noEmit across all packages
pnpm lint # biome check .CI runs pnpm install --frozen-lockfile, then per-package build + test + typecheck on every push.
.
├── package.json # workspace root
├── pnpm-workspace.yaml
├── tsconfig.base.json # shared compiler options
├── biome.json # shared lint/format
└── packages/
├── env/ # @plinth-dev/env
│ ├── package.json
│ ├── tsconfig.json tsup.config.ts vitest.config.ts
│ ├── src/index.ts src/index.test.ts
│ ├── README.md LICENSE
│ └── dist/ # built; gitignored
├── api-client/ # @plinth-dev/api-client
└── tables/ # @plinth-dev/tables (final SDK package)
Each package is independently versioned. Breaking changes within 0.x are batched into minor versions; v1.0 freezes APIs for a year.
sdk-go— the Go SDK.starter-web— Next.js module starter that imports these packages.plinth.run— per-package design docs and tutorials.
MIT — see LICENSE.