diff --git a/.changeset/strip-erd-components.md b/.changeset/strip-erd-components.md
index 65e4db3525..f8106f3b6b 100644
--- a/.changeset/strip-erd-components.md
+++ b/.changeset/strip-erd-components.md
@@ -1,8 +1,8 @@
---
-"@liam-hq/erd-core": patch
-"@liam-hq/schema": patch
-"@liam-hq/ui": patch
-"@liam-hq/cli": patch
+"@dlh/erd-viewer-core": patch
+"@dlh/erd-viewer-schema": patch
+"@dlh/erd-viewer-ui": patch
+"@dlh/erd-viewer-cli": patch
---
Remove workspace dependency on @liam-hq/neverthrow by inlining helper functions
diff --git a/.claude/commands/benchmark-execute.md b/.claude/commands/benchmark-execute.md
index 03e8a716f9..f6521728ae 100644
--- a/.claude/commands/benchmark-execute.md
+++ b/.claude/commands/benchmark-execute.md
@@ -27,7 +27,7 @@ Execute schema benchmark comparison between LiamDB and OpenAI models.
First, I'll clean up any existing workspace and set up a fresh benchmark environment with multiple datasets:
```bash
-rm -rf benchmark-workspace && pnpm --filter @liam-hq/schema-bench setupWorkspace
+rm -rf benchmark-workspace && pnpm --filter @dlh/erd-viewer-schema-bench setupWorkspace
```
This will set up four benchmark datasets:
@@ -46,24 +46,24 @@ Next, I'll execute the specified model with dataset selection:
{{#if (eq (lower model) "liamdb")}}
```bash
# Run LiamDB on all datasets in the workspace
-pnpm --filter @liam-hq/schema-bench executeLiamDB -all
+pnpm --filter @dlh/erd-viewer-schema-bench executeLiamDB -all
# Run LiamDB on a specific dataset
-pnpm --filter @liam-hq/schema-bench executeLiamDB -entity-extraction
+pnpm --filter @dlh/erd-viewer-schema-bench executeLiamDB -entity-extraction
# Run LiamDB on the ambiguous-recall dataset only
-pnpm --filter @liam-hq/schema-bench executeLiamDB -ambiguous-recall
+pnpm --filter @dlh/erd-viewer-schema-bench executeLiamDB -ambiguous-recall
# Run LiamDB on the logical-deletion dataset only
-pnpm --filter @liam-hq/schema-bench executeLiamDB -logical-deletion
+pnpm --filter @dlh/erd-viewer-schema-bench executeLiamDB -logical-deletion
# Run LiamDB on multiple datasets
-pnpm --filter @liam-hq/schema-bench executeLiamDB -default -entity-extraction -ambiguous-recall -logical-deletion
+pnpm --filter @dlh/erd-viewer-schema-bench executeLiamDB -default -entity-extraction -ambiguous-recall -logical-deletion
```
{{else if (eq (lower model) "openai")}}
```bash
# OpenAI currently targets the default dataset
-pnpm --filter @liam-hq/schema-bench executeOpenai
+pnpm --filter @dlh/erd-viewer-schema-bench executeOpenai
```
{{else}}
**Error**: Invalid model specified. Please use 'LiamDB' or 'OpenAI'.
@@ -72,7 +72,7 @@ pnpm --filter @liam-hq/schema-bench executeOpenai
If execution succeeds, I'll run the evaluation on all datasets:
```bash
-pnpm --filter @liam-hq/schema-bench evaluateSchemaMulti
+pnpm --filter @dlh/erd-viewer-schema-bench evaluateSchemaMulti
```
The evaluation will display comprehensive metrics for each dataset:
diff --git a/.claude/commands/deparse-dataset-to-schema.md b/.claude/commands/deparse-dataset-to-schema.md
index 8b27e92a22..a11caabf0e 100644
--- a/.claude/commands/deparse-dataset-to-schema.md
+++ b/.claude/commands/deparse-dataset-to-schema.md
@@ -6,12 +6,12 @@ description: Convert JSON benchmark datasets back to schema files
## Task
-Convert a JSON schema dataset to a schema file in the specified format using @liam-hq/schema deparser functionality.
+Convert a JSON schema dataset to a schema file in the specified format using @dlh/erd-viewer-schema deparser functionality.
### Process
1. Read the JSON dataset from the specified input path
-2. Use @liam-hq/schema's `postgresqlSchemaDeparser` function to convert JSON to SQL DDL
+2. Use @dlh/erd-viewer-schema's `postgresqlSchemaDeparser` function to convert JSON to SQL DDL
3. Save the generated schema file to the specified output path
4. Verify the generated schema is valid and properly formatted
diff --git a/.claude/commands/parse-schema-for-dataset.md b/.claude/commands/parse-schema-for-dataset.md
index 7781beb5f4..a1ec79df07 100644
--- a/.claude/commands/parse-schema-for-dataset.md
+++ b/.claude/commands/parse-schema-for-dataset.md
@@ -11,7 +11,7 @@ Parse the specified schema file (SQL, Prisma, Drizzle, etc.) to JSON format and
### Process
1. Identify the input schema file format (postgres, prisma, drizzle, tbls, schemarb)
-2. Use the @liam-hq/schema parser to convert to JSON
+2. Use the @dlh/erd-viewer-schema parser to convert to JSON
3. Save the output to an appropriately named case file in the benchmark reference directory
4. Verify the generated JSON structure matches the expected format
diff --git a/.github/workflows/agent-deep-modeling.yml b/.github/workflows/agent-deep-modeling.yml
deleted file mode 100644
index e6828a07f7..0000000000
--- a/.github/workflows/agent-deep-modeling.yml
+++ /dev/null
@@ -1,124 +0,0 @@
-name: agent-deep-modeling
-
-on:
- pull_request:
- paths:
- - 'frontend/internal-packages/agent/**'
- - 'frontend/internal-packages/artifact/**'
- - 'frontend/internal-packages/db/**'
- - 'frontend/packages/schema/**'
- - 'frontend/internal-packages/pglite-server/**'
- - '.github/workflows/agent-deep-modeling.yml'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-jobs:
- agent-deep-modeling:
- runs-on: ubuntu-latest
- timeout-minutes: 30
- permissions:
- contents: read
- pull-requests: write
-
- steps:
- - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- with:
- persist-credentials: false
-
- - uses: ./.github/actions/pnpm-setup
-
- - name: Start Supabase
- run: pnpm --filter @liam-hq/db supabase:start
-
- - name: Setup environment
- run: cp .env.template .env
-
- - name: Make scripts executable
- run: chmod +x ./scripts/extract-supabase-anon-key.sh ./scripts/extract-supabase-service-key.sh
-
- - name: Extract Supabase keys
- run: |
- ./scripts/extract-supabase-anon-key.sh
- ./scripts/extract-supabase-service-key.sh
-
- - name: Build schema package
- run: pnpm build --filter @liam-hq/schema
-
- - name: Execute deep modeling process
- id: deep-modeling
- env:
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
- LANGSMITH_PROJECT: ${{ secrets.LANGSMITH_PROJECT }}
- LANGSMITH_ORGANIZATION_ID: ${{ secrets.LANGSMITH_ORGANIZATION_ID }}
- LANGSMITH_PROJECT_ID: ${{ secrets.LANGSMITH_PROJECT_ID }}
- NO_COLOR: 1
- shell: bash
- run: |
- start_time=$(date +%s)
- start_time_formatted=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
-
- echo "## 🤖 Agent Deep Modeling Execution" > execution_log.md
- echo "" >> execution_log.md
- echo "**Started at:** $start_time_formatted" >> execution_log.md
- echo "" >> execution_log.md
- echo "" >> execution_log.md
- echo "View Details
" >> execution_log.md
- echo "" >> execution_log.md
- echo "### Command Output" >> execution_log.md
- echo "" >> execution_log.md
-
- set -o pipefail
- pnpm --filter @liam-hq/agent execute-deep-modeling 2>&1 | tee -a execution_log.md
- exit_code=${PIPESTATUS[0]}
-
- end_time=$(date +%s)
- end_time_formatted=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
- duration=$((end_time - start_time))
-
- # Convert duration to human readable format
- hours=$((duration / 3600))
- minutes=$(((duration % 3600) / 60))
- seconds=$((duration % 60))
-
- if [ $hours -gt 0 ]; then
- duration_formatted="${hours}h ${minutes}m ${seconds}s"
- elif [ $minutes -gt 0 ]; then
- duration_formatted="${minutes}m ${seconds}s"
- else
- duration_formatted="${seconds}s"
- fi
-
- echo "" >> execution_log.md
-
- if [ $exit_code -eq 0 ]; then
- echo "✅ **Status:** Completed successfully" >> execution_log.md
- echo "success=true" >> $GITHUB_OUTPUT
- else
- echo "❌ **Status:** Failed with exit code $exit_code" >> execution_log.md
- echo "success=false" >> $GITHUB_OUTPUT
- echo "exit_code=$exit_code" >> $GITHUB_OUTPUT
- fi
-
- echo "" >> execution_log.md
- echo "**Finished at:** $end_time_formatted" >> execution_log.md
- echo "" >> execution_log.md
- echo " " >> execution_log.md
-
- # Insert processing time after the header using sed
- sed -i '2a\\n**Processing time:** '"$duration_formatted"'' execution_log.md
- continue-on-error: true
-
- - name: Post execution log to PR
- uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
- with:
- header: agent-deep-modeling-execution
- path: execution_log.md
-
- - name: Check execution result
- if: steps.deep-modeling.outputs.success == 'false'
- run: |
- echo "Agent deep modeling execution failed"
- exit 1
diff --git a/.github/workflows/database-ci.yml b/.github/workflows/database-ci.yml
index 03fade5fb6..2cb83a138c 100644
--- a/.github/workflows/database-ci.yml
+++ b/.github/workflows/database-ci.yml
@@ -31,7 +31,7 @@ jobs:
- uses: ./.github/actions/pnpm-setup
- name: Run Splinter Lint
- run: pnpm -F @liam-hq/db db:lint
+ run: pnpm -F @dlh/erd-viewer-db db:lint
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:54322/postgres
SPLINTER_DEBUG: 1
diff --git a/.github/workflows/figma-to-css-variables.yml b/.github/workflows/figma-to-css-variables.yml
index 188afd376f..3c796fe75f 100644
--- a/.github/workflows/figma-to-css-variables.yml
+++ b/.github/workflows/figma-to-css-variables.yml
@@ -21,7 +21,7 @@ jobs:
with:
persist-credentials: false
- uses: ./.github/actions/pnpm-setup
- - run: pnpm --filter @liam-hq/figma-to-css-variables sync --output '../../apps/service-site/src/styles' --filter-modes "Dark,Mode 1"
+ - run: pnpm --filter @dlh/erd-viewer-figma-to-css-variables sync --output '../../apps/service-site/src/styles' --filter-modes "Dark,Mode 1"
env:
FIGMA_FILE_KEY: ${{ secrets.FIGMA_FILE_KEY }}
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml
index 3dcd8b37ff..71b0aed9c8 100644
--- a/.github/workflows/frontend-ci.yml
+++ b/.github/workflows/frontend-ci.yml
@@ -64,23 +64,4 @@ jobs:
with:
persist-credentials: false
- uses: ./.github/actions/pnpm-setup
- - run: pnpm --filter @liam-hq/db supabase:start
- - run: cp .env.template .env
- - name: Make scripts executable
- run: chmod +x ./scripts/extract-supabase-anon-key.sh ./scripts/extract-supabase-service-key.sh
- - run: ./scripts/extract-supabase-anon-key.sh
- - run: ./scripts/extract-supabase-service-key.sh
- run: pnpm test
- - run: pnpm --filter @liam-hq/db supabase:gen
- - name: Check for diff in generated types and schema.sql
- env:
- # check two files.
- GENERATED_FILES: "frontend/internal-packages/db/supabase/database.types.ts frontend/internal-packages/db/supabase/schemas/schema.sql"
- run: |
- if ! git diff HEAD --ignore-space-at-eol --exit-code ${{ env.GENERATED_FILES }}; then
- echo "Generated types and schema.sql differ from committed files."
- exit 1
- else
- echo "Generated types and schema.sql are up-to-date."
- exit 0
- fi
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bdbceaaf12..9e59f5a667 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,7 +1,7 @@
# NOTE: This workflow is configured as a Trusted Publisher on npmjs.com
# The workflow filename "release.yml" is registered in the Trusted Publisher settings.
# If you rename this file, you must also update the Trusted Publisher configuration on npmjs.com
-# ex. https://www.npmjs.com/package/@liam-hq/cli/access
+# ex. https://www.npmjs.com/package/@dlh/erd-viewer-cli/access
name: release
on:
diff --git a/.github/workflows/released_package_test.yml b/.github/workflows/released_package_test.yml
index 2194940961..e46c5eedd9 100644
--- a/.github/workflows/released_package_test.yml
+++ b/.github/workflows/released_package_test.yml
@@ -28,7 +28,7 @@ jobs:
run: |
echo "Starting after ${{ github.event.inputs.delay_seconds }} seconds"
sleep ${{ github.event.inputs.delay_seconds }}
- - name: "check @liam-hq/cli exit code 1: version check"
+ - name: "check @dlh/erd-viewer-cli exit code 1: version check"
shell: bash
run: |
version="${{ github.event.inputs.version }}"
@@ -40,22 +40,22 @@ jobs:
echo "Error: Invalid version format"
exit 1
fi
- npx --yes @liam-hq/cli@${version} --version
+ npx --yes @dlh/erd-viewer-cli@${version} --version
- - name: "check @liam-hq/cli exit code 2: --format postgres check"
+ - name: "check @dlh/erd-viewer-cli exit code 2: --format postgres check"
run: |
version="${{ github.event.inputs.version }}"
- npx --yes @liam-hq/cli@${version} erd build --input https://github.com/liam-hq/liam/blob/main/frontend/internal-packages/db/supabase/schemas/schema.sql --format postgres
+ npx --yes @dlh/erd-viewer-cli@${version} erd build --input https://github.com/liam-hq/liam/blob/main/frontend/internal-packages/db/supabase/schemas/schema.sql --format postgres
- - name: "check @liam-hq/cli exit code 3: --format schemarb check"
+ - name: "check @dlh/erd-viewer-cli exit code 3: --format schemarb check"
run: |
version="${{ github.event.inputs.version }}"
- npx --yes @liam-hq/cli@${version} erd build --input https://github.com/mastodon/mastodon/blob/e2f085e2b2cec08dc1f5ae825730c2a3bf62e054/db/schema.rb --format schemarb
+ npx --yes @dlh/erd-viewer-cli@${version} erd build --input https://github.com/mastodon/mastodon/blob/e2f085e2b2cec08dc1f5ae825730c2a3bf62e054/db/schema.rb --format schemarb
- - name: "check @liam-hq/cli exit code 4: --format prisma check"
+ - name: "check @dlh/erd-viewer-cli exit code 4: --format prisma check"
run: |
version="${{ github.event.inputs.version }}"
- npx --yes @liam-hq/cli@${version} erd build --input https://github.com/langfuse/langfuse/blob/cf29c6b7e447cf1aec7a8d50ae6a877c3844b7cd/packages/shared/prisma/schema.prisma --format prisma
+ npx --yes @dlh/erd-viewer-cli@${version} erd build --input https://github.com/langfuse/langfuse/blob/cf29c6b7e447cf1aec7a8d50ae6a877c3844b7cd/packages/shared/prisma/schema.prisma --format prisma
# derived from https://github.com/route06/actions/blob/8e3ac6855302a4fe3bd621ebd16c7a0da261948a/.github/workflows/notify_slack_on_ci_failed.yml
diff --git a/.syncpackrc b/.syncpackrc
index d75694d0c1..b4729a965b 100644
--- a/.syncpackrc
+++ b/.syncpackrc
@@ -47,7 +47,7 @@
{
"label": "Allow Storybook to use zod v3",
"dependencies": ["zod"],
- "packages": ["@liam-hq/storybook"],
+ "packages": ["@dlh/erd-viewer-storybook"],
"isIgnored": true
}
]
diff --git a/AGENTS.md b/AGENTS.md
index ff91e56508..a885d0e458 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,44 +1,51 @@
# Repository Guidelines
## Project Structure & Modules
-- frontend/apps/*: Next.js apps (e.g., `@liam-hq/app`, `@liam-hq/docs`).
-- frontend/packages/*: Shared libraries and tools (e.g., `schema`, `erd-core`, `cli`, `ui`).
+
+- frontend/apps/*: Next.js apps (e.g., `@dlh/erd-viewer-app`, `@dlh/erd-viewer-docs`).
+- frontend/packages/*: Shared libraries and tools (e.g., `erd-viewer-schema`, `erd-viewer-core`, `erd-viewer-cli`, `erd-viewer-ui`).
- frontend/internal-packages/*: Infra and tooling (`e2e`, `configs`, `storybook`, `agent`).
- assets/: Images and media. docs/: Documentation. scripts/: Repo utilities.
## Build, Test, and Development
+
- Install: `pnpm install`
- All apps/packages (Turbo):
- - Dev: `pnpm dev` (or one app: `pnpm -F @liam-hq/app dev`)
+ - Dev: `pnpm dev` (or one app: `pnpm -F @dlh/erd-viewer-app dev`)
- Build: `pnpm build`
- Test (unit): `pnpm test`
- E2E (Playwright): `pnpm test:e2e`
- Coverage: `pnpm test:coverage`
- App-only examples:
- - Run Next dev: `pnpm -F @liam-hq/app dev:next`
- - Build Next: `pnpm -F @liam-hq/app build`
+ - Run Next dev: `pnpm -F @dlh/erd-viewer-app dev:next`
+ - Build Next: `pnpm -F @dlh/erd-viewer-app build`
## Coding Style & Naming
+
- Language: TypeScript/TSX; React components in PascalCase (e.g., `App.tsx`); utilities in camelCase (e.g., `mergeSchema.ts`).
- CSS Modules: `*.module.css` with typed CSS via `typed-css-modules`.
- Lint/Format: Biome and ESLint. Run `pnpm fmt` and `pnpm lint`. Pre-commit hooks run `pnpm lint` (see `lefthook.yml`).
## Testing Guidelines
+
- Unit tests: Vitest. Place near source as `*.test.ts(x)` or in `__tests__/`.
- E2E tests: Playwright in `frontend/internal-packages/e2e`.
- Commands: `pnpm test` for unit, `pnpm test:e2e` for Playwright, `pnpm test:coverage` for V8 coverage.
## Commit & Pull Requests
+
- Commit style: Conventional Commits (e.g., `feat:`, `fix:`, `chore(deps): ...`).
- Before pushing: `pnpm fmt && pnpm lint && pnpm test`.
- PRs: clear description, linked issues, screenshots for UI changes, and note any env or migration impacts.
- Versioning: If you change a publishable package, add a changeset: `pnpm changeset`.
## Security & Configuration
+
- Environment: use `.env`/`.env.local` (created automatically by `pnpm prebuild`). Never commit secrets.
- Sync Vercel envs (optional): `pnpm vercel:env-pull` and link with `pnpm vercel:link`.
- Common vars: `NEXT_PUBLIC_*`, Sentry keys, and job runner tokens (see `turbo.json` env list).
## Tips
+
- Target a single package with `pnpm -F