# Trace: Understanding the Codebase and Assistant Model

Agent: opencode | Model: composer-2 | Project: documenso

---

## User

tell me about the codebase

## Assistant


Exploring the repository structure and key configuration files to summarize the codebase.

## Assistant

### Tool: read

**Args:**
```json
{
  "filePath": "/Users/duncan/dev/documenso"
}
```

## Assistant

**Result** (success):
```
<path>/Users/duncan/dev/documenso</path>
<type>directory</type>
<entries>
.agents/
.claude/
.codex/
.cursorrules
.devcontainer/
.dockerignore
.DS_Store
.editorconfig
.env.example
.env.local
.eslintignore
.eslintrc.cjs
.git/
.github/
.gitignore
.gitpod.yml
.husky/
.local-hooks/
.npmrc
.opencode/
.prettierignore
.turbo/
.vscode/
.well-known/
AGENTS.md
apps/
ARCHITECTURE.md
assets/
bun.lock
CLA.md
CLAUDE.md
CODE_OF_CONDUCT.md
CODE_STYLE.md
commitlint.config.cjs
CONTRIBUTING.md
crowdin.yml
docker/
LICENSE
lingui.config.ts
lint-staged.config.cjs
MANIFEST.md
node_modules/
package-lock.json
package.json
packages/
patches/
prettier.config.cjs
railway.toml
README.md
render.yaml
scripts/
SIGNING.md
tsconfig.eslint.json
turbo.json
WRITING_STYLE.md

(55 entries)
</entries>
```

## Assistant

### Tool: read

**Args:**
```json
{
  "filePath": "/Users/duncan/dev/documenso/package.json"
}
```

## Assistant

**Result** (success):
```
<path>/Users/duncan/dev/documenso/package.json</path>
<type>file</type>
<content>1: {
2:   "private": true,
3:   "name": "@documenso/root",
4:   "workspaces": [
5:     "apps/*",
6:     "packages/*"
7:   ],
8:   "version": "2.8.1",
9:   "scripts": {
10:     "postinstall": "patch-package",
11:     "build": "turbo run build",
12:     "dev": "npm run translate:compile && turbo run dev --filter=@documenso/remix",
13:     "dev:remix": "npm run translate:compile && turbo run dev --filter=@documenso/remix",
14:     "dev:docs": "turbo run dev --filter=@documenso/docs",
15:     "dev:openpage-api": "turbo run dev --filter=@documenso/openpage-api",
16:     "start": "turbo run start --filter=@documenso/remix --filter=@documenso/docs --filter=@documenso/openpage-api",
17:     "lint": "turbo run lint",
18:     "lint:fix": "turbo run lint:fix",
19:     "format": "prettier --write \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts,mdx}\"",
20:     "prepare": "husky && husky install || true",
21:     "commitlint": "commitlint --edit",
22:     "clean": "turbo run clean && rimraf node_modules",
23:     "d": "npm run dx && npm run translate:compile && npm run dev",
24:     "dx": "npm ci && npm run dx:up && npm run prisma:migrate-dev && npm run prisma:seed",
25:     "dx:up": "docker compose -f docker/development/compose.yml up -d",
26:     "dx:down": "docker compose -f docker/development/compose.yml down",
27:     "ci": "turbo run build --filter=@documenso/remix && turbo run test:e2e",
28:     "prisma:generate": "npm run with:env -- npm run prisma:generate -w @documenso/prisma",
29:     "prisma:migrate-dev": "npm run with:env -- npm run prisma:migrate-dev -w @documenso/prisma",
30:     "prisma:migrate-deploy": "npm run with:env -- npm run prisma:migrate-deploy -w @documenso/prisma",
31:     "prisma:migrate-reset": "npm run with:env -- npm run prisma:migrate-reset -w @documenso/prisma",
32:     "prisma:seed": "npm run with:env -- npm run prisma:seed -w @documenso/prisma",
33:     "prisma:studio": "npm run with:env -- npm run prisma:studio -w @documenso/prisma",
34:     "with:env": "dotenv -e .env -e .env.local --",
35:     "reset:hard": "npm run clean && npm i && npm run prisma:generate",
36:     "precommit": "npm install && git add package.json package-lock.json",
37:     "trigger:dev": "npm run with:env -- npx trigger-cli dev --handler-path=\"/api/jobs\"",
38:     "inngest:dev": "inngest dev -u http://localhost:3000/api/jobs",
39:     "make:version": "npm version --workspace @documenso/remix --include-workspace-root --no-git-tag-version -m \"v%s\"",
40:     "translate": "npm run translate:extract && npm run translate:compile",
41:     "translate:extract": "lingui extract --clean",
42:     "translate:compile": "lingui compile"
43:   },
44:   "packageManager": "npm@10.7.0",
45:   "engines": {
46:     "npm": ">=10.7.0",
47:     "node": ">=22.0.0"
48:   },
49:   "devDependencies": {
50:     "@commitlint/cli": "^20.1.0",
51:     "@commitlint/config-conventional": "^20.0.0",
52:     "@datadog/pprof": "^5.13.5",
53:     "@lingui/cli": "^5.6.0",
54:     "@prisma/client": "^6.19.0",
55:     "@trpc/client": "11.8.1",
56:     "@trpc/react-query": "11.8.1",
57:     "@trpc/server": "11.8.1",
58:     "@ts-rest/core": "^3.52.1",
59:     "@ts-rest/open-api": "^3.52.1",
60:     "@ts-rest/serverless": "^3.52.1",
61:     "dotenv": "^17.2.3",
62:     "dotenv-cli": "^11.0.0",
63:     "eslint": "^8.57.0",
64:     "husky": "^9.1.7",
65:     "inngest-cli": "^1.16.1",
66:     "lint-staged": "^16.2.7",
67:     "nanoid": "^5.1.6",
68:     "nodemailer": "^7.0.10",
69:     "pdfjs-dist": "5.4.296",
70:     "pino": "^9.14.0",
71:     "pino-pretty": "^13.1.2",
72:     "playwright": "1.56.1",
73:     "prettier": "^3.6.2",
74:     "prisma": "^6.19.0",
75:     "prisma-extension-kysely": "^3.0.0",
76:     "prisma-json-types-generator": "^3.6.2",
77:     "prisma-kysely": "^2.3.0",
78:     "rimraf": "^6.1.2",
79:     "superjson": "^2.2.5",
80:     "syncpack": "^14.0.0-alpha.27",
81:     "turbo": "^1.13.4",
82:     "vite": "^7.2.4",
83:     "vite-plugin-static-copy": "^3.1.4",
84:     "zod-openapi": "^4.2.4",
85:     "zod-prisma-types": "3.3.5"
86:   },
87:   "dependencies": {
88:     "@ai-sdk/google-vertex": "3.0.81",
89:     "@documenso/prisma": "*",
90:     "@libpdf/core": "^0.3.3",
91:     "@lingui/conf": "^5.6.0",
92:     "@lingui/core": "^5.6.0",
93:     "@prisma/extension-read-replicas": "^0.4.1",
94:     "ai": "^5.0.104",
95:     "cron-parser": "^5.5.0",
96:     "luxon": "^3.7.2",
97:     "patch-package": "^8.0.1",
98:     "posthog-node": "4.18.0",
99:     "react": "^18",
100:     "typescript": "5.6.2",
101:     "zod": "^3.25.76"
102:   },
103:   "overrides": {
104:     "lodash": "4.17.23",
105:     "pdfjs-dist": "5.4.296",
106:     "typescript": "5.6.2",
107:     "zod": "$zod",
108:     "fumadocs-mdx": {
109:       "zod": "^4.3.5"
110:     }
111:   }
112: }

(End of file - total 112 lines)
</content>
```

## Assistant

### Tool: read

**Args:**
```json
{
  "filePath": "/Users/duncan/dev/documenso/ARCHITECTURE.md",
  "limit": 120
}
```

## Assistant

**Result** (success):
```
<path>/Users/duncan/dev/documenso/ARCHITECTURE.md</path>
<type>file</type>
<content>1: # Documenso Architecture
2: 
3: This document provides a high-level overview of the Documenso codebase to help humans and agents understand how the application is structured.
4: 
5: ## Overview
6: 
7: Documenso is an open-source document signing platform built as a **monorepo** using npm workspaces and Turborepo. The application enables users to create, send, and sign documents electronically.
8: 
9: ```
10: ┌─────────────────────────────────────────────────────────────────────────────┐
11: │                              Remix App (Hono Server)                        │
12: │                                 apps/remix                                  │
13: ├─────────────┬─────────────┬─────────────┬─────────────┬─────────────────────┤
14: │  /api/v1/*  │  /api/v2/*  │ /api/trpc/* │ /api/jobs/* │   React Router UI   │
15: │  (ts-rest)  │   (tRPC)    │   (tRPC)    │  (Jobs API) │                     │
16: ├─────────────┴─────────────┴─────────────┴─────────────┴─────────────────────┤
17: │                                                                             │
18: │  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────────────┐    │
19: │  │  @api   │  │  @trpc  │  │  @lib   │  │  @email │  │    @signing     │    │
20: │  │ (REST)  │  │  (RPC)  │  │  (CORE) │  │         │  │                 │    │
21: │  └─────────┘  └─────────┘  └────┬────┘  └─────────┘  └─────────────────┘    │
22: │                                 │                                           │
23: │              ┌──────────────────┼──────────────────┐                        │
24: │              │                  │                  │                        │
25: │         ┌────▼────┐       ┌─────▼─────┐      ┌─────▼─────┐                  │
26: │         │ Storage │       │   Jobs    │      │    PDF    │                  │
27: │         │Provider │       │  Provider │      │  Signing  │                  │
28: │         └────┬────┘       └─────┬─────┘      └─────┬─────┘                  │
29: │              │                  │                  │                        │
30: └──────────────┼──────────────────┼──────────────────┼────────────────────────┘
31:                │                  │                  │
32:         ┌──────┴──────┐    ┌──────┴──────┐    ┌──────┴──────┐
33:         │  Database   │    │   Inngest/  │    │ Google KMS/ │
34:         │     S3      │    │    Local    │    │    Local    │
35:         └─────────────┘    └─────────────┘    └─────────────┘
36: ```
37: 
38: ## Monorepo Structure
39: 
40: ### Applications (`apps/`)
41: 
42: | Package                    | Description                                              | Port |
43: | -------------------------- | -------------------------------------------------------- | ---- |
44: | `@documenso/remix`         | Main application - React Router (Remix) with Hono server | 3000 |
45: | `@documenso/documentation` | Documentation site (Next.js + Nextra)                    | 3002 |
46: | `@documenso/openpage-api`  | Public analytics API                                     | 3003 |
47: 
48: ### Core Packages (`packages/`)
49: 
50: | Package              | Description                                               |
51: | -------------------- | --------------------------------------------------------- |
52: | `@documenso/lib`     | Core business logic (server-only, client-only, universal) |
53: | `@documenso/trpc`    | tRPC API layer with OpenAPI support (API V2)              |
54: | `@documenso/api`     | REST API layer using ts-rest (API V1)                     |
55: | `@documenso/prisma`  | Database layer (Prisma ORM + Kysely)                      |
56: | `@documenso/ui`      | UI component library (Shadcn + Radix + Tailwind)          |
57: | `@documenso/email`   | Email templates and mailer (React Email)                  |
58: | `@documenso/auth`    | Authentication (OAuth via Arctic, WebAuthn/Passkeys)      |
59: | `@documenso/signing` | PDF signing (Local P12, Google Cloud KMS)                 |
60: | `@documenso/ee`      | Enterprise Edition features                               |
61: | `@documenso/assets`  | Static assets                                             |
62: 
63: ### Supporting Packages
64: 
65: | Package                      | Description               |
66: | ---------------------------- | ------------------------- |
67: | `@documenso/app-tests`       | E2E tests (Playwright)    |
68: | `@documenso/eslint-config`   | Shared ESLint config      |
69: | `@documenso/prettier-config` | Shared Prettier config    |
70: | `@documenso/tailwind-config` | Shared Tailwind config    |
71: | `@documenso/tsconfig`        | Shared TypeScript configs |
72: 
73: ## Tech Stack
74: 
75: | Category | Technology                        |
76: | -------- | --------------------------------- |
77: | Frontend | React 18, React Router v7 (Remix) |
78: | Server   | Hono                              |
79: | Database | PostgreSQL 15, Prisma, Kysely     |
80: | API      | tRPC, ts-rest, OpenAPI            |
81: | Styling  | Tailwind CSS, Radix UI, Shadcn UI |
82: | Auth     | Arctic (OAuth), WebAuthn/Passkeys |
83: | Email    | React Email, Nodemailer           |
84: | Jobs     | Inngest / Local                   |
85: | Storage  | S3-compatible / Database          |
86: | PDF      | @libpdf/core, pdfjs-dist          |
87: | i18n     | Lingui                            |
88: | Build    | Turborepo, Vite                   |
89: | Testing  | Playwright                        |
90: 
91: ## API Architecture
92: 
93: ### API V1 (Deprecated)
94: 
95: - **Location**: `packages/api/v1/`
96: - **Framework**: ts-rest (contract-based REST)
97: - **Mount**: `/api/v1/*`
98: - **Auth**: API Token (Bearer header)
99: - **Status**: Deprecated but maintained
100: 
101: **Routes** (RESTful pattern):
102: 
103: - `GET/POST/DELETE /api/v1/documents/*`
104: - `GET/POST/DELETE /api/v1/templates/*`
105: - Recipients and fields nested under documents
106: 
107: ### API V2 (Current)
108: 
109: - **Location**: `packages/trpc/server/`
110: - **Framework**: tRPC with trpc-to-openapi
111: - **Mount**: `/api/v2/*`, `/api/v2-beta/*`
112: - **Auth**: API Token or Session Cookie
113: - **Status**: Active
114: 
115: **Routes** (action-based pattern):
116: 
117: - `GET/POST /api/v2/document/*` - Document operations
118: - `GET/POST /api/v2/template/*` - Template operations
119: - `GET/POST /api/v2/envelope/*` - Envelope operations (multi-document)
120: - `GET/POST /api/v2/folder/*` - Folder management

(Showing lines 1-120 of 359. Use offset=121 to continue.)
</content>
```

## Assistant

### Tool: read

**Args:**
```json
{
  "filePath": "/Users/duncan/dev/documenso/turbo.json"
}
```

## Assistant

**Result** (success):
```
<path>/Users/duncan/dev/documenso/turbo.json</path>
<type>file</type>
<content>1: {
2:   "$schema": "https://turbo.build/schema.json",
3:   "pipeline": {
4:     "build": {
5:       "dependsOn": ["prebuild", "^build"],
6:       "outputs": [".next/**", "!.next/cache/**"]
7:     },
8:     "prebuild": {
9:       "cache": false,
10:       "dependsOn": ["^prebuild"]
11:     },
12:     "lint": {
13:       "cache": false
14:     },
15:     "lint:fix": {
16:       "cache": false
17:     },
18:     "clean": {
19:       "cache": false
20:     },
21:     "dev": {
22:       "cache": false,
23:       "persistent": true
24:     },
25:     "start": {
26:       "dependsOn": ["^build"],
27:       "cache": false,
28:       "persistent": true
29:     },
30:     "dev:test": {
31:       "cache": false
32:     },
33:     "test:e2e": {
34:       "dependsOn": ["^build"],
35:       "cache": false
36:     }
37:   },
38:   "globalDependencies": ["**/.env.*local"],
39:   "globalEnv": [
40:     "APP_VERSION",
41:     "PORT",
42:     "NEXT_PRIVATE_ENCRYPTION_KEY",
43:     "NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY",
44:     "NEXTAUTH_SECRET",
45:     "NEXT_PUBLIC_PROJECT",
46:     "NEXT_PUBLIC_WEBAPP_URL",
47:     "NEXT_PRIVATE_INTERNAL_WEBAPP_URL",
48:     "NEXT_PUBLIC_POSTHOG_KEY",
49:     "NEXT_PUBLIC_FEATURE_BILLING_ENABLED",
50:     "NEXT_PUBLIC_DISABLE_SIGNUP",
51:     "NEXT_PRIVATE_ALLOWED_SIGNUP_DOMAINS",
52:     "NEXT_PRIVATE_PLAIN_API_KEY",
53:     "NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT",
54:     "NEXT_PRIVATE_DOCUMENSO_LICENSE_KEY",
55:     "NEXT_PRIVATE_DATABASE_URL",
56:     "NEXT_PRIVATE_DATABASE_REPLICA_URLS",
57:     "NEXT_PRIVATE_DIRECT_DATABASE_URL",
58:     "NEXT_PRIVATE_LOGGER_FILE_PATH",
59:     "NEXT_PRIVATE_SIGNING_TRANSPORT",
60:     "NEXT_PRIVATE_SIGNING_PASSPHRASE",
61:     "NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH",
62:     "NEXT_PRIVATE_SIGNING_LOCAL_FILE_CONTENTS",
63:     "NEXT_PRIVATE_SIGNING_GCLOUD_HSM_KEY_PATH",
64:     "NEXT_PRIVATE_SIGNING_GCLOUD_HSM_PUBLIC_CRT_FILE_PATH",
65:     "NEXT_PRIVATE_SIGNING_GCLOUD_HSM_PUBLIC_CRT_FILE_CONTENTS",
66:     "NEXT_PRIVATE_SIGNING_GCLOUD_APPLICATION_CREDENTIALS_CONTENTS",
67:     "NEXT_PRIVATE_SIGNING_GCLOUD_HSM_CERT_CHAIN_FILE_PATH",
68:     "NEXT_PRIVATE_SIGNING_GCLOUD_HSM_CERT_CHAIN_CONTENTS",
69:     "NEXT_PRIVATE_SIGNING_GCLOUD_HSM_SECRET_MANAGER_CERT_PATH",
70:     "NEXT_PRIVATE_SIGNING_TIMESTAMP_AUTHORITY",
71:     "NEXT_PUBLIC_SIGNING_CONTACT_INFO",
72:     "NEXT_PRIVATE_USE_LEGACY_SIGNING_SUBFILTER",
73:     "NEXT_PRIVATE_GOOGLE_CLIENT_ID",
74:     "NEXT_PRIVATE_GOOGLE_CLIENT_SECRET",
75:     "NEXT_PRIVATE_OIDC_WELL_KNOWN",
76:     "NEXT_PRIVATE_OIDC_CLIENT_ID",
77:     "NEXT_PRIVATE_OIDC_CLIENT_SECRET",
78:     "NEXT_PRIVATE_OIDC_PROVIDER_LABEL",
79:     "NEXT_PRIVATE_OIDC_SKIP_VERIFY",
80:     "NEXT_PUBLIC_UPLOAD_TRANSPORT",
81:     "NEXT_PRIVATE_UPLOAD_ENDPOINT",
82:     "NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE",
83:     "NEXT_PRIVATE_UPLOAD_REGION",
84:     "NEXT_PRIVATE_UPLOAD_BUCKET",
85:     "NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID",
86:     "NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY",
87:     "NEXT_PRIVATE_UPLOAD_DISTRIBUTION_DOMAIN",
88:     "NEXT_PRIVATE_UPLOAD_DISTRIBUTION_KEY_ID",
89:     "NEXT_PRIVATE_UPLOAD_DISTRIBUTION_KEY_CONTENTS",
90:     "NEXT_PRIVATE_SIGNING_TRANSPORT",
91:     "NEXT_PRIVATE_SIGNING_PASSPHRASE",
92:     "NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH",
93:     "NEXT_PRIVATE_SIGNING_LOCAL_FILE_CONTENTS",
94:     "NEXT_PRIVATE_SIGNING_LOCAL_FILE_ENCODING",
95:     "NEXT_PRIVATE_SMTP_TRANSPORT",
96:     "NEXT_PRIVATE_RESEND_API_KEY",
97:     "NEXT_PRIVATE_MAILCHANNELS_API_KEY",
98:     "NEXT_PRIVATE_MAILCHANNELS_ENDPOINT",
99:     "NEXT_PRIVATE_MAILCHANNELS_DKIM_DOMAIN",
100:     "NEXT_PRIVATE_MAILCHANNELS_DKIM_SELECTOR",
101:     "NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY",
102:     "NEXT_PRIVATE_SMTP_HOST",
103:     "NEXT_PRIVATE_SMTP_PORT",
104:     "NEXT_PRIVATE_SMTP_USERNAME",
105:     "NEXT_PRIVATE_SMTP_PASSWORD",
106:     "NEXT_PRIVATE_SMTP_APIKEY_USER",
107:     "NEXT_PRIVATE_SMTP_APIKEY",
108:     "NEXT_PRIVATE_SMTP_SECURE",
109:     "NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS",
110:     "NEXT_PRIVATE_SMTP_FROM_NAME",
111:     "NEXT_PRIVATE_SMTP_FROM_ADDRESS",
112:     "NEXT_PRIVATE_SMTP_SERVICE",
113:     "NEXT_PRIVATE_STRIPE_API_KEY",
114:     "NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET",
115:     "NEXT_PRIVATE_GITHUB_TOKEN",
116:     "NEXT_PRIVATE_BROWSERLESS_URL",
117:     "NEXT_PRIVATE_JOBS_PROVIDER",
118:     "NEXT_PRIVATE_INNGEST_APP_ID",
119:     "INNGEST_EVENT_KEY",
120:     "NEXT_PRIVATE_INNGEST_EVENT_KEY",
121:     "NEXT_PRIVATE_TELEMETRY_KEY",
122:     "NEXT_PRIVATE_TELEMETRY_HOST",
123:     "DOCUMENSO_DISABLE_TELEMETRY",
124:     "GOOGLE_VERTEX_PROJECT_ID",
125:     "GOOGLE_VERTEX_LOCATION",
126:     "GOOGLE_VERTEX_API_KEY",
127:     "CI",
128:     "NODE_ENV",
129:     "POSTGRES_URL",
130:     "DATABASE_URL",
131:     "DATABASE_URL_UNPOOLED",
132:     "POSTGRES_PRISMA_URL",
133:     "POSTGRES_URL_NON_POOLING",
134:     "GOOGLE_APPLICATION_CREDENTIALS",
135:     "E2E_TEST_AUTHENTICATE_USERNAME",
136:     "E2E_TEST_AUTHENTICATE_USER_EMAIL",
137:     "E2E_TEST_AUTHENTICATE_USER_PASSWORD",
138:     "DANGEROUS_BYPASS_RATE_LIMITS",
139:     "NEXT_PUBLIC_USE_INTERNAL_URL_BROWSERLESS",
140:     "NEXT_PRIVATE_OIDC_PROMPT"
141:   ]
142: }

(End of file - total 142 lines)
</content>
```

## Assistant

### Tool: read

**Args:**
```json
{
  "filePath": "/Users/duncan/dev/documenso/packages"
}
```

## Assistant

**Result** (success):
```
<path>/Users/duncan/dev/documenso/packages</path>
<type>directory</type>
<entries>
.DS_Store
api/
app-tests/
assets/
auth/
ee/
email/
eslint-config/
lib/
prettier-config/
prisma/
signing/
tailwind-config/
trpc/
tsconfig/
ui/

(16 entries)
</entries>
```

## Assistant

### Tool: glob

**Args:**
```json
{
  "path": "/Users/duncan/dev/documenso",
  "pattern": "apps/*/package.json"
}
```

## Assistant

**Result** (success):
```
/Users/duncan/dev/documenso/apps/remix/package.json
/Users/duncan/dev/documenso/apps/openpage-api/package.json
/Users/duncan/dev/documenso/apps/docs/package.json
```

## Assistant


Here is a concise overview of this repository.

## What it is

**Documenso** (v2.8.1) is an open-source **electronic document signing** product: create/send documents, collect signatures, and handle PDF workflows. The repo is a **TypeScript monorepo** using **npm workspaces** and **Turborepo**, with **Node ≥ 22** and **npm ≥ 10.7**.

## Applications (`apps/`)

| App | Role |
|-----|------|
| **`@documenso/remix`** | Main product: **React Router v7 (Remix-style)** UI on a **Hono** server, default dev on port **3000**. |
| **`@documenso/docs`** | Documentation site (**Next.js / Nextra** per `ARCHITECTURE.md`). |
| **`@documenso/openpage-api`** | Public analytics API. |

Root scripts compile **Lingui** translations, then run `turbo run dev --filter=@documenso/remix` for local dev. There is a **`dx`** flow: install, Docker Compose up, Prisma migrate + seed.

## Packages (`packages/`)

Shared libraries sit behind the Remix app:

- **`@documenso/lib`** — core business logic (split for server/client/universal use).
- **`@documenso/trpc`** — **tRPC** API (current public API surface, OpenAPI-related tooling).
- **`@documenso/api`** — **ts-rest** REST layer (**API v1**, deprecated but kept).
- **`@documenso/prisma`** — **PostgreSQL** via **Prisma** (and **Kysely** extensions).
- **`@documenso/ui`** — **Tailwind**, **Radix**, **shadcn**-style components.
- **`@documenso/auth`** — OAuth (**Arctic**), **WebAuthn** / passkeys.
- **`@documenso/email`** — **React Email** + mail transport.
- **`@documenso/signing`** — PDF signing (**@libpdf/core**, local P12 or **Google Cloud KMS**).
- **`@documenso/ee`** — enterprise-only behavior.
- **`@documenso/app-tests`** — **Playwright** E2E tests.

The architecture doc maps the Remix/Hono app to routes like **`/api/v1/*`** (ts-rest), **`/api/v2/*`** (tRPC), **`/api/trpc/*`**, and **`/api/jobs/*`** for background work (**Inngest** or local jobs). Storage is **S3-compatible** (or DB-backed depending on config).

## Notable tooling

- **Vite** for builds, **patch-package** for dependency patches.
- **ESLint / Prettier / Husky / commitlint** for consistency.
- **Crowdin** + Lingui for i18n.

For a deeper walkthrough (API versions, jobs, signing transports), the repo’s own guide is [`ARCHITECTURE.md`](https://github.com/documenso/documenso/blob/main/ARCHITECTURE.md) at the project root. If you want detail on one area (e.g. envelopes vs documents, or how signing is wired), say which part and we can zoom in on those folders.

## User

what model are you?

## Assistant


I’m **Composer**, a language model built by Cursor.
