Skip to content

feat(sdk): replace Liam TailorDB ERD viewer#1319

Open
dqn wants to merge 22 commits into
mainfrom
feat/tailordb-erd-viewer
Open

feat(sdk): replace Liam TailorDB ERD viewer#1319
dqn wants to merge 22 commits into
mainfrom
feat/tailordb-erd-viewer

Conversation

@dqn
Copy link
Copy Markdown
Contributor

@dqn dqn commented Jun 4, 2026

Summary

Replace the Liam-based TailorDB ERD flow with a packaged TailorDB-specific static viewer generated from local SDK schema. The new viewer supports local export, watch-based serving, and deploy while preserving the existing erdSite deployment requirement.

Main changes

  • Generate ERD schema from local TailorDB config and plugin-generated type data instead of applied remote schema/Liam.
  • Add packaged viewer assets with table navigation, details, fit/zoom/pan controls, draggable cards, crow-foot relationship markers, and shareable viewport/table state.
  • Update tailordb erd export, serve, and deploy to write and serve <output>/<namespace>/dist.
  • Remove Liam CLI resolution and related package dependencies from the SDK.
  • Update CLI reference docs and add a changeset for the SDK minor release.

Deployed ERD

  • ERD viewer: https://my-erd-site-6ii00hf7vh.web.erp.dev
  • Workspace: tailordb-erd-viewer-20260604-163331 (1c579da0-7eae-41cf-9c3f-905f67e25d02)
  • App domain: my-app-6ii00hf7vh.erp.dev
  • Verified the ERD URL responds with HTTP/2 200 after deployment.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 4, 2026

🦋 Changeset detected

Latest commit: 142fd70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@tailor-platform/sdk Minor
@tailor-platform/create-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 4, 2026

Open in StackBlitz

pnpm add https://pkg.pr.new/@tailor-platform/create-sdk@142fd70
pnpm add https://pkg.pr.new/@tailor-platform/sdk@142fd70

commit: 142fd70

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dqn dqn marked this pull request as ready for review June 4, 2026 08:11
@dqn dqn requested review from remiposo and toiroakr as code owners June 4, 2026 08:11
@claude
Copy link
Copy Markdown

claude Bot commented Jun 4, 2026

📖 Docs Consistency Check

✅ No inconsistencies found between documentation and implementation.

Checked areas:

  • packages/sdk/docs/cli-reference.md - Command index and descriptions ✅
  • packages/sdk/docs/cli/tailordb.md - Full command documentation with options tables ✅
  • packages/sdk/README.md - Removed Liam dependency discussion ✅
  • example/tailor.config.ts - erdSite usage example ✅
  • Command implementations vs docs:
    • tailordb erd export - Correctly removed --workspace-id and --profile options, uses local schema ✅
    • tailordb erd serve - Correctly added --port and --open options, removed deployment args ✅
    • tailordb erd deploy - Correctly retains deployment args and erdSite requirement ✅

Key changes verified:

  1. Replaced Liam-based ERD flow with TailorDB-specific viewer
  2. All commands now work with local schema instead of applied remote schema
  3. Built-in server with watch reload replaces external serve dependency
  4. Documentation accurately describes new behavior including:
    • Local schema building with plugin-generated types
    • Output directory structure (<output>/<namespace>/dist)
    • Watch mode auto-refresh mechanism
    • erdSite requirement for deploy command

Re-run this check by adding the docs-check label to the PR.


@github-actions

This comment has been minimized.

- Reuse the shared hashContent helper for the ERD schema revision instead
  of a hand-rolled createHash call.
- Drop the unused erdDir field from ERD build targets and results.
- Build each table's type source once instead of twice.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@toiroakr toiroakr left a comment

Choose a reason for hiding this comment

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

Horizontal scrolling doesn't seem to work on the touchpad, so I'd like to fix it.

dqn added 2 commits June 6, 2026 07:34
# Conflicts:
#	packages/sdk/src/cli/commands/tailordb/erd/schema.test.ts
#	pnpm-lock.yaml
@dqn
Copy link
Copy Markdown
Contributor Author

dqn commented Jun 5, 2026

Horizontal scrolling doesn't seem to work on the touchpad, so I'd like to fix it.

Fixed in 142fd70.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Code Metrics Report (packages/sdk)

main (a0d07a9) #1319 (962b0b0) +/-
Coverage 66.0% 65.5% -0.6%
Code to Test Ratio 1:0.4 1:0.4 -0.1
Details
  |                    | main (a0d07a9) | #1319 (962b0b0) |  +/-  |
  |--------------------|----------------|-----------------|-------|
- | Coverage           |          66.0% |           65.5% | -0.6% |
  |   Files            |            394 |             395 |    +1 |
  |   Lines            |          13517 |           13696 |  +179 |
+ |   Covered          |           8930 |            8972 |   +42 |
- | Code to Test Ratio |          1:0.4 |           1:0.4 |  -0.1 |
  |   Code             |          90255 |           90712 |  +457 |
- |   Test             |          39186 |           39068 |  -118 |

Code coverage of files in pull request scope (57.3% → 46.6%)

Files Coverage +/- Status
packages/sdk/src/cli/commands/tailordb/erd/deploy.ts 5.2% 0.0% modified
packages/sdk/src/cli/commands/tailordb/erd/export.ts 4.2% +1.3% modified
packages/sdk/src/cli/commands/tailordb/erd/index.ts 100.0% 0.0% modified
packages/sdk/src/cli/commands/tailordb/erd/local-schema.ts 25.0% +25.0% added
packages/sdk/src/cli/commands/tailordb/erd/schema.ts 90.0% -3.6% modified
packages/sdk/src/cli/commands/tailordb/erd/serve.ts 18.7% +15.1% modified
packages/sdk/src/cli/commands/tailordb/erd/utils.ts 0.0% 0.0% modified
packages/sdk/src/cli/commands/tailordb/erd/viewer.ts 9.0% +9.0% added
packages/sdk/src/cli/services/application.ts 82.6% 0.0% modified
packages/sdk/src/cli/shared/config-loader.ts 82.3% -1.0% modified
packages/sdk/src/cli/shared/resolve-cli-bin.ts 0.0% 0.0% removed

SDK Configure Bundle Size

main (a0d07a9) #1319 (962b0b0) +/-
configure-index-size 19.37KB 19.37KB 0KB
dependency-chunks-size 34.65KB 34.65KB 0KB
total-bundle-size 54.02KB 54.02KB 0KB

Runtime Performance

main (a0d07a9) #1319 (962b0b0) +/-
Generate Median 2,743ms 2,720ms -23ms
Generate Max 2,817ms 2,739ms -78ms
Apply Build Median 2,782ms 2,769ms -13ms
Apply Build Max 2,826ms 2,938ms 112ms

Type Performance (instantiations)

main (a0d07a9) #1319 (962b0b0) +/-
tailordb-basic 33,963 33,963 0
tailordb-optional 3,841 3,841 0
tailordb-relation 5,921 5,921 0
tailordb-validate 2,566 2,566 0
tailordb-hooks 5,767 5,767 0
tailordb-object 12,136 12,136 0
tailordb-enum 2,462 2,462 0
resolver-basic 9,424 9,424 0
resolver-nested 26,111 26,111 0
resolver-array 18,187 18,187 0
executor-schedule 4,234 4,234 0
executor-webhook 873 873 0
executor-record 6,659 6,659 0
executor-resolver 4,369 4,369 0
executor-operation-function 868 868 0
executor-operation-gql 869 869 0
executor-operation-webhook 888 888 0
executor-operation-workflow 1,714 1,714 0

Reported by octocov

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.

2 participants