OneApp Docs
Packages

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, Input from @repo/ui instead 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:

apps/web/package.json
{
  "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-mobile

Import and use:

app/page.tsx
// 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:

CategoryPackagesPurpose
AI & Machine Learning3LLM integration, agents, observability
Authentication & Security3Better Auth for web and mobile, security utilities
Database & Persistence3Prisma ORM, Redis, Vector DB
UI Components & Theming5React components, universal UI, theming
Content Editors2Rich text and PowerPoint editing
Features5Email, storage, i18n, SEO, feature flags
Analytics1Unified analytics abstraction
Integrations5Third-party service adapters
Core Infrastructure8Types, 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

PackageDescriptionDocumentation
@repo/aiVercel AI SDK v6 wrapper with streaming, tools, RAGView docs →
@repo/ai-oneappOneApp-specific AI agents and orchestrationView docs →
@repo/observabilityMulti-provider monitoring (Sentry, BetterStack)View docs →

Authentication & Security

PackageDescriptionDocumentation
@repo/authBetter Auth integration for Next.js with OAuth, passkeysView docs →
@repo/auth-mobileBetter Auth for React Native with biometrics, Expo pluginView docs →
@repo/securitySecurity utilities, encryption, rate limitingView docs →

Database & Persistence

PackageDescriptionDocumentation
@repo/db-prismaPrisma 7 with Neon Postgres, edge support, migrationsView docs →
@repo/db-upstash-redisRedis client with caching, rate limiting, session storageView docs →
@repo/db-upstash-vectorVector DB for AI embeddings, RAG, semantic searchView docs →

UI Components & Theming

PackageDescriptionDocumentation
@repo/uiReact 19 UI components with Tailwind CSS 4, shadcn/uiView docs →
@repo/uni-uiUniversal components (web + React Native compatible)View docs →
@repo/uni-appUniversal app utilities (navigation, storage, constants)View docs →
@repo/uni-mcpMCP server for UI component installation via Claude CodeView docs →

Content Editors

PackageDescriptionDocumentation
@repo/editor-docRich text editor built on Tiptap with real-time collaborationView docs →
@repo/pptx-editorPowerPoint editor with PPTX export, templatesView docs →

Features

PackageDescriptionDocumentation
@repo/emailEmail service with React Email templates, multi-provider supportView docs →
@repo/storageFile storage with Vercel Blob, Cloudflare R2 adaptersView docs →
@repo/feature-flagsFeature flag management for gradual rolloutsView docs →
@repo/seoSEO utilities, structured data, meta tag generationView docs →
@repo/internationalizationi18n with next-intl, translation managementView docs →

Analytics

PackageDescriptionDocumentation
@repo/analyticsUnified analytics abstraction (PostHog, Segment, Vercel)View docs →

Integrations & 3rd Party

PackageDescriptionDocumentation
@repo/3p-coreProvider core utilities and base typesView docs →
@repo/3p-posthogPostHog analytics provider integrationView docs →
@repo/3p-segmentSegment analytics provider integrationView docs →
@repo/3p-vercelVercel Analytics provider integrationView docs →

Core Infrastructure

PackageDescriptionDocumentation
@repo/configESLint 9, Prettier, TypeScript, Stylelint configsView docs →
@repo/typesBranded types, AsyncResult, utility typesView docs →
@repo/utilsCommon utilities (cn, formatDate, validators)View docs →
@repo/core-utilsAdvanced utilities (async helpers, caching, retry logic)View docs →
@repo/sharedShared constants, enums, configurationView docs →
@repo/qaTesting utilities, mocks, Vitest configsView docs →
@repo/oneapp-sharedOneApp database schema and ORM utilitiesView docs →

Next steps

On this page