Joinery
README.mdJoinery
A pnpm + Nx monorepo maintained by Xifré Font: Nuxt websites for small publications and practices, the shared packages they build on, and the tooling that keeps them consistent. The developer portal is the readable way in.
| Worth reading first | Why |
|---|---|
apps/huella-legal | The main product: a Nuxt 4 rebuild of a WordPress law magazine |
@joinery/configs | Shared presets and the in-house ESLint rules every project runs |
| Architecture & boundaries | How projects may depend on each other, enforced at lint time |
| 0028, 0030 | Two decisions: keeping old URLs working, and hosting cost |
Workspace layout
packages/
configs/ @joinery/configs — shared ESLint, Vitest, Playwright and tsconfig presets
content/ @joinery/content — CMS entries and taxonomies + a Nuxt module
i18n/ @joinery/i18n — translations core + a Nuxt module
observability/ @joinery/observability — Grafana Faro in the browser, OpenTelemetry on the server
apps/
developer-portal/ @joinery/developer-portal — the repository's public portal/front door over its docs, projects, architecture and engineering health
huella-legal/ @joinery/huella-legal — Huella Legal, a WIP law blog redesign (Nuxt 4)
marina-roustan/ @joinery/marina-roustan — Marina Roustan, a website rebuild (Nuxt 4)
portfolio/ @joinery/portfolio — Xifré Font's personal site: the method, the work and the project maps
wp-editor/ @joinery/wp-editor — local-only review-and-apply tool for bulk edits to WordPress posts and pages
infrastructure/
scripts/ @joinery/scripts — repo-local dev tooling, one folder per script
translations/ @joinery/translations — TMS serving the locale files over HTTP
packages/* is shared code and the only thing nx release versions. apps/* are the products.
infrastructure/* is everything else: services apps call over the network, and repo tooling.
| Looking for | Go to |
|---|---|
| Anything about one project | Its own README.md |
| Every command, hook, workflow and skill | docs/FEATURES.md |
| Cross-project concepts and how-tos | docs/concepts/, docs/guides/ — start with the first hour |
| Why something is the way it is | docs/decisions/ |
| Known problems per project | docs/audits/ |
| Files the tooling reads and writes | data/ |
Architecture & boundaries
Projects are layered with Nx tags (declared in each package.json under nx.tags) and enforced by
@nx/enforce-module-boundaries at lint time:
| Tag | May depend on | Who has it |
|---|---|---|
type:app | type:integration, type:observability, type:config | developer-portal, huella-legal, marina-roustan, portfolio, wp-editor |
type:integration | type:config | content, i18n |
type:observability | type:config | observability |
type:infra | type:config | translations |
type:tooling | type:config | scripts |
type:config | nothing | configs |
Every project also carries exactly one scope:* tag, and both rules apply at once:
| Scope | May depend on | Who has it |
|---|---|---|
scope:shared | scope:shared | configs, content, i18n, observability |
scope:huella-legal | scope:huella-legal, scope:shared | huella-legal |
scope:marina-roustan | scope:marina-roustan, scope:shared | marina-roustan |
scope:portfolio | scope:portfolio, scope:shared | portfolio |
scope:internal | scope:internal, scope:shared | developer-portal, wp-editor |
scope:tooling | scope:tooling, scope:shared | scripts |
scope:infra | scope:infra, scope:shared | translations |
Apps compose, everything else stays a leaf, and nothing reaches into another product's scope.
The constraints live in boundaries.ts;
docs/concepts/boundaries.md has the why.
Tooling conventions
- pnpm catalog: shared framework versions are pinned once in
pnpm-workspace.yamland referenced ascatalog:. - No
project.json: Nx infers targets from plugins and package scripts; metadata lives in eachpackage.json'snxblock. - Raw source packages:
packages/*export TypeScript/Vue source with no build step. - Shared configs: every ESLint, Vitest, Playwright and tsconfig file wraps a preset from
@joinery/configs.
Getting started
Requires the Node version in .nvmrc and pnpm (version pinned via packageManager in
package.json).
pnpm install
pnpm quick-start # hooks, .env files, workspace coverage and developer-portal snapshot
pnpm dev # pick a project to start
Skip pnpm quick-start and the git hooks never install: lifecycle scripts are
banned here, so Husky can't install itself.
lint, typecheck, test and build run on affected projects only (changed since master),
like CI. For everything, pnpm exec nx run-many -t <target>.
docs/FEATURES.md lists every other command.
| Command | What it does |
|---|---|
pnpm quick-start | Install Git hooks, create .env files, collect coverage, refresh the portal's snapshot |
pnpm dev | Pick a project and start it (pnpm dev <name> skips the picker). Installs first on a fresh clone |
pnpm lint | Lint affected projects |
pnpm typecheck | Typecheck affected projects |
pnpm test | Test affected projects |
pnpm check | Lint, typecheck and test affected projects, failures inline, then docs:map --check |
pnpm test:coverage | The whole workspace with coverage, merged into coverage/index.html |
pnpm build | Build affected projects |
pnpm graph | Open the Nx project graph |
pnpm docs:map | Re-render docs/FEATURES.md; --check asserts it is current |
pnpm release:dry | Preview a release (versioning + changelogs) |
Git conventions
Each rule is enforced by a hook or workflow;
change-lifecycle.md has the order they fire in.
- Branches match
^(hotfix|fix|feature|release)/[^/]+/[0-9]+-.+, somastercan't be pushed.pnpm issue:pickmakes one. - Commits are Conventional Commits
(
commitlint.config.mjs).commit-msgadds the branch's issue number:feat: [#50] add thing. pre-commitblocks on a staledocs/FEATURES.mdor a failingpnpm invariants:check, and stagespnpm usage:flush's telemetry.pre-pushrejects a bad branch name or an addedTODO/FIXME(file it withpnpm issue:add), then runs lint, test, typecheck andpnpm unused:check, which fails on any export, file or dependency nothing uses (knip.config.ts). A spec counts as a user.pnpm issue:shippushes, opens the PR and arms auto-merge.- PRs get their title, assignees and project from the issue
(
pr-metadata.yml), path labels (pr-labeler.yml) and an advisory docs review (pr-docs-review.yml). post-checkoutandpost-mergewarn whenpnpm-lock.yamlchanged, runpnpm env:syncwhen a.env.exampledid, and refreshpnpm workflow:syncin the background.- Manual only:
pnpm docs:drift. - Five secrets nothing provisions; see
docs/guides/repo-secrets.md.
Versioning
Versions and changelogs are derived from commit messages by nx release — no manual bumps.
- Each
packages/*project is versioned independently, from the commits that touched its files. feat→ minor,fix→ patch;chore,refactor,docs,test,ciandstyledon't bump. A!suffix orBREAKING CHANGE:footer → major.- While a package is on
0.x, Nx downshifts bumps one level (breaking → minor, feat → patch). - Current versions come from git tags (
<projectName>@<version>), falling back topackage.json. - Packages depending on a bumped package get a patch bump and a "Updated Dependencies" entry.
Cut versions with the Release workflow (release.yml):
leave dry-run on to preview, tick first-release only for a project with no tag yet. Each bumped
package gets a GitHub Release. Locally, pnpm release:dry previews.