Features

A comprehensive overview of what Primebrick offers.

Microservices Architecture

  • Service registry with heartbeats and stale-instance detection
  • Round-robin proxy at /ws/:serviceCode for transparent service routing
  • NATS messaging for inter-service communication
  • Each microservice self-registers via @primebrick/sdk
  • RFC 7807 Problem Details for all error responses

RBAC with Casdoor IDP

  • Wildcard-based permissions (e.g. customers.read.*, customers.*)
  • Role mappings stored in database, integrated with Casdoor
  • Admin bypass for is_admin=true users
  • OAuth2 / OIDC support via Casdoor
  • JWT access tokens + refresh token cookies

Type-Safe Data Access Layer

  • Metadata-driven Repository pattern with TypeScript decorators
  • @Entity, @Column, @Key, @Unique, @AuditableField, @DeletableField
  • Soft-delete and audit fields built-in
  • Bulk operations via temp tables (atomic, SQL-injection safe)
  • Native bigint support (INT8_OID), not strings

SvelteKit Frontend

  • Tailwind CSS 4 + shadcn-svelte components
  • Server-side sort, filter, and pagination
  • Snake_case end-to-end (DB → BE → FE, no DTO transformation)
  • Form validation with sveltekit-superforms + Zod

OpenAPI First

  • Every service exposes its OpenAPI spec at /api/openapi.json
  • Backend aggregates all microservice specs into one endpoint
  • Interactive API explorer with Scalar (try-it, code gen, auth)