We're in early-stage — get in touch!
MIT Licensed • Open Source • Multi-Cloud

The opinionated backoffice framework for serious teams, software architects, visionary CTOs

Primebrick v3 is an open-source framework that defines infrastructure, architecture, and coding rules according to best practices. MIT license: use it in commercial projects, no strings attached.

MIT License
6+ Deploy targets
Zero vendor lock-in

From schema to production

Everything is an entity — not just your domain models, but settings, configurations, and metadata too. Define your entities, and Primebrick handles the rest: database migrations, API endpoints, RBAC, backoffice UI, tests — all generated following your conventions.

1 Define your entity schema
2 AI generates migration, CRUD API, UI, tests
3 Review, approve, deploy
primebrick@dev: ~ Schema Declaration
# Describe your entity
$ primebrick generate entity Customer
name: string (required)
email: string (unique)
status: enum [active, inactive]
phone: string (optional)
createdAt: timestamp (auto)
# AI generates everything...
✓ Database migration created
→ 00000000000003_create_customers_table.sql
✓ API CRUD endpoints (6 routes)
→ GET /api/v1/customers
→ POST /api/v1/customers
→ PUT /api/v1/customers/:id
→ DELETE /api/v1/customers/:id
✓ RBAC permissions configured
→ customers.read.* (guest, collaborator)
→ customers.* (administrator)
# Review the generated code
$ primebrick review --diff
14 files changed, 847 insertions(+), 0 deletions(-)
✓ Backoffice UI pages generated
→ /admin/customers (list, detail, form)
✓ Test scaffolding (12 tests)
→ unit: 4 | integration: 6 | e2e: 2
✓ OpenAPI spec updated
→ /api/v1/openapi/aggregated.json
# Deploy to production
$ primebrick deploy --env production
Building TypeScript...
Running tests... 12/12 passed ✓
Migrating database...
Registering microservice...
Deploying to Cloudflare Workers...
Health check passed...
🚀 Live at https://api.primebrick.dev/v1/customers
# Verify the deployment
$ curl https://api.primebrick.dev/v1/customers | jq .
status: 200 OK
count: 42 customers
response time: 18ms
$

Multi-cloud, truly.

Your infrastructure, your rules. No vendor lock-in: Primebrick runs identically from your laptop to the enterprise datacenter, from K8s cluster to the public cloud closest to your users.

AWS
Azure
Google Cloud
Alibaba Cloud
Docker
Kubernetes
Self-hosted
Run on your own infrastructure
Cloud-hosted
Deploy to any public cloud
On-Premise
Enterprise datacenter deployment
AI-Native

AI that ships features in minutes, not days.

Primebrick integrates AI directly into the development workflow. Describe a feature in natural language and the AI generates the schema, API endpoints, UI pages, and tests — all following the framework conventions. What used to take days of boilerplate now takes minutes.

Schema-to-page in minutes

Describe your entity, get the database migration, API CRUD, RBAC permissions, and backoffice UI generated automatically.

Convention-aware

The AI knows Primebrick patterns: it generates code that follows your architecture, not generic boilerplate.

Tests included

Every generated feature comes with test scaffolding. Ship with confidence, not with hope.

Agentic Development

Two ways to build. Both are first-class.

Primebrick supports the full spectrum of development workflows. Use your IDE of choice for deep, hands-on coding. Or let AI agents build features directly from the web app — no local environment needed.

// AI-POWERED

Agentic Mode

In-browser AI agents

Describe what you want, approve the plan, and AI agents build it directly in the web app. No local setup, no environment config. From idea to deployed feature without leaving the browser.

🔒 primebrick.dev/agent/cowork
Customer Entity — Session #42
Create a Customer entity with name, email, and status fields
🤖 AI Agent
I'll create the Customer entity. Here's my plan:
1. Schema: name, email, status
2. Migration: 00004_create_customers
3. API: 6 CRUD endpoints
4. RBAC: customers.* permissions
5. UI: list, detail, form pages
6. Tests: 12 scaffolds
Plan ready — 14 files to create/modify:
Ask the agent to build something...Send
// TRADITIONAL

IDE Mode

VS Code, Cursor, Windsurf

Clone, run locally, debug with breakpoints, full control. The traditional developer experience with all the framework conventions enforced by tooling.

entity.schema.ts — Primebrick IDE — Visual Studio Code
entity.schema.ts
router.ts
1// Entity definition
2export const Customer = entity({
3name: string().required(),
4email: string().unique(),
5status: enum(['active']),
6});
7
8// AI generated:
9✓ Migration + API + RBAC + UI + Tests
✓ No problemsUTF-8TypeScriptLn 9, Col 1
Design-Free

Your frontend. Your components. Our conventions.

Primebrick is opinionated about architecture but design-free about UI. Use any component library — vanilla HTML, Svelte, or our own Primebrick UI Library. The micro-frontend architecture lets you build any page with any component, while the framework enforces best practices.

1

Everything is an entity

Settings, configurations, metadata — all entities. The same CRUD, RBAC, and validation patterns apply everywhere.

2

Opinionated but design-free

Best practices enforced by the framework. But you choose the UI: vanilla HTML, Svelte, or our Primebrick UI Library.

3

Primebrick UI Library

Our own component library with best practices built in. Use it directly or as a reference for your own components.

4

Micro-frontend architecture

Like microservices, but for the frontend. Each page is independent, deployable, and can use different component stacks.

A backoffice that starts with its own rules.

Every backoffice starts well and ends in chaos. Primebrick v3 flips the perspective: we start from best practices and enforce them through the framework.

1

Infrastructure as Code

K8s manifests, Helm charts, Terraform templates ready for staging and production.

2

Layered architecture

Clean separation between domain, application, infrastructure, and UI. Testable by construction.

3

Opinionated coding rules

Linting, strict types, mandatory patterns: technical debt is prevented, not paid later.

4

Native observability

OpenTelemetry, structured logging, health-checks integrated from the first commit.

Everything you need. Nothing you don't.

We made the hard decisions once, so your teams don't make them every sprint. Every brick is tested, integrated, and documented.

/ AUTH

Identity & RBAC

OIDC, role management, granular schema-level permissions.

/ DATA

Persistence layer

PostgreSQL: DB server AND vector server for generative AI. Soft-delete, audit fields, bulk operations.

/ UI

Backoffice engine

CRUD, tables, forms, filters generated from domain schemas.

/ OBS

Full observability

OpenTelemetry integrated, tracing, metrics, correlated logs.

/ MULTI

Multi-tenant ready

Logical and physical isolation for thousands of organizations.

/ SDK

Type-safe SDK

TypeScript clients generated from endpoints, end-to-end type safety.

DB + Vector Server

PostgreSQL: your database AND your vector server.

Primebrick uses PostgreSQL not just as a database, but as a vector server for generative AI. No separate vector database to manage. More database support coming soon.

More database support coming soon
Vector similarity search
-- Find similar customers using vector embeddings
SELECT name, email,
embedding <=> $1 AS distance
FROM customers
WHERE status = 'active'
ORDER BY embedding <=> $1
LIMIT 5;
$
Infrastructure

Every component, mapped.

From browser to database — clear ports, protocols, and data flow. Dockerized for local dev, Terraform-ready for production.

HTTPHTTP /api/v1/OAuth2SQL via DALNATSSQL via DALproxy /ws/:codeBrowserAdmin UI / API ClientsSvelteKitport 5173BackendExpress · port 3001Auth · RBAC · Proxy · RegistryCasdoorOAuth2 · port 8000NATSport 4222 · pub/subMSdynamic@primebrick/sdkregistration · NATS · healthPostgreSQLport 5432 + pgvectorsingle data store@primebrick/dalpool · repository · typesDocker
Architecture

Layered by design.

Frontend, Backend, Microservices, Libraries, Data — each layer has a clear responsibility and communicates through defined protocols.

1

Frontend

SvelteKit Admin UI — communicates only with the Backend API

2

Backend

Express API — Auth, RBAC, Service Registry, Proxy

3

Microservices

Independent Docker services — self-register via NATS

4

Libraries

@primebrick/sdk + @primebrick/dal-pg — shared across all services

5

Data

PostgreSQL — single data store, accessed via DAL

Less boilerplate, more value.

Clear structure, objective coding rules, DX designed for speed. Clone, run, and you're already in a best-practice environment — CI/CD, linting, types, tests, observability all ready.

  • Onboarding in hours, not weeks
  • Zero discussions about "how we do things here"
  • Modern, typed, tested stack

Software selection without risk.

MIT license, open and inspectable code, deploy where you decide. Reduce time-to-market and technical debt from minute zero. No vendor lock-in, no contractual surprises.

  • Free commercial use (MIT)
  • Host it where needed: cloud or on-prem
  • Verifiable standards, not promises

Open source. Even for commercial use.

Primebrick v3 is released under the MIT license: you can use, modify, redistribute, and integrate it in commercial products without royalties. Code is public on GitHub, design decisions are documented, contributions are welcome.

Build your next backoffice with the right rules.

Clone the repo, follow the quick-start, and you're in production with an architecture your future developers will thank you for choosing.

Read the architecture