@haatlabs-core/templates
The files a project cannot import (the Makefile's shared targets, Dockerfiles, compose,
ansible, workflows and deploy scripts), as templates, and the starting files of a new
project. haatlabs sync (@haatlabs-core/cli) writes them into a project from its
platform.json; nothing here runs on its own.
files/: one template per managed path, at that path.@@name@@is replaced; lines between#@if <condition>and#@endare kept only when the condition holds (web,shopify,admin,dashboards,sharedServices,sharedImage,nodeHeap,workerConcurrency,cache;!inverts).@@nameSnake@@is the name with underscores, for Postgres, Prometheus and variable names;@@NAME@@is it in capitals.starter/: whathaatlabs createwrites once into a new project, which then owns it.TEMPLATESlists each managed path, its condition and its comment style.
Install
pnpm add @haatlabs-core/templates --save-dev
The run stage
The api and worker images (files/infra/docker/node.Dockerfile) build in a node:24-slim
stage and run in a distroless one (nodejs24-debian13:nonroot): Node and glibc, no shell and
no package manager, as the nonroot user. The entrypoint is cleared, so node dist/migrate.mjs
(make migrate-image) and node dist/main.mjs both run as they did on slim. Because nothing
can be installed or inspected inside the image, the build fails if the bundle's external
packages (dist/externals.json) are missing, and the images workflow runs the same check
against the built image, native packages included.