.planning/codebase/STACK.md
Analysis Date: 2026-05-11
Primary:
^6.0.3 — All workspace code under apps/web/src and packages/*/src. Typechecked with the experimental TS native compiler @typescript/native-preview (7.0.0-dev.20260510.1) via tsgo --noEmit.apps/web/src, packages/ui/src/components, packages/pdf/src/templates, and email templates in packages/email/src/templates.Secondary:
"type": "module") — A handful of config files such as commitlint.config.cjs and apps/web/postcss.config style snippets.package.json, tsconfig.json, biome.json, turbo.json, knip.json, apps/web/components.json, packages/schema/schema.json, locale and webfont metadata.migrations/ (e.g. migrations/20260507144406_fast_nova/).compose.yml, compose.dev.yml, lefthook.yml, crowdin.yml, pnpm-workspace.yaml.AGENTS.md, README.md, SECURITY.md, LICENSE, docs under docs/.Environment:
24 — Pinned in Dockerfile via ARG NODE_VERSION=24. Single Node process exposes the web app on port 3000.apps/web/vite.config.ts.Package Manager:
11.0.9 — Pinned in package.json packageManager field (with integrity hash). Managed via Corepack (corepack enable) per AGENTS.md.pnpm-workspace.yaml includes apps/* and packages/*.pnpm-lock.yaml is present and committed at repo root.allowBuilds in pnpm-workspace.yaml: bcrypt, esbuild, lefthook, msw, sharp.postcss is pinned by an override to ^8.5.14 in pnpm-workspace.yaml.Build Orchestrator:
^2.9.12 — turbo.json defines tasks (build, dev, typecheck, test, db:generate, db:migrate, db:studio, lingui:extract) and the globalEnv whitelist for cache invalidation.[email protected] via pnpm dlx for the pruner stages.Core (apps/web):
^19.2.6 with react-dom ^19.2.6 (from apps/web/package.json).^1.167.65 — Full-stack framework wiring Vite, Nitro, and React Router. Server handlers live in route files under apps/web/src/routes.^1.169.2 — File-based router. apps/web/src/routeTree.gen.ts is generated.^5.100.9 with SSR bridge @tanstack/react-router-ssr-query ^1.166.12.^1.32.0 and React Hotkeys ^0.10.0.^8.0.11 (rolldown-based) — apps/web/vite.config.ts orchestrates plugins.3.0.260429-beta — Server framework used through nitro/vite. Plugins at apps/web/plugins/1.migrate.ts and apps/web/plugins/2.storage.ts run on Nitro startup.srvx ^0.11.15 — HTTP server runtime used by Nitro/TanStack Start.RPC / API:
^1.14.2 family — @orpc/server, @orpc/client, @orpc/openapi, @orpc/json-schema, @orpc/zod, @orpc/tanstack-query, @orpc/experimental-ratelimit.@modelcontextprotocol/sdk ^1.29.0 — MCP server exposed at /mcp via apps/web/src/routes/mcp/index.ts.Auth:
1.6.10 — Core auth framework configured in packages/auth/src/config.ts.@better-auth/api-key ^1.6.10, @better-auth/drizzle-adapter ^1.6.10, @better-auth/infra ^0.2.6 (dashboard), @better-auth/oauth-provider ^1.6.10, @better-auth/passkey ^1.6.10, plus built-ins (admin, jwt, twoFactor, username, genericOAuth).jose ^6.2.3 — JWT verification for OAuth tokens (MCP authentication).bcrypt ^6.0.0 — Password hashing (10 rounds in packages/auth/src/config.ts).Database & ORM:
1.0.0-beta.22 with PostgreSQL driver pg ^8.20.0 (node-postgres).drizzle-kit 1.0.0-beta.22 — Migration tooling. Config at packages/db/drizzle.config.ts (dialect postgresql, schema ./src/schema/index.ts, out ../../migrations).drizzle-zod 1.0.0-beta.14-a36c63d — Schema-derived Zod validators in packages/api.PDF / Rendering:
@react-pdf/renderer ^4.5.1 with types @react-pdf/types ^2.11.1 — Used by packages/pdf/src/document.tsx and all templates under packages/pdf/src/templates/<name>/.pdfjs-dist 5.7.284 — Client-side PDF rendering and parsing (browser-only paths).react-pdf-html ^2.1.5, node-html-parser ^7.1.0, phosphor-icons-react-pdf ^0.1.3, cjk-regex ^3.4.0 — PDF helpers and CJK fallback.packages/pdf/src/hooks/use-register-fonts.ts; webfont catalog at packages/fonts/src/webfontlist.json.UI / Styling:
@base-ui/react ^1.4.1, shadcn ^4.7.0 (CLI), components live in packages/ui/src/components/*.tsx. Config at apps/web/components.json (style base-nova, base color zinc, icon library phosphor).^4.3.0 via @tailwindcss/vite ^4.3.0 and @tailwindcss/postcss ^4.3.0. Plugin @tailwindcss/typography ^0.5.19. Global stylesheet at packages/ui/src/styles/globals.css.^8.5.14 and tw-animate-css ^1.4.0.class-variance-authority ^0.7.1, clsx ^2.1.1, tailwind-merge ^3.6.0.@phosphor-icons/react ^2.1.10, @phosphor-icons/web ^2.1.2.@fontsource-variable/ibm-plex-sans ^5.2.8 (shipped with packages/ui).next-themes ^0.4.6.motion ^12.38.0.sonner ^2.0.7.cmdk ^1.1.1.react-resizable-panels ^4.11.0, react-window ^2.2.7, react-zoom-pan-pinch ^4.0.3, qrcode.react ^4.2.0, @uiw/color-convert ^2.10.1, @uiw/react-color-colorful ^2.10.1.Drag & Drop and Editing:
@dnd-kit/core ^6.3.1, @dnd-kit/sortable ^10.0.0, @dnd-kit/utilities ^3.2.2.^3.23.1 editor with starter-kit, pm, react, plus extensions color, highlight, table, text-align, text-style.State / Validation / Patterns:
^5.0.13 — Client and AI state stores (packages/ai/src/store.ts).^11.1.8.^4.4.3 — Validators across schema, api, env, ai, import, utils packages.ts-pattern ^5.9.0 — Pattern matching in API services.es-toolkit ^1.46.1 and fuse.js ^7.3.0.Internationalization (i18n):
^6.0.1 family — @lingui/core, @lingui/react, @lingui/cli, @lingui/format-po, @lingui/vite-plugin, @lingui/babel-plugin-lingui-macro.@rolldown/plugin-babel ^0.2.3 and babel-plugin-macros ^3.1.0.apps/web/lingui.config.ts (source locale en-US, ~55 target locales, pseudo-locale zu-ZA).apps/web/locales/{locale}.po. Crowdin sync configured in crowdin.yml.Email:
^6.1.1 with @react-email/ui ^6.1.1 — Templates in packages/email/src/templates/auth.tsx.^8.0.7 SMTP transport — packages/email/src/transport.ts.AI:
ai ^6.0.177 and @ai-sdk/react ^3.0.179.@ai-sdk/openai ^3.0.63, @ai-sdk/anthropic ^3.0.76, @ai-sdk/google ^3.0.71, @ai-sdk/openai-compatible ^2.0.47, ollama-ai-provider-v2 ^3.5.0.packages/ai/src/types.ts: openai, anthropic, gemini, vercel-ai-gateway, openrouter, ollama.fast-json-patch ^3.1.1, jsonrepair ^3.14.0, deepmerge-ts ^7.1.5.Storage:
@aws-sdk/client-s3 ^3.1045.0 used in packages/api/src/services/storage.ts. Marked external in the rolldown build (see apps/web/vite.config.ts) and isolated into packages/runtime-externals for Docker.Image Processing:
^0.34.5 — Used in packages/api/src/services/storage.ts processImageForUpload. Disabled when FLAG_DISABLE_IMAGE_PROCESSING is true.Document Generation / Import:
docx ^9.6.1 — DOCX export utilities in packages/utils/src/resume/docx/.packages/import (json-resume, reactive-resume-json, reactive-resume-v4-json).HTML Sanitization:
dompurify ^3.4.2 — Used in packages/utils/src/sanitize.ts.@sindresorhus/slugify ^3.0.0, unique-names-generator ^4.7.1, uuid ^14.0.0.PWA:
vite-plugin-pwa ^1.3.0 — Workbox-based service worker, manifest defined in apps/web/src/libs/pwa.Testing:
^4.1.5 with @vitest/coverage-v8 ^4.1.5 (provider v8).vitest.shared.ts; per-package configs at <pkg>/vitest.config.ts.happy-dom ^20.9.0 (disableJavaScriptFileLoading, disableCSSFileLoading, navigation disabled in vitest.shared.ts).@testing-library/react ^16.3.2, @testing-library/dom ^10.4.1, @testing-library/jest-dom ^6.9.1, @testing-library/user-event ^14.6.1.src/**/*.{test,spec}.{ts,tsx} and discovered automatically.Lint / Format / Tooling:
^2.4.15 — Sole linter + formatter (biome.json: tabs, double quotes, line width 120, organized import groups, useSortedClasses for clsx/cva/cn). Pre-commit runs through Lefthook.^2.1.6 — Git hooks defined in lefthook.yml (biome check --write --unsafe on staged JS/TS/JSON files; commitlint --edit on commit messages).^21.0.0 with @commitlint/config-conventional (see commitlint.config.cjs).^6.12.2 — Dead-code/unused-deps detection (knip.json).npm-check-updates ^22.1.1.tsx ^4.21.0 — Used by packages/scripts for ad hoc TS scripts.Critical:
@tanstack/react-start ^1.167.65 — App framework boundary; route server handlers depend on it.@orpc/server ^1.14.2 — Type-safe RPC; backbone of /api/rpc and /api/openapi.better-auth 1.6.10 — Identity, sessions, OAuth provider, MCP auth.drizzle-orm 1.0.0-beta.22 + pg ^8.20.0 — All DB access.@react-pdf/renderer ^4.5.1 — Resume PDF generation.@aws-sdk/client-s3 ^3.1045.0 — S3-compatible object storage.@modelcontextprotocol/sdk ^1.29.0 — MCP server endpoint.ai ^6.0.177 + @ai-sdk/* — Resume AI features (analysis, parsing, chat).Infrastructure:
vite ^8.0.11 + nitro 3.0.260429-beta — Build and server runtime.turbo ^2.9.12 — Workspace task graph and caching.dotenv ^17.4.2 — Loaded by packages/env/src/server.ts for app/server code (drizzle-kit does NOT auto-load).@t3-oss/env-core ^0.13.11 — Server env validation in packages/env/src/server.ts.TypeScript:
tsconfig.json extends @reactive-resume/config/tsconfig.base.json (packages/config/tsconfig.base.json).tsconfig.json and runs tsgo --noEmit.src/*.ts via package.json exports — no dist/ artifacts unless explicitly built (e.g. apps/web/.output).Build:
apps/web/vite.config.ts orchestrates tailwindcss, tanstackStart, viteReact, lingui, babel (Lingui macro preset), nitro (with 1.migrate.ts and 2.storage.ts plugins), and VitePWA.bcrypt, sharp, @aws-sdk/client-s3 (kept out of the client/server bundle and provided by packages/runtime-externals in Docker).apps/web/.output/server/index.mjs (Nitro), public assets in apps/web/.output/public.Database:
packages/db/drizzle.config.ts — dialect: "postgresql", schema in packages/db/src/schema/index.ts, migrations written to repo-root migrations/.packages/db/src/client.ts exposes singleton db plus Pool via pg, using env.DATABASE_URL.apps/web/plugins/1.migrate.ts runs drizzle-orm/node-postgres/migrator against the resolved migrations/ folder.Environment:
packages/env/src/server.ts (via @t3-oss/env-core).dotenv auto-loads root .env from packages/env/src/server.ts using findWorkspaceRoot().APP_URL, DATABASE_URL, AUTH_SECRET.turbo.json globalEnv..env.example present at repo root; .env.local and .env.production exist locally (contents not read — may contain secrets).Linting / Formatting:
biome.json — Tabs, 120-col, double quotes, sorted Tailwind classes for clsx|cva|cn, organized import groups (type imports first, then Node built-ins, test packages, third-party, @reactive-resume/**, then aliases/relative).lefthook.yml — Pre-commit Biome on staged files; commit-msg Commitlint.commitlint.config.cjs — Conventional commits.knip.json — Workspace-level ignores for runtime-externals external deps.Container / Compose:
Dockerfile (multi-stage): base (Node 24 slim + corepack), pruner (turbo prune), builder (frozen lockfile install + pnpm turbo run build --filter=web --force), runtime-pruner + runtime-deps (deploy @reactive-resume/runtime-externals with native deps), final runtime image running node .output/server/index.mjs, HEALTHCHECK on /api/health.compose.dev.yml — Dev postgres:latest + seaweedfs:latest (S3 emulator) + seaweedfs_create_bucket init container using quay.io/minio/mc:latest.compose.yml — Same services plus the app container reactive_resume built from Dockerfile, with data_network/storage_network and S3 env defaults pointing at SeaweedFS.Development:
data/ directory for local-storage mode (auto-created by apps/web/plugins/2.storage.ts).LOCAL_STORAGE_PATH must be absolute when set.packages/email/src/transport.ts logs the email to console.Production:
apps/web/.output/server/index.mjs).Dockerfile labels (org.opencontainers.image.url=https://rxresu.me).S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_BUCKET are set; otherwise falls back to local filesystem under /app/data (per Dockerfile ENV LOCAL_STORAGE_PATH=/app/data).GET /api/health (handler at apps/web/src/routes/api/health.ts checks DB and storage with a 1.5s timeout).NODE_ENV=production (see packages/auth/src/config.ts and packages/api/src/middleware/rate-limit/index.ts).Stack analysis: 2026-05-11