Monorepo
Since v5 the repository is a pnpm workspace driven by Turborepo. The v4 flat layout (lib/, api/, mod/, root express.js) is gone; see Migrating a v4 fork.
Layout
| Package | Directory | Role |
|---|---|---|
@geolytix/xyz-app | apps/xyz | XYZ API, router and server. |
@geolytix/mapp | apps/mapp | MAPP library; also the npm package. |
@geolytix/mapp-ui | apps/ui | MAPP.UI library. |
@geolytix/xyz-auth-app | apps/auth | Template for a custom authentication host. |
@geolytix/xyz-saml-app | apps/saml | XYZ with the optional SAML routes. |
@geolytix/xyz-devdb | packages/devdb | In-memory PGlite PostGIS database for tests and examples. |
@geolytix/xyz-testhost | packages/testhost | Local XYZ host with the devdb, for browser tests and test views. |
Other root directories:
public/holds the views, icons, dictionaries, css and the built bundles served by XYZ.utils/holds release, deploy and knowledge scripts, and the knowledge portal inutils/knowledge/site/.varlock/holds environment schemas, eg. thevanillaschema the XYZ tests run with.knowledge/is this bundle.
pnpm workspace and catalog
pnpm-workspace.yaml lists the packages. Every third-party version is declared once in its catalog: section; a manifest refers to it as "catalog:". Local packages refer to each other as "workspace:*".[1]
- Add or bump a dependency in the catalog, then reference it with
catalog:. allowBuildslists the packages allowed to run install scripts.- Use the pnpm version in the root
packageManagerfield.[2]
Dependencies
Each package declares the dependencies it uses; check its package.json rather than a list here.
- XYZ (
apps/xyz) needs Node.js 22 or later. Its runtime dependencies are express,pg,bcrypt,jsonwebtokenand varlock. The AWS SDK,resendand the OpenTelemetry exporters areoptionalDependencies, imported dynamically only when the feature is configured.[3] @node-saml/node-samlis a dependency ofapps/samlonly, so a deployment without SAML does not install it.- MAPP and MAPP.UI have no runtime dependencies.
olis a peer dependency of the npm package, loaded as a global. µhtml is vendored as source inapps/mapp/lib/utils/uhtml.mjs, not installed. - The devdb uses PGlite with PostGIS; the testhost adds express and
vt-pbf.
Development dependencies are declared at the root or in the app that uses them:
| Tool | Declared in | Purpose |
|---|---|---|
| turbo | root | Runs tasks across the packages. |
| Biome | root | Lint and format (pnpm lint). |
| Vite | mapp, ui | Builds the library bundles and css. |
| Vitest, Playwright | root, apps | Unit and browser tests; see TESTING.md. |
| publint | mapp | Checks the npm package. |
| VitePress, markdown-it, yaml | root | Knowledge portal and checks. |
Turborepo
Run tasks from the root; turbo.json defines build, dev, test, test:coverage, lint and workspace:cache.[4]
builddepends on^build. The mapp and uiturbo.jsonfiles declare their outputs inpublic/anddist/, so turbo can restore them from cache.testdepends ontransit, which only follows the dependency graph: a change in a dependency invalidates the test cache without running builds.- A cached run prints
FULL TURBOand no test counts. Use--forceto run the tests again. - Each app has its own
vitest.config.mjs; there is none at the root. - Filter by package name, eg.
pnpm build --filter=@geolytix/mapp.
The root scripts are the entry points: pnpm dev, pnpm build, pnpm test, pnpm test:xyz, pnpm test:mapp, pnpm test:ui, pnpm testview, and the knowledge:* scripts. See DEVELOPING.md and TESTING.md.
Build outputs
| Build | Output |
|---|---|
@geolytix/mapp | apps/mapp/dist/mapp.js, mapp.css (npm package), copied to public/js/lib and public/css |
@geolytix/mapp-ui | public/js/lib/ui.js, public/css/ui.css |
| XYZ | none; it runs from source |
- Both library builds write into
public/js/libwithout emptying it, so one build keeps the other's bundle. The mapp build emptiesdistfirst. - The bundles are gitignored. The release workflow commits them to
mainand the release tag only, so a release checkout is deployable without a build.[5] Don't commit them on a development branch. - .vercelignore excludes the library sources, the XYZ tests, devdb and testhost from a Vercel deployment. A deployment of
mainor a release tag serves the committed bundles; a development branch must be built first.[6] See Release builds for the release workflow.
Versions
The XYZ version lives in the root package.json (with a v), the root README, apps/mapp/lib/mapp.mjs and apps/mapp/package.json. The other app manifests have no version. Change it with pnpm bump:patch|minor|major; utils/check-version.js checks that all four match.[7] See RELEASING.md.