Packages and imports

Most app code imports Beignet through @beignet/core subpaths. This page maps each app responsibility to the core subpath, integration package, or provider package that provides it.

Alpha software: All published Beignet packages are in the experimental 0.0.x alpha line. APIs and package boundaries may change between releases.

ResponsibilityImport path
Contracts@beignet/core/contracts
Server runtime@beignet/core/server
Web Fetch adapter@beignet/web
Web Fetch route testing@beignet/web/testing
Next.js adapter@beignet/next
Typed HTTP client@beignet/core/client
Use cases@beignet/core/application
Operational task definitions@beignet/core/tasks
Ports, audit logging, redaction, cache, storage, and test adapters@beignet/core/ports and @beignet/core/ports/testing
Provider lifecycle and instrumentation@beignet/core/providers
Domain helpers@beignet/core/domain
App errors@beignet/core/errors
Environment config@beignet/core/config
Event definitions and listeners@beignet/core/events
Job definitions and inline dispatch@beignet/core/jobs
Mail port and memory adapter@beignet/core/mail
Notification definitions, dispatchers, and test adapters@beignet/core/notifications
Durable outbox helpers@beignet/core/outbox
Payments port and memory adapter@beignet/core/payments
Error reporting port and memory adapter@beignet/core/error-reporting
Feature flag definitions and adapters@beignet/core/flags
Schedule primitives@beignet/core/schedules
Upload definitions, router, signer port, and test signer@beignet/core/uploads
Browser upload client@beignet/core/uploads/client
Pagination types and normalizers@beignet/core/pagination
Test factories and seeds@beignet/core/testing
OpenAPI generation@beignet/core/openapi
App scaffoldingcreate-beignet (run as bun create beignet, never imported)
CLI and generators@beignet/cli
Local request, provider, and audit timeline@beignet/devtools
TanStack Query integration@beignet/react-query
React Hook Form integration@beignet/react-hook-form
React upload hooks@beignet/react-uploads
URL state integration@beignet/nuqs

Provider packages

Provider packages adapt common services to app-owned ports. They are named provider-<capability>-<implementation>; when an implementation spans multiple database backends, each backend is a subpath export, so the Drizzle package ships @beignet/provider-db-drizzle/sqlite, /postgres, and /mysql:

ServicePackage
Better Auth@beignet/provider-auth-better-auth
Drizzle database@beignet/provider-db-drizzle
Memory event bus@beignet/provider-event-bus-memory
Inngest jobs@beignet/provider-inngest
Pino logging@beignet/provider-logger-pino
Resend mail@beignet/provider-mail-resend
SMTP mail@beignet/provider-mail-smtp
Stripe payments@beignet/provider-payments-stripe
OpenFeature flags@beignet/provider-flags-openfeature
Sentry error reporting@beignet/provider-error-reporting-sentry
Local storage@beignet/provider-storage-local
S3-compatible storage@beignet/provider-storage-s3
Redis@beignet/provider-redis
Upstash rate limiting@beignet/provider-rate-limit-upstash

Installation pattern

Start apps with the create-beignet package:

bun create beignet my-app

Generated apps include @beignet/cli as a dev dependency and a beignet package script, so maintenance commands run as bun beignet <command>.

Add packages when the app enables the corresponding capability:

bun add @beignet/core zod
bun add @beignet/web # Web Fetch runtimes
bun add @beignet/next # Next.js apps
bun add @beignet/react-query @tanstack/react-query
bun add @beignet/react-uploads
bun add @beignet/devtools

Use the generated API reference for exact public export signatures. Use package READMEs — rendered on each package's page in the @beignet npm org — for package-level setup notes, and use the docs site for app architecture and production workflow.