mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-10 21:15:04 +10:00
adfc9b527b
Adds .planning/codebase/ with parallel-mapper outputs covering stack, integrations, architecture, structure, conventions, testing, and concerns.
14 KiB
14 KiB
Technology Stack
Analysis Date: 2026-05-11
Languages
Primary:
- TypeScript
^6.0.3— All workspace code underapps/web/srcandpackages/*/src. Typechecked with the experimental TS native compiler@typescript/native-preview(7.0.0-dev.20260510.1) viatsgo --noEmit. - TSX (React 19) — UI components in
apps/web/src,packages/ui/src/components,packages/pdf/src/templates, and email templates inpackages/email/src/templates.
Secondary:
- JavaScript (ESM,
"type": "module") — A handful of config files such ascommitlint.config.cjsandapps/web/postcss.configstyle snippets. - JSON / JSONC —
package.json,tsconfig.json,biome.json,turbo.json,knip.json,apps/web/components.json,packages/schema/schema.json, locale and webfont metadata. - SQL — Drizzle-generated migrations under
migrations/(e.g.migrations/20260507144406_fast_nova/). - YAML —
compose.yml,compose.dev.yml,lefthook.yml,crowdin.yml,pnpm-workspace.yaml. - Markdown —
AGENTS.md,README.md,SECURITY.md,LICENSE, docs underdocs/.
Runtime
Environment:
- Node.js
24— Pinned inDockerfileviaARG NODE_VERSION=24. Single Node process exposes the web app on port3000. - Browser runtime — React 19 SSR + hydration via TanStack Start. PWA service worker registered from
apps/web/vite.config.ts.
Package Manager:
- pnpm
11.0.9— Pinned inpackage.jsonpackageManagerfield (with integrity hash). Managed via Corepack (corepack enable) perAGENTS.md. - Workspace topology:
pnpm-workspace.yamlincludesapps/*andpackages/*. - Lockfile:
pnpm-lock.yamlis present and committed at repo root. allowBuildsinpnpm-workspace.yaml:bcrypt,esbuild,lefthook,msw,sharp.postcssis pinned by an override to^8.5.14inpnpm-workspace.yaml.
Build Orchestrator:
- Turborepo
^2.9.12—turbo.jsondefines tasks (build,dev,typecheck,test,db:generate,db:migrate,db:studio,lingui:extract) and theglobalEnvwhitelist for cache invalidation. - The Docker build also pins
turbo@2.9.9viapnpm dlxfor the pruner stages.
Frameworks
Core (apps/web):
- React
^19.2.6withreact-dom ^19.2.6(fromapps/web/package.json). - TanStack Start
^1.167.65— Full-stack framework wiring Vite, Nitro, and React Router. Server handlers live in route files underapps/web/src/routes. - TanStack Router
^1.169.2— File-based router.apps/web/src/routeTree.gen.tsis generated. - TanStack React Query
^5.100.9with SSR bridge@tanstack/react-router-ssr-query ^1.166.12. - TanStack React Form
^1.32.0and React Hotkeys^0.10.0. - Vite
^8.0.11(rolldown-based) —apps/web/vite.config.tsorchestrates plugins. - Nitro
3.0.260429-beta— Server framework used throughnitro/vite. Plugins atapps/web/plugins/1.migrate.tsandapps/web/plugins/2.storage.tsrun on Nitro startup. srvx ^0.11.15— HTTP server runtime used by Nitro/TanStack Start.
RPC / API:
- oRPC
^1.14.2family —@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/mcpviaapps/web/src/routes/mcp/index.ts.
Auth:
- Better Auth
1.6.10— Core auth framework configured inpackages/auth/src/config.ts. - Better Auth plugins:
@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 inpackages/auth/src/config.ts).
Database & ORM:
- Drizzle ORM
1.0.0-beta.22with PostgreSQL driverpg ^8.20.0(node-postgres). drizzle-kit 1.0.0-beta.22— Migration tooling. Config atpackages/db/drizzle.config.ts(dialectpostgresql, schema./src/schema/index.ts, out../../migrations).drizzle-zod 1.0.0-beta.14-a36c63d— Schema-derived Zod validators inpackages/api.
PDF / Rendering:
@react-pdf/renderer ^4.5.1with types@react-pdf/types ^2.11.1— Used bypackages/pdf/src/document.tsxand all templates underpackages/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.- Font registration owned by
packages/pdf/src/hooks/use-register-fonts.ts; webfont catalog atpackages/fonts/src/webfontlist.json.
UI / Styling:
- Base UI / shadcn-style components —
@base-ui/react ^1.4.1,shadcn ^4.7.0(CLI), components live inpackages/ui/src/components/*.tsx. Config atapps/web/components.json(stylebase-nova, base colorzinc, icon libraryphosphor). - Tailwind CSS
^4.3.0via@tailwindcss/vite ^4.3.0and@tailwindcss/postcss ^4.3.0. Plugin@tailwindcss/typography ^0.5.19. Global stylesheet atpackages/ui/src/styles/globals.css. - PostCSS
^8.5.14andtw-animate-css ^1.4.0. class-variance-authority ^0.7.1,clsx ^2.1.1,tailwind-merge ^3.6.0.- Icons:
@phosphor-icons/react ^2.1.10,@phosphor-icons/web ^2.1.2. - Fonts:
@fontsource-variable/ibm-plex-sans ^5.2.8(shipped withpackages/ui). - Theming:
next-themes ^0.4.6. - Animation:
motion ^12.38.0. - Toasts:
sonner ^2.0.7. - Command palette:
cmdk ^1.1.1. - Misc UI:
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.- TipTap
^3.23.1editor withstarter-kit,pm,react, plus extensionscolor,highlight,table,text-align,text-style.
State / Validation / Patterns:
- Zustand
^5.0.13— Client and AI state stores (packages/ai/src/store.ts). - Immer
^11.1.8. - Zod
^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.1andfuse.js ^7.3.0.
Internationalization (i18n):
- Lingui
^6.0.1family —@lingui/core,@lingui/react,@lingui/cli,@lingui/format-po,@lingui/vite-plugin,@lingui/babel-plugin-lingui-macro. - Babel transformer chain via
@rolldown/plugin-babel ^0.2.3andbabel-plugin-macros ^3.1.0. - Locale config at
apps/web/lingui.config.ts(source localeen-US, ~55 target locales, pseudo-localezu-ZA). - Translation catalogs at
apps/web/locales/{locale}.po. Crowdin sync configured incrowdin.yml.
Email:
- React Email
^6.1.1with@react-email/ui ^6.1.1— Templates inpackages/email/src/templates/auth.tsx. - Nodemailer
^8.0.7SMTP transport —packages/email/src/transport.ts.
AI:
- Vercel AI SDK
ai ^6.0.177and@ai-sdk/react ^3.0.179. - Provider SDKs:
@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. - Supported providers enumerated at
packages/ai/src/types.ts:openai,anthropic,gemini,vercel-ai-gateway,openrouter,ollama. - JSON patch / repair:
fast-json-patch ^3.1.1,jsonrepair ^3.14.0,deepmerge-ts ^7.1.5.
Storage:
- AWS SDK v3 —
@aws-sdk/client-s3 ^3.1045.0used inpackages/api/src/services/storage.ts. Marked external in the rolldown build (seeapps/web/vite.config.ts) and isolated intopackages/runtime-externalsfor Docker.
Image Processing:
- Sharp
^0.34.5— Used inpackages/api/src/services/storage.tsprocessImageForUpload. Disabled whenFLAG_DISABLE_IMAGE_PROCESSINGis true.
Document Generation / Import:
docx ^9.6.1— DOCX export utilities inpackages/utils/src/resume/docx/.- JSON Resume importers in
packages/import(json-resume,reactive-resume-json,reactive-resume-v4-json).
HTML Sanitization:
dompurify ^3.4.2— Used inpackages/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 inapps/web/src/libs/pwa.
Testing:
- Vitest
^4.1.5with@vitest/coverage-v8 ^4.1.5(providerv8). - Shared config in
vitest.shared.ts; per-package configs at<pkg>/vitest.config.ts. - DOM:
happy-dom ^20.9.0(disableJavaScriptFileLoading,disableCSSFileLoading, navigation disabled invitest.shared.ts). - Testing Library:
@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. - Tests are co-located in each package's
src/**/*.{test,spec}.{ts,tsx}and discovered automatically.
Lint / Format / Tooling:
- Biome
^2.4.15— Sole linter + formatter (biome.json: tabs, double quotes, line width 120, organized import groups,useSortedClassesforclsx/cva/cn). Pre-commit runs through Lefthook. - Lefthook
^2.1.6— Git hooks defined inlefthook.yml(biome check --write --unsafeon staged JS/TS/JSON files;commitlint --editon commit messages). - Commitlint
^21.0.0with@commitlint/config-conventional(seecommitlint.config.cjs). - Knip
^6.12.2— Dead-code/unused-deps detection (knip.json). npm-check-updates ^22.1.1.tsx ^4.21.0— Used bypackages/scriptsfor ad hoc TS scripts.
Key Dependencies
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/rpcand/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 bypackages/env/src/server.tsfor app/server code (drizzle-kit does NOT auto-load).@t3-oss/env-core ^0.13.11— Server env validation inpackages/env/src/server.ts.
Configuration
TypeScript:
- Root
tsconfig.jsonextends@reactive-resume/config/tsconfig.base.json(packages/config/tsconfig.base.json). - Each package has its own
tsconfig.jsonand runstsgo --noEmit. - Apps/packages export source from
src/*.tsvia package.jsonexports— nodist/artifacts unless explicitly built (e.g.apps/web/.output).
Build:
apps/web/vite.config.tsorchestratestailwindcss,tanstackStart,viteReact,lingui,babel(Lingui macro preset),nitro(with1.migrate.tsand2.storage.tsplugins), andVitePWA.- Rolldown externals:
bcrypt,sharp,@aws-sdk/client-s3(kept out of the client/server bundle and provided bypackages/runtime-externalsin Docker). - Output:
apps/web/.output/server/index.mjs(Nitro), public assets inapps/web/.output/public.
Database:
- Drizzle config:
packages/db/drizzle.config.ts—dialect: "postgresql", schema inpackages/db/src/schema/index.ts, migrations written to repo-rootmigrations/. - Client:
packages/db/src/client.tsexposes singletondbplusPoolviapg, usingenv.DATABASE_URL. - Startup auto-migration:
apps/web/plugins/1.migrate.tsrunsdrizzle-orm/node-postgres/migratoragainst the resolvedmigrations/folder.
Environment:
- Server env contract validated by Zod in
packages/env/src/server.ts(via@t3-oss/env-core). dotenvauto-loads root.envfrompackages/env/src/server.tsusingfindWorkspaceRoot().- Required:
APP_URL,DATABASE_URL,AUTH_SECRET. - Cache invalidation env vars listed in
turbo.jsonglobalEnv. .env.examplepresent at repo root;.env.localand.env.productionexist locally (contents not read — may contain secrets).
Linting / Formatting:
biome.json— Tabs, 120-col, double quotes, sorted Tailwind classes forclsx|cva|cn, organized import groups (typeimports 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 forruntime-externalsexternal 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-externalswith native deps), finalruntimeimage runningnode .output/server/index.mjs, HEALTHCHECK on/api/health.compose.dev.yml— Devpostgres:latest+seaweedfs:latest(S3 emulator) +seaweedfs_create_bucketinit container usingquay.io/minio/mc:latest.compose.yml— Same services plus the app containerreactive_resumebuilt fromDockerfile, withdata_network/storage_networkand S3 env defaults pointing at SeaweedFS.
Platform Requirements
Development:
- Node.js 24, pnpm 11.0.9 (via Corepack), Docker (for Postgres / SeaweedFS).
- Repo-local
data/directory for local-storage mode (auto-created byapps/web/plugins/2.storage.ts). LOCAL_STORAGE_PATHmust be absolute when set.- SMTP optional; without it
packages/email/src/transport.tslogs the email to console.
Production:
- Single Node 24 process on port 3000 (
apps/web/.output/server/index.mjs). - Official Docker image listed in
Dockerfilelabels (org.opencontainers.image.url=https://rxresu.me). - Production uses S3-compatible storage when all three of
S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEY,S3_BUCKETare set; otherwise falls back to local filesystem under/app/data(per DockerfileENV LOCAL_STORAGE_PATH=/app/data). - HEALTHCHECK polls
GET /api/health(handler atapps/web/src/routes/api/health.tschecks DB and storage with a 1.5s timeout). - Rate limiting only active when
NODE_ENV=production(seepackages/auth/src/config.tsandpackages/api/src/middleware/rate-limit/index.ts).
Stack analysis: 2026-05-11