Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5f9af36
feat: restore PM2 server management and Tailscale LAN access
MLKiiwy Sep 14, 2026
84591f3
chore: apply biome formatting to package.json
MLKiiwy Sep 14, 2026
34e242b
fix: remove website and storybook from PM2 until source is scaffolded
MLKiiwy Sep 14, 2026
7701819
feat(website): scaffold websites/alistigo — Astro 5 + Starlight
MLKiiwy Sep 14, 2026
84f56d6
fix(fallow): ignore websites/alistigo and websites/storybook in audit
MLKiiwy Sep 14, 2026
a067d82
fix(website): allow current hostname in Astro dev server
MLKiiwy Sep 14, 2026
9bc1f03
feat(storybook): consolidate all per-package storybbooks into a singl…
MLKiiwy Sep 14, 2026
4ed44e2
fix(storybook): restore @storybook/react-vite types in packages, add …
MLKiiwy Sep 14, 2026
d641b57
feat(storybook): add playground decorator via tags-based scoping
MLKiiwy Sep 15, 2026
0372172
fix(storybook): use allowedHosts: true for LAN/Tailscale access
MLKiiwy Sep 15, 2026
7925973
fix(storybook): correct preview.tsx CSS import path (3 levels up, not 2)
MLKiiwy Sep 15, 2026
1a006e4
fix(storybook): add explicit React import in preview.tsx for JSX tran…
MLKiiwy Sep 15, 2026
ab530b8
fix(storybook): extend Tailwind @source scan to all workspace apps an…
MLKiiwy Sep 15, 2026
73da5cf
feat(ci): deploy website, storybook, and playground to GitHub Pages
MLKiiwy Sep 15, 2026
d2b3909
chore: sort imports in storybook main.ts
MLKiiwy Sep 15, 2026
4c0ba4d
fix(storybook): remove unused React import from preview.tsx
MLKiiwy Sep 15, 2026
9819858
fix(storybook): restore React import with biome-ignore in preview.tsx
MLKiiwy Sep 15, 2026
c9958e4
fix: lint
MLKiiwy Sep 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@

"packages/alistigo-*",
"cli/alistigo-*",
"packages/artifact-storage-explorer"
"packages/artifact-storage-explorer",
"websites/storybook",
"websites/alistigo/**"
],
"dynamicallyLoaded": [
"**/*.test.{ts,tsx}",
"**/tests/**/*.{ts,tsx}",
"**/*.stories.{ts,tsx}",
"cli/list-features-runner-playwright/src/support/hooks.ts",
"cli/list-features-runner-playwright/src/support/world.ts",
"cli/list-features-runner-playwright/src/pages/application.page.ts",
Expand All @@ -64,7 +67,14 @@
"gherklin",
"@cucumber/pretty-formatter",
"@lingui/format-po",
"@emotion/is-prop-valid"
"@emotion/is-prop-valid",
"astro",
"@astrojs/starlight",
"sharp",
"storybook",
"@storybook/react-vite",
"react",
"react-dom"
],
"duplicates": {
"minOccurrences": 3
Expand Down
56 changes: 8 additions & 48 deletions .github/workflows/deploy-playground.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Playground
name: Deploy to GitHub Pages

on:
workflow_run:
Expand All @@ -23,6 +23,8 @@ jobs:
# On workflow_run: only proceed when CI passed.
# On workflow_dispatch: always proceed (manual re-deploy).
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
env:
STORYBOOK_BASE_PATH: /storybook/

steps:
- name: Checkout
Expand Down Expand Up @@ -62,53 +64,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build playground (all locales)
run: pnpm exec nx run alistigo-artifact-playground:build:all

- name: Assemble site
run: |
mkdir -p _site/playground
echo "www.alistigo.com" > _site/CNAME

cp -r apps/alistigo-artifact-playground/dist/en _site/playground/en
cp -r apps/alistigo-artifact-playground/dist/fr _site/playground/fr

# /playground/ — detect browser language and redirect to the right bundle.
cat > _site/playground/index.html << 'HTMLEOF'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Alistigo Playground</title>
<script>
var supported = ['en', 'fr'];
var loc = (navigator.languages || [navigator.language || 'en'])
.map(function (l) { return l.slice(0, 2).toLowerCase(); })
.find(function (l) { return supported.indexOf(l) !== -1; }) || 'en';
window.location.replace('./' + loc + '/');
</script>
</head>
<body>
<a href="./en/">English</a> | <a href="./fr/">Fran&#231;ais</a>
</body>
</html>
HTMLEOF

# Site root — redirect visitors straight to the playground.
cat > _site/index.html << 'HTMLEOF'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="refresh" content="0;url=./playground/" />
<title>Alistigo</title>
<script>window.location.replace('./playground/');</script>
</head>
<body>
<a href="./playground/">Open Playground</a>
</body>
</html>
HTMLEOF
- name: Build deployed apps and website
run: pnpm exec nx run holos:build:deploy

- name: Assemble _site
run: bash scripts/assemble-site.sh

- name: Configure Pages
uses: actions/configure-pages@v5
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ pnpm build:typecheck # Type-check all packages
pnpm test # Run all tests
```

## Server Mode

The repo can run on a remote server for persistent AI-agent sessions (Claude in tmux, accessible from anywhere). Use the `server:*` commands to manage background dev processes via PM2:

| Command | What it does |
|---------|-------------|
| `pnpm server:start:dev` | Start playground, website, and storybook as background daemons |
| `pnpm server:kill-all` | Stop and remove all background dev processes |
| `pnpm server:status` | Show status of all managed processes |
| `pnpm server:logs` | Tail logs from all processes |
| `pnpm server:restart` | Restart all running processes (e.g. after a branch switch) |
| `pnpm server:install-service` | Install a systemd user service that auto-starts dev on login/boot |

See [ADR 0030](packages/architecture/adrs/0030-pm2-server-dev-mode.md) for the rationale.

## Quality Assurance

All static analysis and linting tools follow the `qa:*` prefix — keeping QA commands grouped and discoverable, separate from build/run/test commands.
Expand Down
19 changes: 0 additions & 19 deletions apps/alistigo-artifact-playground/.storybook/main.ts

This file was deleted.

16 changes: 0 additions & 16 deletions apps/alistigo-artifact-playground/.storybook/preview.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/alistigo-artifact-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.3.4",
"storybook": "^10.3.0",
"tailwindcss": "^4.0.0",
"vite": "^7.0.0"
}
Expand Down
15 changes: 0 additions & 15 deletions apps/alistigo-artifact-playground/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,6 @@
"command": "rm -rf dist",
"cwd": "apps/alistigo-artifact-playground"
}
},
"storybook": {
"executor": "nx:run-commands",
"options": {
"command": "storybook dev -p 6007",
"cwd": "apps/alistigo-artifact-playground"
}
},
"build-storybook": {
"executor": "nx:run-commands",
"outputs": ["{projectRoot}/storybook-static"],
"options": {
"command": "storybook build",
"cwd": "apps/alistigo-artifact-playground"
}
}
}
}
18 changes: 15 additions & 3 deletions apps/alistigo-artifact-playground/src/buildIframeSrcdoc.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
import claudeBridgeHtml from "@alistigo/claude-artifact-api/inject-script.html?raw";
import type { Config } from "./hooks/useHostConfig";

const _devHost = typeof __ALISTIGO_DEV_HOSTNAME__ !== "undefined" ? __ALISTIGO_DEV_HOSTNAME__ : "";
const _devHostOrigins = _devHost ? [`http://${_devHost}:*`, `ws://${_devHost}:*`] : [];

export const SRCDOC_CSP = [
"default-src 'none'",
"script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://cdn.jsdelivr.net http://localhost:* http://127.0.0.1:*",
[
"script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://cdn.jsdelivr.net",
"http://localhost:* http://127.0.0.1:*",
..._devHostOrigins.slice(0, 1),
].join(" "),
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob:",
"font-src 'self' data:",
"connect-src 'self' http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*",
"frame-src 'self' http://localhost:* http://127.0.0.1:*",
[
"connect-src 'self' http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*",
..._devHostOrigins,
].join(" "),
["frame-src 'self' http://localhost:* http://127.0.0.1:*", ..._devHostOrigins.slice(0, 1)].join(
" ",
),
"worker-src blob:",
"media-src 'self' blob:",
].join("; ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const meta: Meta<typeof ArtifactViewPanel> = {
title: "Playground/ArtifactViewPanel",
component: ArtifactViewPanel,
parameters: { layout: "fullscreen" },
tags: ["playground"],
decorators: [
(Story) => (
<div style={{ height: "100vh", display: "flex" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const meta: Meta<typeof ClaudeSimulator> = {
title: "Components/ClaudeSimulator",
component: ClaudeSimulator,
parameters: { layout: "fullscreen" },
tags: ["playground"],
args: {
aiContext: "",
simulatorDelayMs: 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const meta: Meta<typeof ConfigFormArtifact> = {
title: "Playground/ConfigFormArtifact",
component: ConfigFormArtifact,
parameters: { layout: "centered" },
tags: ["playground"],
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const meta: Meta<typeof ConfigFormListArtifact> = {
title: "Playground/ConfigFormListArtifact",
component: ConfigFormListArtifact,
parameters: { layout: "centered" },
tags: ["playground"],
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const meta: Meta<typeof HostForm> = {
title: "Playground/HostForm",
component: HostForm,
parameters: { layout: "fullscreen" },
tags: ["playground"],
decorators: [
(Story) => (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const meta: Meta<typeof HostPage> = {
title: "Dev/HostPage",
component: HostPage,
parameters: { layout: "fullscreen" },
tags: ["playground"],
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const meta: Meta<typeof SourceView> = {
title: "Playground/SourceView",
component: SourceView,
parameters: { layout: "fullscreen" },
tags: ["playground"],
decorators: [
(Story) => (
<div style={{ height: "100vh" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const meta: Meta<typeof StorageExplorer> = {
title: "Playground/StorageExplorer",
component: StorageExplorer,
parameters: { layout: "fullscreen" },
tags: ["playground"],
decorators: [
(Story) => (
<div style={{ height: "400px", display: "flex", border: "1px solid #e5e7eb" }}>
Expand Down
3 changes: 3 additions & 0 deletions apps/alistigo-artifact-playground/src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ declare const __ALISTIGO_LOCALE__: string;
/** Package name -> absolute filesystem path to its src/index.ts, dev only. */
declare const __ALISTIGO_DEV_PLUGIN_SRC_PATHS__: Record<string, string>;

/** Hostname baked in at dev-server time for Tailscale/LAN CSP expansion; empty string in production. */
declare const __ALISTIGO_DEV_HOSTNAME__: string;

/**
* Per-locale Lingui catalog, resolved by Vite via an alias to the
* compiled `.po` for the active LOCALE. See `src/i18n.ts`.
Expand Down
7 changes: 5 additions & 2 deletions apps/alistigo-artifact-playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* 3. Add a `build:<new>` target in this app's project.json.
*/

import os from "node:os";
import path, { resolve } from "node:path";
import linguiMacro from "@lingui/babel-plugin-lingui-macro";
import { lingui } from "@lingui/vite-plugin";
Expand Down Expand Up @@ -65,7 +66,7 @@ const componentsPackageRoot = path.resolve(__dirname, "../../packages/list-compo

const activeCatalogPath = path.join(componentsPackageRoot, `src/locales/${LOCALE}/messages.po`);

export default defineConfig({
export default defineConfig(({ command }) => ({
base: "./", // relative paths — required for GitHub Pages subpath deployment
plugins: [
{
Expand Down Expand Up @@ -98,10 +99,12 @@ export default defineConfig({
define: {
__ALISTIGO_LOCALE__: JSON.stringify(LOCALE),
__ALISTIGO_DEV_PLUGIN_SRC_PATHS__: JSON.stringify(devPluginSrcPaths),
__ALISTIGO_DEV_HOSTNAME__: JSON.stringify(command === "serve" ? os.hostname() : ""),
},
server: {
port: 5173,
strictPort: false,
allowedHosts: [os.hostname(), `${os.hostname()}.local`],
},
build: {
outDir: `dist/${LOCALE}`,
Expand All @@ -118,4 +121,4 @@ export default defineConfig({
},
},
},
});
}));
2 changes: 2 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ post-checkout:
commands:
install-deps:
run: if [ "{3}" = "1" ] && git diff {1} {2} --name-only 2>/dev/null | grep -qE 'package\.json|pnpm-lock\.yaml'; then pnpm install; fi
restart-dev:
run: if [ "{3}" = "1" ] && pnpm exec pm2 list 2>/dev/null | grep -q 'online'; then echo "Branch switched — restarting dev services..." && pnpm exec pm2 restart all; fi

commit-msg:
commands:
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"qa:lint": "nx run-many -t qa:lint",
"qa:arch-check": "depcruise apps packages cli --config .dependency-cruiser.cjs",
"qa:arch-calm": "nx run architecture:qa:arch-calm",
"server:start:dev": "pm2 start pm2.ecosystem.config.cjs",
"server:kill-all": "pm2 delete all 2>/dev/null; true",
"server:status": "pm2 status",
"server:logs": "pm2 logs",
"server:restart": "pm2 restart all",
"server:install-service": "bash scripts/install-dev-service.sh",
"qa:dead-code": "fallow dead-code",
"qa:audit": "fallow audit",
"qa:stories-check": "bash scripts/check-stories.sh",
Expand All @@ -36,12 +42,12 @@
"i18n:extract:clean": "lingui extract --clean",
"i18n:compile": "lingui compile",
"agent:dailylife": "bun apps/dailylife-cli/src/index.ts",
"kill": "lsof -ti :5173,:5174 | xargs kill -9 2>/dev/null; true",
"validate:file": "bun scripts/validate-file.ts",
"prepare": "if [ -d .git ]; then git config --unset-all core.hooksPath 2>/dev/null; lefthook install; fi"
},
"devDependencies": {
"@biomejs/biome": "2.4.6",
"pm2": "^5.4.0",
"@finos/calm-cli": "^1.58.0",
"@finos/calm-schema": "^1.2.0",
"@finos/calm-server": "^0.4.0",
Expand Down
Loading
Loading