Import Pattern
All shared packages are imported via the @hn-monorepo/{package} namespace:
import { Button } from "@hn-monorepo/ui/components/button"
import { createAuthConfig } from "@hn-monorepo/auth"
import { stripe } from "@hn-monorepo/billing"
Each package defines an exports field in its package.json to control the public API. Internal dependencies between packages use workspace:*.
Package Categories
Configuration
| Package | Description |
|---|
config | Shared environment validation using t3-env |
config-biome | Shared Biome linting and formatting configuration |
config-typescript | Shared TypeScript compiler configuration |
UI
| Package | Description |
|---|
ui | Shared UI component library built on shadcn/ui |
shared | Shared utilities, hooks, and types used across apps |
Backend and Data
| Package | Description |
|---|
auth | Convex auth provider pattern and wrappers |
billing | Stripe billing integration and subscription logic |
convex-helpers | Convex utility helpers for common operations |
storage | File storage utilities |
api | Shared API utilities |
security | Security utilities |
AI and Integrations
| Package | Description |
|---|
ai | AI provider abstractions (Anthropic, OpenAI, OpenRouter) |
email | Email templates and sending via React Email + Nodemailer |
i18n | Internationalization using next-intl |
analytics | Analytics event tracking abstraction |
monitoring | OpenTelemetry + SigNoz error monitoring |
Planex-Specific
| Package | Description |
|---|
planex-cli | Planex CLI tool |
planex-engine | Core engine for AI blueprint generation |
Other
| Package | Description |
|---|
changelog | Changelog generation utilities |
signage | Digital signage utilities |
testing | Shared test configuration, fixtures, and mocks |
Package Rules
- Packages depend on packages, never on apps —
@hn-monorepo/billing can import @hn-monorepo/analytics, but never from calnexus
- Packages are small and focused — each has a single, clear purpose
- Packages export only what is needed — use
index.ts to control the public API
- Packages are tree-shakeable — export individual functions/components, avoid side effects
- Apps can contain app-specific logic — not everything needs to be a package
Creating a New Package
See Adding Packages for a step-by-step guide.