Package Map
A directory of every package and what it owns.
Last updated on
3 min readEvery workspace package in one place: what it owns, what it exports, and where the deep dive lives. For the visual repo tour, see Project Structure. For a subsystem narrative, follow the deep-dive link in each row.
Apps
The product app and this docs site.
Core spine
Schemas, sessions, and the typed API contract everything leans on.
Product capabilities
Single-responsibility SaaS subsystems behind stable interfaces.
UI
shadcn-style primitives, theme tokens, and shared icons.
Apps
apps/web
The Next.js product app: marketing, auth, dashboard, billing, AI chat, and the application API. Hosts every customer-facing route.
apps/docs
The Fumadocs documentation site you're reading now. Mounts every MDX page under content/docs/.
Core Spine
The packages everything else builds on: schemas, sessions, and the typed API contract.
| Package | Owns | Public exports | Deep dive |
|---|---|---|---|
@syntaxkit/database | Prisma schema, generated client, and the multi-domain models (auth, billing, AI, effects). | ., ./health | Database |
@syntaxkit/auth | Better Auth: sessions, OAuth, 2FA, passkeys, the organization plugin, hooks, permissions, and the bootstrap-admin script. | ., ./server, ./client, ./permissions, ./utils, ./bootstrap-admin | Authentication |
@syntaxkit/api | The oRPC router, the middleware chain (authorized, withActiveOrganization, withPermission, requireAdmin), guards, and lib helpers. | ., ./client (type-only re-export of Router) | API |
@syntaxkit/shared | Cross-package primitives: Zod schemas, abuse policies, env and setup helpers, test fixtures, Vitest defaults. | ., ./testing | Working With The Codebase |
Product Capabilities
Single-responsibility packages, each owning one SaaS subsystem behind a stable interface. Extend or swap one without touching the rest.
| Package | Owns | Public exports | Deep dive |
|---|---|---|---|
@syntaxkit/payments | Stripe billing: checkout, portal, subscription sync, the idempotent webhook handler, plan catalog, and drift reporter. | ., ./server, ./config, ./types, ./stripe/client, ./stripe/checkout, ./stripe/portal, ./stripe/subscription, ./stripe/webhook | Billing, Webhooks And Async Workflows |
@syntaxkit/storage | The upload subsystem: S3-compatible client, object-key conventions, upload policy (size/MIME/schemas), the sharp image pipeline, presign + finalize orchestration, cleanup, and the useFileUpload hook. | ., ./policy, ./hooks | Storage |
@syntaxkit/email | sendEmail transport (log / noop / plunk), renderEmail, and the React Email template barrel. | ., ./templates | |
@syntaxkit/i18n | Locale registry, localeLabels, path builders (withLocalePrefix, getLoginPath, …), and validation helpers. | ., ./config | Internationalization |
@syntaxkit/analytics | PostHog client/server wrappers, the typed event catalog (16 events), and the OpenTelemetry-backed log helper. | ./client, ./server, ./events, ./logger | Analytics, Monitoring |
UI
| Package | Owns | Public exports | Deep dive |
|---|---|---|---|
@syntaxkit/ui | shadcn/ui-style primitives copied into the workspace, Tailwind v4 theme tokens, the cn helper, and shared icons re-exported from lucide-react. | ./components/*, ./hooks/*, ./lib/* (cn at ./lib/utils), ./styles/* (./styles/globals.css), ./icons | Customization |
The wildcard exports (./components/*, ./hooks/*) make every component and hook its own import path. Add a primitive and import it via @syntaxkit/ui/components/<name>, no barrel to edit.
Dev-Only Configs
Shared tooling presets every package extends. No runtime surface, no deep-dive page.
| Package | Owns | Public exports |
|---|---|---|
@syntaxkit/typescript-config | Shared TypeScript configs. | ./base.json, ./nextjs.json, ./react-library.json |
@syntaxkit/eslint-config | Shared ESLint configs. | ./base, ./nextjs, ./react-library |
Where To Go Next
Project Structure
The visual repo map this page complements.
Working With The Codebase
The conventions every package follows: kebab-case files, cn / cva, type-only re-exports.
Commands And Scripts
The per-package and root-level scripts each package exposes.
