Skip to content

fix: DRY shared domain logic, dynamic CORS for brand domains - #101

Merged
willwearing merged 1 commit into
mainfrom
fix/mcp-dry-shared-domain-logic
Apr 6, 2026
Merged

fix: DRY shared domain logic, dynamic CORS for brand domains#101
willwearing merged 1 commit into
mainfrom
fix/mcp-dry-shared-domain-logic

Conversation

@willwearing

Copy link
Copy Markdown
Owner

Summary

  • Extract duplicated domain logic (scaffold, validate, describe, fill-concept, quality gate) from CLI and MCP into @graspful/shared — eliminates ~700 lines of copy-paste across packages
  • Consolidate apiPost/apiGet into single apiFetch helper in MCP server
  • Add dynamic CORS in backend/src/main.ts: queries active brand domains from DB with a 5-min TTL cache so new brand custom domains work without redeploying
  • Bump CLI to 0.2.6, MCP to 0.2.4, shared to 0.2.3

Test plan

  • Unit tests pass (74 suites, 577 tests)
  • E2E smoke tests pass (24/24 docs-smoke)
  • Type check passes (no source file errors)
  • Lint passes

Generated with Claude Code

@vercel

vercel Bot commented Apr 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graspful Ready Ready Preview, Comment Apr 6, 2026 7:05pm

Static ALLOWED_ORIGINS alone blocks requests from brand custom domains
added after deploy. Query active brand domains from DB with a 5-min
TTL cache so new brands work without redeploying.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@willwearing
willwearing force-pushed the fix/mcp-dry-shared-domain-logic branch from 4f00226 to 4c812d5 Compare April 6, 2026 19:04
@willwearing
willwearing merged commit 5fcc12f into main Apr 6, 2026
5 checks passed
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