API REFERENCE

Auto-generated TypeScript API documentation for all 12 packages. Generated with TypeDoc from JSDoc annotations and TypeScript types.

[QUICK REFERENCE]

Key exports from each major package. All functions and classes are fully typed with TypeScript and documented with JSDoc.

[@fabrk/core]

Framework runtime, plugins, middleware, teams, jobs, feature flags

autoWireAuto-wire adapters + stores from config
applyDevDefaultsZero-config dev defaults
createFabrk / initFabrkInitialize the framework
FabrkProviderRoot React context provider
cnTailwind class merge utility
createMiddleware / composeComposable middleware chain
createNotificationManagerNotification system manager
createTeamManagerTeam / org management
createFeatureFlagManagerFeature flag evaluation
createWebhookManagerWebhook dispatch manager
createJobQueueBackground job queue
createComponentRegistryComponent validation registry
[@fabrk/auth]

NextAuth adapter, API keys, MFA (TOTP + backup codes)

createNextAuthAdapterNextAuth integration adapter
generateApiKey / hashApiKeyAPI key generation (SHA-256)
createApiKeyValidatorValidate API keys against store
generateTotpSecretGenerate TOTP secret (RFC 6238)
generateTotpUriGenerate otpauth:// URI for QR codes
verifyTotpVerify a TOTP code
generateBackupCodes / verifyBackupCodeMFA backup code management
withAuth / withApiKey / withAuthOrApiKeyAuth middleware guards
[@fabrk/payments]

Stripe, Polar, Lemon Squeezy payment adapters

createStripeAdapterStripe checkout, subscriptions, webhooks
createPolarAdapterPolar open-source monetization
createLemonSqueezyAdapterLemon Squeezy payment integration
InMemoryPaymentStoreIn-memory store for dev/testing
[@fabrk/ai]

LLM providers, cost tracking, embeddings, streaming, prompts

chatWithOpenAI / chatWithClaude / chatLLM chat completions (streaming supported)
getLLMClientUnified LLM client (OpenAI, Anthropic, Ollama)
AICostTracker / getCostTrackerTrack and budget AI spend per feature
PromptBuilderFluent prompt construction
createPromptTemplate / composePromptsReusable prompt templates
generateEmbeddings / cosineSimilarityVector embeddings and similarity
createTextStream / concatStreamsStreaming response utilities
createAIMiddleware / budgetEnforcementAI request middleware and budget limits
[@fabrk/security]

CSRF, CSP, rate limiting, audit logging, GDPR, bot protection, CORS

createCsrfProtectionCSRF token generation and validation
generateCspHeader / generateNonceContent Security Policy headers
getSecurityHeaders / applySecurityHeadersSecurity header collection
createMemoryRateLimiterIn-memory rate limiting
createUpstashRateLimiterUpstash Redis rate limiting
createAuditLoggerStructured audit event logging
createConsentManagerGDPR consent tracking
anonymizeEmail / anonymizeIp / redactFieldsGDPR data anonymization
detectBot / validateHoneypotBot detection utilities
createCorsHandlerCORS policy handler
escapeHtml / sanitizeUrl / sanitizeSqlInputInput validation and sanitization

[GENERATE LOCALLY]

The API reference is generated from source code using TypeDoc. Run it locally to browse the full documentation:

generate api docs
# Generate markdown API docs
pnpm docs:api

# Output is written to docs/api/
# Browse docs/api/README.md for the index
[NOTE]
Generated docs include all exported functions, interfaces, types, and classes with their JSDoc descriptions and @example blocks.

[PACKAGES]

@fabrk/configZod schemas, type-safe config builder
@fabrk/design-system18 themes, design tokens, mode object
@fabrk/corePlugins, middleware, hooks, teams, jobs, feature flags
@fabrk/aiLLM providers, cost tracking, embeddings, streaming
@fabrk/authNextAuth, API keys, MFA (TOTP + backup codes)
@fabrk/components105+ UI components, charts, AI chat, admin
@fabrk/emailResend adapter, console adapter, 4 templates
@fabrk/paymentsStripe, Polar, Lemon Squeezy adapters
@fabrk/securityCSRF, CSP, rate limiting, audit, GDPR, CORS
@fabrk/storageS3, Cloudflare R2, local filesystem
@fabrk/store-prismaPrisma store adapters for 7 entity types

[TYPEDOC CONFIG]

The TypeDoc configuration lives at typedoc.json in the repository root. It uses the packages entry point strategy to document all workspace packages.

typedoc.json (key options)
{
  "entryPointStrategy": "packages",
  "entryPoints": ["packages/config", "packages/core", ...],
  "out": "docs/api",
  "plugin": ["typedoc-plugin-markdown"],
  "skipErrorChecking": true,
  "excludePrivate": true
}