# OpenWork Project Dependencies: Complete Guide to the TypeScript Monorepo

> Explore the OpenWork project dependencies within this comprehensive TypeScript monorepo guide. Understand its unique pnpm workspace structure and internal module linking.

- Repository: [Different AI/openwork](https://github.com/different-ai/openwork)
- Tags: deep-dive
- Published: 2026-08-02

---

**OpenWork is a pnpm-powered TypeScript monorepo where runtime dependencies are distributed across workspace packages rather than centralized at the root, with internal modules linked via the `workspace:*` protocol.**

Understanding the OpenWork project dependencies requires examining its distributed architecture, as the different-ai/openwork repository organizes its code as a sophisticated TypeScript monorepo using pnpm workspaces. Unlike traditional repositories that declare all runtime libraries at the root, OpenWork distributes dependencies across individual workspace packages, with the [`dev/package.json`](https://github.com/different-ai/openwork/blob/main/dev/package.json) serving exclusively as a coordination point for build tools and development scripts.

## How the Monorepo Manages Dependencies

In [`dev/package.json`](https://github.com/different-ai/openwork/blob/main/dev/package.json), the repository root defines only development tooling and workspace scripts. No runtime dependencies exist at the top level. Instead, the actual libraries required to run OpenWork are declared in individual package manifests located throughout the `apps/`, `packages/`, and `ee/` directories.

Internal packages reference each other using pnpm's `"workspace:*"` protocol, which creates symlinks between local packages and ensures version consistency across the codebase. External dependencies are installed normally under `"dependencies"` or `"devDependencies"` in each respective [`package.json`](https://github.com/different-ai/openwork/blob/main/package.json).

## Core Application Dependencies

The bulk of OpenWork's runtime dependencies reside in the main application package, with specialized subsets living in the shared UI library and enterprise backend services.

### @openwork/app: The Primary UI Package

Located at [`apps/app/package.json`](https://github.com/different-ai/openwork/blob/main/apps/app/package.json), this package contains the core web and desktop UI dependencies:

- **AI and Editor SDKs**: `@ai-sdk/react`, `@opencode-ai/sdk`, `@codemirror/*`, `@lexical/react`, `lexical`, `ai`
- **UI Frameworks**: `@base-ui/react`, `@radix-ui/*`, `@heroicons/react`, `lucide-react`, `shadcn`, `cmdk`
- **Styling and Animation**: `@paper-design/shaders-react`, `motion`, `class-variance-authority`, `tailwind-merge`, `tw-animate-css`, `clsx`
- **State and Data Management**: `@tanstack/react-query`, `@tanstack/react-virtual`, `zustand`, `fuzzysort`, `xlsx`, `jsonc-parser`
- **Content Rendering**: `marked`, `marked-emoji`, `marked-katex-extension`, `marked-shiki`, `shiki`, `@shikijs/transformers`, `katex`, `dompurify`, `emojilib`, `remark-breaks`, `remark-gfm`
- **Terminal and Routing**: `@xterm/*`, `react-router-dom`, `react-resizable-panels`
- **Core React Ecosystem**: `react`, `react-dom`, `boring-avatars`, `sonner`

### @openwork/ui: Shared Component Library

The UI library at [`packages/ui/package.json`](https://github.com/different-ai/openwork/blob/main/packages/ui/package.json) provides reusable components with minimal external dependencies:

- `@paper-design/shaders`
- `@paper-design/shaders-react`

Other packages import these components using the workspace protocol:

```tsx
import { Button } from '@openwork/ui/react'

export default function MyPage() {
  return <Button onClick={() => alert('Hello')}>Click me</Button>
}

```

### @openwork-ee/den-db: Database ORM Layer

The enterprise backend service in [`ee/packages/den-db/package.json`](https://github.com/different-ai/openwork/blob/main/ee/packages/den-db/package.json) handles database operations:

- `@planetscale/database`
- `drizzle-orm`
- `mysql2`
- Internal references: `@openwork/types`, `@openwork-ee/utils`

This package wraps Drizzle ORM for the Den backend service:

```ts
import { createDenDb } from '@openwork-ee/den-db'

const db = await createDenDb({
  url: process.env.DATABASE_URL!,
  encryptionKey: process.env.DEN_DB_ENCRYPTION_KEY!
})

// Example query
const orgs = await db.select().from(db.org).where(eq(db.org.id, 1))

```

## Development and Build Tooling

While runtime dependencies live in individual packages, the root [`dev/package.json`](https://github.com/different-ai/openwork/blob/main/dev/package.json) coordinates the build process using:

- **TypeScript**: For type checking across the monorepo
- **tsup**: For bundling individual packages
- **vite**: For running the development server and building the app
- **turbo**: For task orchestration and build caching

These tools are installed at the root and shared across workspaces during development.

## Installing Dependencies in the OpenWork Project

To set up the complete dependency tree:

```bash

# Install all workspace dependencies (pnpm resolves internal workspaces automatically)

pnpm install

# Start the UI in development mode

pnpm dev

```

The `pnpm install` command installs all external dependencies while simultaneously linking internal packages via the `workspace:*` protocol, creating a unified `node_modules` structure that deduplicates identical versions across the monorepo.

## Summary

- **OpenWork** is a TypeScript monorepo using pnpm workspaces with no runtime dependencies at the root level.
- **Main runtime dependencies** are declared in [`apps/app/package.json`](https://github.com/different-ai/openwork/blob/main/apps/app/package.json) and include React, AI SDKs, CodeMirror, Lexical, and Tailwind-related tools.
- **Internal linking** uses the `"workspace:*"` protocol to connect packages like `@openwork/ui` and `@openwork-ee/den-db`.
- **Database layer** dependencies in [`ee/packages/den-db/package.json`](https://github.com/different-ai/openwork/blob/main/ee/packages/den-db/package.json) include Drizzle ORM and PlanetScale drivers.
- **Development tooling** (TypeScript, Vite, Turbo, tsup) is managed at the root in [`dev/package.json`](https://github.com/different-ai/openwork/blob/main/dev/package.json).

## Frequently Asked Questions

### Where are the main runtime dependencies declared in OpenWork?

The primary runtime dependencies are declared in [`apps/app/package.json`](https://github.com/different-ai/openwork/blob/main/apps/app/package.json) under the `@openwork/app` workspace. This includes all React-related libraries, AI SDKs, editor components, and UI frameworks required to run the application.

### How do internal packages reference each other in the OpenWork monorepo?

Internal packages use pnpm's `"workspace:*"` protocol in their [`package.json`](https://github.com/different-ai/openwork/blob/main/package.json) files. For example, `@openwork/app` references `@openwork/ui` and `@openwork/types` using `"workspace:*"` links, which ensures all internal code comes from the local filesystem rather than npm registries.

### What database technologies does OpenWork depend on?

According to the source code in [`ee/packages/den-db/package.json`](https://github.com/different-ai/openwork/blob/main/ee/packages/den-db/package.json), OpenWork uses **Drizzle ORM** with **MySQL2** drivers and **PlanetScale** database connections for its enterprise backend services, wrapped in a custom `@openwork-ee/den-db` package.

### Does OpenWork have any dependencies at the repository root?

No. The root [`dev/package.json`](https://github.com/different-ai/openwork/blob/main/dev/package.json) contains only development dependencies and build scripts. All runtime libraries are distributed across individual workspace packages, following the pnpm workspaces best practice of decentralizing runtime dependencies.