Shared Packages
Browse and learn about all 35 shared packages (@repo/*) that power your OneApp applications with reusable UI
components, utilities, database clients, authentication, AI integration, and more.
Already know what you need?
Why shared packages matter
Building applications without shared packages creates serious problems:
- Code duplication — Same UI components copied across multiple apps with inconsistent styling
- Maintenance nightmare — Fix one bug in 10 places, miss it in the 11th
- No type safety — Types defined separately in each app drift apart over time
- Inconsistent patterns — Each team implements authentication, database access, error handling differently
- Slow development — Every new app rebuilds the same utilities from scratch
- Breaking changes — Update a dependency in one app, forget to update others
OneApp's package system uses pnpm workspaces with the workspace:* protocol — automatically linking internal
packages, providing instant type checking across all apps, and enabling atomic changes across the entire monorepo — so
you build features once and use them everywhere.
Use cases
Master shared packages to:
- Build UI faster — Import
Button,Card,Inputfrom@repo/uiinstead of building from scratch - Ensure consistency — All apps use the same auth flow, database client, error handling
- Share types safely — Branded types prevent ID mix-ups at compile time
- Integrate AI quickly — Pre-configured Vercel AI SDK wrapper with streaming, tool calling, RAG
- Scale teams — Teams work independently but share core infrastructure
- Update atomically — Change a utility function once, all 40+ apps get the update
Quick Start
Using packages in your app
All internal packages use the workspace:* protocol:
{
"name": "web",
"dependencies": {
"@repo/ui": "workspace:*",
"@repo/auth": "workspace:*",
"@repo/db-prisma": "workspace:*",
"@repo/ai": "workspace:*",
"@repo/utils": "workspace:*",
"@repo/types": "workspace:*"
}
}Add packages to your app:
# Add a package (automatically uses workspace:*)
pnpm --filter=web add @repo/ui
pnpm --filter=mobile-app add @repo/auth-mobileImport and use:
// UI Components
import { Button, Card, Input } from "@repo/ui";
// Utilities
import { cn, formatDate, formatCurrency } from "@repo/utils";
// Types
import type { Brand, AsyncResult, UserId } from "@repo/types";
// Database
import { prisma } from "@repo/db-prisma";
// Authentication
import { auth } from "@repo/auth/server";
// AI
import { generateText, streamText } from "@repo/ai";
export default async function HomePage() {
const user = await auth.api.getSession({ headers: await headers() });
return (
<Card>
<h1>Welcome, {user?.user.name}</h1>
<Button>Get Started</Button>
</Card>
);
}Package categories
OneApp's 35 packages are organized into 8 functional categories:
| Category | Packages | Purpose |
|---|---|---|
| AI & Machine Learning | 3 | LLM integration, agents, observability |
| Authentication & Security | 3 | Better Auth for web and mobile, security utilities |
| Database & Persistence | 3 | Prisma ORM, Redis, Vector DB |
| UI Components & Theming | 5 | React components, universal UI, theming |
| Content Editors | 2 | Rich text and PowerPoint editing |
| Features | 5 | Email, storage, i18n, SEO, feature flags |
| Analytics | 1 | Unified analytics abstraction |
| Integrations | 5 | Third-party service adapters |
| Core Infrastructure | 8 | Types, utils, config, QA, shared schemas |
Most commonly used packages:
@repo/ui— React 19 components with Tailwind CSS 4@repo/auth— Better Auth integration for Next.js 16@repo/db-prisma— Prisma 7 with Neon Postgres@repo/ai— Vercel AI SDK v6 wrapper with streaming@repo/types— Branded types and TypeScript utilities@repo/utils— Common utilities (cn, formatters, validators)
Complete package reference
All packages by category
AI & Machine Learning
| Package | Description | Documentation |
|---|---|---|
@repo/ai | Vercel AI SDK v6 wrapper with streaming, tools, RAG | View docs → |
@repo/ai-oneapp | OneApp-specific AI agents and orchestration | View docs → |
@repo/observability | Multi-provider monitoring (Sentry, BetterStack) | View docs → |
Authentication & Security
| Package | Description | Documentation |
|---|---|---|
@repo/auth | Better Auth integration for Next.js with OAuth, passkeys | View docs → |
@repo/auth-mobile | Better Auth for React Native with biometrics, Expo plugin | View docs → |
@repo/security | Security utilities, encryption, rate limiting | View docs → |
Database & Persistence
| Package | Description | Documentation |
|---|---|---|
@repo/db-prisma | Prisma 7 with Neon Postgres, edge support, migrations | View docs → |
@repo/db-upstash-redis | Redis client with caching, rate limiting, session storage | View docs → |
@repo/db-upstash-vector | Vector DB for AI embeddings, RAG, semantic search | View docs → |
UI Components & Theming
| Package | Description | Documentation |
|---|---|---|
@repo/ui | React 19 UI components with Tailwind CSS 4, shadcn/ui | View docs → |
@repo/uni-ui | Universal components (web + React Native compatible) | View docs → |
@repo/uni-app | Universal app utilities (navigation, storage, constants) | View docs → |
@repo/uni-mcp | MCP server for UI component installation via Claude Code | View docs → |
Content Editors
| Package | Description | Documentation |
|---|---|---|
@repo/editor-doc | Rich text editor built on Tiptap with real-time collaboration | View docs → |
@repo/pptx-editor | PowerPoint editor with PPTX export, templates | View docs → |
Features
| Package | Description | Documentation |
|---|---|---|
@repo/email | Email service with React Email templates, multi-provider support | View docs → |
@repo/storage | File storage with Vercel Blob, Cloudflare R2 adapters | View docs → |
@repo/feature-flags | Feature flag management for gradual rollouts | View docs → |
@repo/seo | SEO utilities, structured data, meta tag generation | View docs → |
@repo/internationalization | i18n with next-intl, translation management | View docs → |
Analytics
| Package | Description | Documentation |
|---|---|---|
@repo/analytics | Unified analytics abstraction (PostHog, Segment, Vercel) | View docs → |
Integrations & 3rd Party
| Package | Description | Documentation |
|---|---|---|
@repo/3p-core | Provider core utilities and base types | View docs → |
@repo/3p-posthog | PostHog analytics provider integration | View docs → |
@repo/3p-segment | Segment analytics provider integration | View docs → |
@repo/3p-vercel | Vercel Analytics provider integration | View docs → |
Core Infrastructure
| Package | Description | Documentation |
|---|---|---|
@repo/config | ESLint 9, Prettier, TypeScript, Stylelint configs | View docs → |
@repo/types | Branded types, AsyncResult, utility types | View docs → |
@repo/utils | Common utilities (cn, formatDate, validators) | View docs → |
@repo/core-utils | Advanced utilities (async helpers, caching, retry logic) | View docs → |
@repo/shared | Shared constants, enums, configuration | View docs → |
@repo/qa | Testing utilities, mocks, Vitest configs | View docs → |
@repo/oneapp-shared | OneApp database schema and ORM utilities | View docs → |
Next steps
- Learn workspace architecture: Workspace Architecture →
- Master dependency management: Dependency Management →
- Explore platform apps: Platform Apps →