Core Packages
What each @crudy/* package is responsible for.
The framework ships as a small set of focused packages. Apps depend on a subset of them; modules depend on the contract packages only.
Core packages
| Package | Role |
|---|---|
@crudy/backend | Fastify server factory and core API. |
@crudy/frontend | Next.js component library, providers, and middleware. |
@crudy/cli | The crudy command for scaffolding apps and modules. |
@crudy/licensing | License verification and the License class consumed by @crudy/backend. |
@crudy/pgmorbac | Permission helpers and Fastify plugin around the pgmorbac PostgreSQL extension. |
@crudy/ui | Shared React components used by @crudy/frontend and modules. |
@crudy/backend
Exports createCrudyServer({ modules, appConfig }). Owns authentication, the management API (/orgs, /users, /roles, ...), the data API proxy at /data/*, the audit log, the SSE event bridge, background task scheduling, and license enforcement. Re-exports the BackendModule contract type so modules can be authored against a single import.
@crudy/frontend
Exports CrudyProviders, createMiddleware, createNextConfig, and the pre-built pages a scaffolded app re-exports from its app/ directory (HomePage, LoginPage, ModulePage). Also exports the contract type FrontendModule, route resolution, and the hooks modules use to read auth, license, and module state.
@crudy/cli
Implements the crudy create <name> and crudy module create <name> commands. Templates live inside the package and are copied verbatim with a small token substitution pass. Has no runtime dependency on the rest of the framework.
@crudy/licensing
Exports the License class used by @crudy/backend to verify the license file at boot and to resolve module enablement and per-org quotas. Deployments only need the license.lic and license-public.pem files issued by Crudy; nothing in this package is meant to be invoked directly from app code.
@crudy/pgmorbac
A layer around the pgmorbac PostgreSQL extension. Provides Fastify helpers for hasPermission checks and reusable SQL fragments, and ships the morbac schema itself, so the backend applies it as the first migration at boot with no separate extension install step. The standalone extension is published separately for databases that want Multi-OrBAC without the framework.
@crudy/ui
Source-only React components shared between the framework UI and modules. Modules consume it for buttons, cards, tables, and the markdown renderer, so the host can theme everything centrally.
Module packages
Modules live under @crudy-modules/<id>. The framework repo publishes a few first-party ones:
@crudy-modules/documentsis an example record-keeping module with a record quota.@crudy-modules/telemetrycaptures backend events into a separate telemetry database.@crudy-modules/license-adminis the UI for inspecting the current license and its quotas.@crudy-modules/websiteships the marketing site and these docs.@crudy-modules/service-connectorsis a credential vault plus an extension point for outbound integrations.
Each module exports ./backend and ./frontend from its package, so an app picks the half it needs from the same package.