Skip to content

feat: PM2 server management and Tailscale LAN access - #124

Closed
MLKiiwy wants to merge 13 commits into
mainfrom
feat/pm2-server-management
Closed

MLKiiwy wants to merge 13 commits into
mainfrom
feat/pm2-server-management

Conversation

@MLKiiwy

@MLKiiwy MLKiiwy commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Scaffold websites/alistigo/ Astro 5 + Starlight documentation site (recovered from built artifacts)
  • Add allowedHosts to Astro config and Vite config using os.hostname() for Tailscale/LAN access (thinkpad, thinkpad.local)
  • Consolidate all per-package Storybook instances into a single global instance at websites/storybook/
  • Add websites/alistigo and websites/storybook to PM2 ecosystem config (ports 4321 and 6006)

Details

Astro website (websites/alistigo)

  • package.json, astro.config.ts, tsconfig.json, project.json
  • Content: platform overview, architecture, layer diagram, ADR index, playground page
  • Added to pnpm-workspace.yaml and PM2 as the website process

Global Storybook (websites/storybook)

  • package.json with storybook deps; storybook CLI only lives here — not in individual packages
  • .storybook/main.ts: dynamically discovers all apps/*/src and packages/*/src that contain *.stories.@(ts|tsx) using globSync; auto-derives titlePrefix from each package name
  • .storybook/preview.ts: global preview importing list-components-react base CSS
  • viteFinal: adds tailwindcss + lingui plugins; sets allowedHosts for Tailscale access
  • Added as PM2 storybook process (port 6006)

Per-package storybook removal

  • Deleted .storybook/ dirs from 6 packages/apps
  • Removed storybook CLI devDep from all 6 (kept @storybook/react-vite for type declarations)
  • Removed storybook/build-storybook Nx targets from all 6 project.json files
  • Fixed story titles in artifact-list-checkbox-plugin and artifact-user-plugin to remove the package-name prefix (now injected by global titlePrefix)

Fallow/QA

  • Added *.stories.{ts,tsx} to dynamicallyLoaded (story files are discovered by Storybook at runtime)
  • Added react, react-dom, storybook, @storybook/react-vite to ignoreDependencies
  • Added websites/storybook to ignorePatterns

Test plan

  • pnpm server:kill-all && pnpm server:start:dev → 3 processes online (playground, website, storybook)
  • localhost:4321 → Astro Starlight site responds
  • localhost:6006 → Storybook shows all stories grouped by package name
  • localhost:5173 → Playground responds
  • Tailscale/LAN: thinkpad:4321, thinkpad:5173, thinkpad:6006 all respond
  • pnpm build:typecheck passes
  • pnpm qa:audit passes

🤖 Generated with Claude Code

MLKiiwy and others added 2 commits September 14, 2026 13:14
Reapplies work lost during the merge to main: PM2 ecosystem config,
server:* scripts, systemd service installer, lefthook restart hook,
ADR 0030, and Tailscale/LAN CSP + allowedHosts fixes for the playground.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Fallow audit report

Found 3 findings.

Details
Severity Rule Location Description
minor fallow/unused-dev-dependency package.json:51 Package '@finos/calm-cli' is in devDependencies but never imported
minor fallow/unused-dev-dependency package.json:52 Package '@finos/calm-schema' is in devDependencies but never imported
minor fallow/unused-dev-dependency websites/storybook/package.json:13 Package 'glob' is in devDependencies but never imported

Generated by fallow.

@github-actions

Copy link
Copy Markdown
Contributor

Fallow audit report

0 inline findings selected for GitHub review.

MLKiiwy and others added 7 commits September 14, 2026 13:36
Both websites/alistigo and websites/storybook are missing their source
files (package.json, astro.config.ts, .storybook/main.ts) — they were
never committed to git. The processes crash immediately with
ERR_PNPM_RECURSIVE_EXEC_NO_PACKAGE. Remove them from the ecosystem
config to stop the restart loop; add them back once the websites/ work
is committed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Recreates the alistigo documentation website from built dist artifacts.
Content recovered: home hero, platform overview, architecture constraints,
layer diagram, ADR index, and playground page. Adds ADR 0029 documenting
the Astro Starlight decision. Adds website process back to PM2 ecosystem
config and registers websites/* in pnpm workspace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Astro/MDX files are not analyzable by fallow. Add websites/ dirs to
ignorePatterns and astro/starlight/sharp to ignoreDependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirrors the vite.config.ts allowedHosts pattern so the Astro dev
server accepts Tailscale/LAN requests via os.hostname() and .local.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e global instance at websites/storybook

- Create websites/storybook with dynamic story discovery using globSync
  across all apps/* and packages/* — title prefix auto-derived from package name
- Remove .storybook/ dirs and storybook devDeps from 6 packages/apps
- Remove storybook/build-storybook Nx targets from all 6 project.json files
- Fix story titles in artifact-list-checkbox-plugin and artifact-user-plugin
  to drop the package-name prefix (now injected via global titlePrefix)
- Add storybook process to PM2 ecosystem config (port 6006, allowedHosts via viteFinal)
- Add storybook/glob to .fallowrc.json ignoreDependencies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…stories to dynamicallyLoaded

Keep @storybook/react-vite in packages' devDeps for type declarations
while the storybook CLI remains consolidated in websites/storybook.
Add *.stories.{ts,tsx} to fallow dynamicallyLoaded so story files are
treated as valid entry points. Add react/react-dom to ignoreDependencies
since websites/storybook needs them as peer deps but .storybook/ is excluded
from fallow analysis.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace per-package CSS imports with a conditional global decorator in
preview.tsx that wraps playground stories in a #host-root div with
height: 100vh, restoring the host.css height cascade without bleeding
overflow:hidden into other packages' stories.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallow audit report

1 inline finding selected for GitHub review.

"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.3.4",
"glob": "^11.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warn fallow/unused-dev-dependency: Package 'glob' is in devDependencies but never imported

MLKiiwy and others added 4 commits September 15, 2026 07:51
os.hostname() is fragile — it can return an FQDN that doesn't match
the hostname the browser connects to. Switching to true allows any
host, which is appropriate for a private dev server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sform

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d packages

globals.css only scanned list-components-react files via its @source directive,
so playground utility classes were never emitted. A dedicated preview.css
extends the scope to apps/** and packages/**.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@MLKiiwy MLKiiwy closed this Sep 23, 2026
@MLKiiwy
MLKiiwy deleted the feat/pm2-server-management branch September 23, 2026 09:28
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