Skip to content

feat(templates): JS/TS + monorepo app templates with hot reload (spec 31) - #118

Merged
gustavobertoi merged 1 commit into
mainfrom
feat/js-monorepo-templates
Jul 2, 2026
Merged

feat(templates): JS/TS + monorepo app templates with hot reload (spec 31)#118
gustavobertoi merged 1 commit into
mainfrom
feat/js-monorepo-templates

Conversation

@gustavobertoi

Copy link
Copy Markdown
Contributor

Summary

First half of spec 31: six built-in JS/TS + monorepo project templates, each with dev-mode hot reload.

Template Dev server
node.express npm run dev (nodemon)
node.nestjs nest start --watch
node.next next dev (WATCHPACK_POLLING)
react.vite Vite HMR
bun.app bun run dev (oven/bun)
turborepo turbo run dev (monorepo)

Hot reload

Each template bind-mounts the project source (..:/app — the generated compose lives in <project>/.devstack/, so .. is the source), keeps an anonymous node_modules volume so the container's install isn't shadowed, runs install then the dev server, and sets the framework's file-watch polling env for WSL2/9p (where inotify is unreliable — the same reason /mnt is refused).

Verified: devstack generate on a node.next project emits source: .. → /app, the anon node_modules volume, npm install && npm run dev, and WATCHPACK_POLLING.

Tests / gates

js_templates_test.go resolves + compose-go-validates all six and asserts the hot-reload shape. make ci (fmt/vet/build/test-race) + make determinism green; all six pass template lint.

Next: spec 31's second half — the devstack run task-graph runner.

🤖 Generated with Claude Code

… 31)

Six built-in project templates for the JS/TS ecosystem, each with dev-mode
hot reload:

- node.express, node.nestjs, node.next, react.vite, bun.app, turborepo.

Each bind-mounts the project source (`..:/app` — the generated compose lives
in `<project>/.devstack/`) with an anonymous node_modules volume, runs
`install` + the framework dev server (nodemon / nest --watch / next dev /
vite / bun run dev / turbo run dev), and sets file-watch polling env
(CHOKIDAR_USEPOLLING / WATCHPACK_POLLING) for WSL2/9p reliability.

- templates/*/{template.yaml,build/Dockerfile}; registered in embed.go.
- js_templates_test.go: each resolves, validates via compose-go, and emits
  the /app mount + dev command.
- docs: templates guide + README table + whats-next (now shipped).

make ci + determinism green; all six pass `template lint`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavobertoi
gustavobertoi merged commit 7175140 into main Jul 2, 2026
4 checks passed
@gustavobertoi
gustavobertoi deleted the feat/js-monorepo-templates branch July 2, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant