Monorepo for Helvety web applications served from helvety.com (Next.js path zones and shared packages).
Helvety is a Next.js monorepo for apps served under helvety.com paths:
- Other Helvety products (browser extensions, SPFx controls, Windows desktop tools, and similar) are distributed separately from their own repositories; where source is published for those products, the applicable repository
LICENSEfile governs it. The Helvety Store catalog lists product pages with Store-hosted downloads (for example SPFx and desktop ZIPs), Chrome Web Store install links (for example Power Platform Configurator), and other install or source links across the full product line (zone root/storeredirects to that catalog). - Public gateway and tools:
web,store,pdf,image-editor,ocr - Shared packages:
@helvety/shared,@helvety/ui(components,globals.css, and production Tailwind/PostCSS packages for Vercel builds),@helvety/config(shared config entrypoints),@helvety/dev-deps(canonical toolchain versions),@helvety/brand,@helvety/extension-chrome(shared UI chrome for external extension repos such as Power Platform Configurator)
Root layouts for these zones use @helvety/ui/helvety-public-shell-root-layout. Shells inject blocking HelvetyThemeInitScript in <head> (script body from @helvety/shared/layout-primitives, rendered by @helvety/ui) so html.dark and bg-background match storage/system before body paint; Store uses themeProviderScope: "navbar-only" for ThemeProvider placement only. The gateway homepage server-renders copy via HeroMarketingShell on a plain theme background (company-values tagline private · simple · clean from HELVETY_COMPANY_VALUES_TAGLINE). Command bars (store section nav, PDF/image/OCR toolbars) stay pinned outside scroll via shell slots (scrollAreaMainPrefix, overflow-main flex columns). Each app builds product metadata with @helvety/shared/seo (createHelvetyProductMetadata) in app/layout.tsx.
| App | URL | Purpose |
|---|---|---|
apps/web |
https://helvety.com | Gateway app, marketing homepage (static SSR hero on plain theme background), legal pages, sitemap index, cross-zone navigation |
apps/store |
https://helvety.com/store | Product catalog (landing /store/products), Store-hosted package downloads, and external install links (for example Chrome Web Store) |
apps/pdf |
https://helvety.com/pdf | Browser-based PDF tools |
apps/image-editor |
https://helvety.com/image-editor | Browser-based image annotation |
apps/ocr |
https://helvety.com/ocr | Browser-based OCR for PDFs and images |
| Package | Purpose |
|---|---|
packages/brand |
Shared brand assets |
packages/config |
Shared ESLint, TypeScript, Vitest, PostCSS, and Next.js configuration entrypoints (not pinned toolchain versions) |
packages/dev-deps |
Canonical toolchain dependency versions (eslint, typescript, vitest, prettier, testing libraries, Tailwind PostCSS packages), pinned in this package’s dependencies; workspaces consume via "@helvety/dev-deps": "workspace:*" in devDependencies |
packages/shared |
Shared config, SEO, rate-limit, CSP, licensing, ecosystem/store catalog, and public-tool helpers |
packages/ui |
Shared UI components, globals.css, and production tailwindcss / @tailwindcss/postcss (Turbopack CSS graph for zone builds; PostCSS plugin path via @helvety/config/postcss → dev-deps) |
packages/extension-chrome |
Shared Chromium extension UI chrome for external extension repos (action popups; not used by Next.js zones in this monorepo) |
git clone https://github.com/CasparRubin/helvety.git
cd helvety
bun installCopy env templates only for apps you will run:
cp apps/web/env.template apps/web/.env.local
cp apps/store/env.template apps/store/.env.local
cp apps/pdf/env.template apps/pdf/.env.local
cp apps/image-editor/env.template apps/image-editor/.env.local
cp apps/ocr/env.template apps/ocr/.env.local# run all zone dev servers (gateway http://localhost:3001; warms ports before "ready")
bun run dev
# run one workspace
bun run dev --filter=@helvety/web
# env: audit local .env.local vs templates; resync comments/structure (keeps values)
bun run consistency:local-env
bun run sync:local-env
# quality checks
bun run lint
bun run type-check
bun run test
bun run format
# remove local gitignored artifacts (.next/, coverage/, .turbo/, .DS_Store, …)
# skips coverage/ dirs while Vitest is writing coverage (.tmp) or when HELVETY_SKIP_COVERAGE_CLEAN=1
bun run clean:artifacts- Prefer semantic Testing Library queries (
getByRole,getByLabelText) over DOM-structure or text-count assertions. - Prefer
*.test.ts(x)naming for tests. - Keep
vi.mock(...)at module scope and reset mocks inbeforeEach; restore spies/globals inafterEachwhere applicable. - For async rejection cases, capture one promise and assert multiple expectations against that same invocation.
- Workspace
vitest.setup.tsfiles use/// <reference types="@testing-library/jest-dom/vitest" />plusimport "@helvety/config/vitest.setup";(matchers + RTLcleanup()inpackages/config/vitest.setup.shared.ts); do not duplicate that setup locally. - Prefer typed fixture builders in tests (
buildXxx(...)) over repeatedas unknown ascasting so test inputs evolve with production types. - When
app/layout.tsximports shared helpers for metadata tests, mock those@helvety/shared/*modules inapp/layout-metadata.test.tsso metadata tests stay hermetic (see existingwebandstoretests). - Shared toolchain versions (
eslint,typescript,vitest,prettier, testing libraries, Tailwind PostCSS, and related packages) live inpackages/dev-depsdependencies. Apps and packages declare"@helvety/dev-deps": "workspace:*"in devDependencies instead of duplicating those entries.packages/config/vitest.mjsresolves testing-library from dev-deps;packages/config/postcss.mjsloads the Tailwind PostCSS plugin from dev-deps.@helvety/uialso declares productiontailwindcssand@tailwindcss/postcssso Tailwind packages sit on zone apps’ production dependency graph for Turbopack (seepackages/dev-deps/README.md). Runtime dependency specifiers are kept in lockstep byscripts/workspace-version-drift.config.json(enforced byscripts/check-workspace-version-drift.mjs/bun run deps:drift, also inci:check) andscripts/check-test-hygiene.mjs(bun run test:hygiene, including requiredproxy.test.tsper zone). Store listing counts in tests followSTORE_PRODUCT_CARDS.lengthand assert the tie-break map matches every card id; seepackages/shared/src/store-catalog.test.tsandapps/store/README.md› Adding a New Product.
- ESLint boundary rules enforce that apps do not import code directly from other apps; shared logic must live in workspace packages.
- Naming and formatting (files, symbols, metadata copy constants, tests):
docs/naming-conventions.md. New or audited apps:docs/app-consistency-checklist.md. Company SEO uses Private, simple, clean and Engineered, designed and made in Switzerland; AGPL belongs on legal pages, Store product About copy, andllms.txtlicensing sections, not in site titles or metadata descriptions. Enforced by Prettier, shared ESLint inpackages/config/eslint.mjs(including@typescript-eslint/naming-convention), and rootconsistency:*scripts such asconsistency:proxy-docs(web gateway proxy README only),consistency:toolchain-docs,consistency:env-templates,consistency:vercel-apps,consistency:guardrails,consistency:ui-actions,consistency:zone-modernization,consistency:workspace-scripts,consistency:license,consistency:customer-copy,consistency:install-manifest-metadata,consistency:lifecycle-scripts,consistency:pdfjs-worker,consistency:filenames, andconsistency:project-naming(retired Power Platform Configurator slugs). These run inci:check. Local-only (not inci:check):consistency:local-env,sync:local-env,consistency:vercel-prod-env,consistency:vercel-preview-env; seepackage.jsonfor the full list. - UI/shadcn integration boundaries (shared primitives in
@helvety/ui/*only; noapps/*/components/ui/):docs/ui-shadcn-integration-policy.md. - Workspace layout, per-app entry points, and
ci:check/ci:releaseexpectations are described in this file and in each app or packageREADME.md(for examplepackages/ui/README.mdfor shared UI shells).
Full index: docs/README.md. Key references:
- New or audited apps:
docs/app-consistency-checklist.md - Architecture contracts:
docs/quality-modernization-baseline.md - Vercel monorepo setup:
docs/vercel-monorepo-apps.md - Security review cadence:
docs/security-review-runbook.md
Quality gates run locally via bun run ci:check and bun run ci:release before push. Vercel builds and deploys from the pushed commit.
bun run ci:check(run during development) runs, in order:consistency:proxy-docs,consistency:toolchain-docs,consistency:env-templates,consistency:vercel-apps,consistency:guardrails,consistency:ui-actions,consistency:zone-modernization,consistency:workspace-scripts,consistency:license,consistency:customer-copy,consistency:install-manifest-metadata,consistency:lifecycle-scripts,consistency:project-naming,test:hygiene,deps:security:floors,deps:drift,consistency:pdfjs-worker,consistency:filenames,deps:unused(Knip: unused files, dependencies, exports, types),format:check,lint,type-check,test.consistency:ui-actionsenforces@helvety/ui/sonnerimports in apps, public-tool workspace constants (PUBLIC_TOOL_SIDEBAR_WIDTH_CLASS), and extension OKLCH token imports (seedocs/ui-action-button-contract.md).consistency:pdfjs-workersyncs the PDF and OCR zone workers from react-pdf's resolvedpdfjs-distand rejects API/worker version skew or independentpdfjs-distpins (seeapps/pdf/README.mdandapps/ocr/README.md› PDF.js stack).consistency:proxy-docs(web gatewayapps/web/proxy.ts↔apps/web/README.mdonly) keeps the public marketing proxy contract documented.consistency:toolchain-docskeeps the Bun version called out in this README aligned with rootpackageManager, keeps the Next.js documentation deep link indocs/naming-conventions.mdaligned with the caret minimum inapps/web/package.jsondependencies.next, keeps this README's documentedci:checkstep order aligned withpackage.json(all steps, not onlyconsistency:*), and keeps Tailwind/PostCSS Vercel guidance aligned across root,packages/ui/README.md, andpackages/dev-deps/README.md.
bun run ci:release(run beforegit push/ before Vercel deploys):clean:artifacts, thenci:check, thendeps:audit(bun audit), thenbuild.- Placeholder env mode (
SKIP_ENV_VALIDATION=1off Vercel) is available for local build smoke tests, butci:releaseruns with normal env validation. VERCEL=1disables placeholder mode; production builds must use real env vars.- Additional manual dependency/security checks (see
docs/security-review-runbook.md):bun run consistency:vercel-prod-envandbun run consistency:vercel-preview-env(Vercel CLI login; Production/Preview env tier parity)bun run deps:security(security floors +bun audit)bun run deps:drift(also runs insideci:check; toolchain via@helvety/dev-deps)bun run deps:inventory(extended pins: vendored worker assets, key lockfile versions; seedocs/dependency-inventory.md)- Cursor dependency-update skill (
.cursor/skills/dependency-update/) for full npm + extended sweeps with upstream release research bun run deps:outdatedthen filteredbun update <pkg...> --filter='@helvety/*'before releases (manual; no Renovate/Dependabot; see.cursor/skills/dependency-update/; never barebun update -rat repo root)bun run deadcode:sweep(lighter Knip + lint + type-check without the fullci:checksuite;deps:unusedalready runs insideci:check)bun run clean:artifacts(removes local gitignored.next/,coverage/,.turbo/,.DS_Store; skips active Vitestcoverage/.tmp; smoke-tested in@helvety/sharedguardrail tests)bun run deps:check/bun run knip:exports/bun run knip:full/bun run deps:unused(deps:unusedis the CI gate;knip:fullalso reports unlisted deps and binaries thatci:checkdoes not fail on)
- Copy each app's
env.templateto.env.localbefore running that app (see setup commands above).bun run consistency:env-templates(inci:check) keeps every template aligned with startup validation inlib/env.tsand gateway config inapps/web/next.config.ts.bun run consistency:local-envaudits local.env.localfiles against those tiers before you sync Vercel Production/Preview.bun run sync:local-envrewrites existing.env.localfiles from templates (comments/structure only; values preserved). - App URL logic is derived from
NODE_ENVvia shared config (packages/shared/src/config.ts). Local zone ports are contiguous3001–3005(DEV_PORTS: web, store, pdf, image-editor, ocr). - Per-app tiers (see each
apps/*/env.template, app README,docs/turbo-env-tiers.md, anddocs/env-vercel-audit-checklist.md):- Store (
store): Upstash Redis for public package download rate limiting. - Public tools (
pdf,image-editor,ocr): no required service env (browser-local processing). - Gateway (
web): internal rewrite URLs (STORE_URL,PDF_URL,IMAGE_EDITOR_URL,OCR_URL) whenVERCEL=1.
- Store (
- Optional (commented in every
env.template; not required for normal local dev):SKIP_ENV_VALIDATION=1(local build smoke tests only, off Vercel;ci:releaseuses real validation), andHELVETY_SERVER_ACTION_ALLOWED_ORIGINS(comma-separated Server Actions origin override; on Vercel, defaults come from deployment URLs plushttps://helvety.com). apps/webrequiresSTORE_URL,PDF_URL,IMAGE_EDITOR_URL, andOCR_URLwhenVERCEL=1so multi-zone rewrites can resolve trusted internal origins. Local dev falls back to localhost ports.- Zone proxy profiles (
store-gateway,public-tool,public-marketing) set CSP and security headers only.
proxy.tsis lightweight request setup (CSP headers with'self'and'unsafe-inline'inscript-src, and zone-awarereport-uri/report-toendpoints), not a full application security boundary. Prerendered framework scripts have no nonce, so the policy does not use a nonce or'strict-dynamic'. Zoned apps report CSP violations to/{basePath}/api/csp-report(gateway uses/api/csp-report). Zone apps inline the sameconfig.matcherpattern asSECURITY_PROXY_MATCHERin@helvety/shared/proxy(Next.js requires a static literal) so common static files skip that chain. Theapps/webgateway uses a custom matcher with the same static extension exclusions plus zone path skips.- All five Next.js zones share the site footer in root layouts (copyright + legal nav; contact in the About dialog; no third-party analytics). User-facing storage disclosure: Privacy §8 (
docs/cookies-telemetry-and-footer.md).
helvety/
├── apps/
├── packages/
├── turbo.json
└── package.json
Architecture entry points and flow references are documented in each app/package README and in the shared runtime/security docs under packages/shared.
Services are primarily intended for customers in Switzerland and are not offered in the EU/EEA. Public tools and the Store catalog do not require a helvety.com account. Legal pages are hosted on https://helvety.com:
- Privacy: https://helvety.com/privacy
- Terms: https://helvety.com/terms (includes eligibility and AUP)
- Impressum (including abuse reporting): https://helvety.com/impressum#abuse
- Cookies and shared footer (developer reference):
docs/cookies-telemetry-and-footer.md - Internal legal update guardrails:
docs/legal-change-guardrails.md
Licensed under the GNU Affero General Public License v3.0 or later.