Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,16 @@ frontend/.output/
frontend/.cache/
frontend/coverage/

# Embedded frontend assets (auto-generated)
web/frontend/
# Embedded frontend assets (auto-generated by `make frontend-build`).
# Everything under web/frontend/dist/ is rebuilt from frontend/ on every
# `make build`, except the tracked .gitkeep — it exists only so that the
# //go:embed all:frontend/dist directive in web/web.go can compile from a
# fresh module fetch (e.g. `go install …@latest`) before the real UI has
# been produced. The explicit re-includes are needed because the generic
# `dist/` rule above would otherwise mask web/frontend/dist entirely.
!web/frontend/dist/
web/frontend/dist/*
!web/frontend/dist/.gitkeep

# Test coverage
coverage.out
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ frontend-build:
cd frontend && npm install && npm run build
@echo "📁 Copying dist files for embedding..."
rm -rf web/frontend
mkdir -p web/frontend
cp -r frontend/dist web/frontend/
mkdir -p web/frontend/dist
cp -r frontend/dist/. web/frontend/dist/
# Recreate the tracked .gitkeep so //go:embed all:frontend/dist still has
# something to embed even before the real UI is built (e.g. on a fresh
# `go install …@latest`), and so subsequent rebuilds don't show a phantom
# "deleted .gitkeep" in `git status`.
touch web/frontend/dist/.gitkeep
@echo "✅ Frontend build completed"

# Start frontend development server
Expand Down
38 changes: 38 additions & 0 deletions web/embedded_fallback/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MCPProxy — Web UI not built</title>
<style>
:root { color-scheme: light dark; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; max-width: 42rem; margin: 4rem auto; padding: 0 1rem; line-height: 1.55; }
h1 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin: 0.75rem 0; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.95em; }
pre { background: rgba(127,127,127,0.12); padding: 0.75rem 1rem; border-radius: 6px; overflow-x: auto; }
a { color: inherit; }
</style>
</head>
<body>
<h1>MCPProxy Web UI is not embedded in this build</h1>
<p>
This binary was built without running the frontend build step, so the
React/Vue UI assets are not embedded. The REST API and MCP endpoints
still work normally — this fallback page only replaces the
<code>/ui/</code> route.
</p>
<p>
If you installed mcpproxy with <code>go install …@latest</code> or
bare <code>go build ./cmd/mcpproxy</code>, this is expected: the Go
toolchain doesn't run <code>npm</code>. To get the real UI, either
install a release artifact (DMG, Homebrew, .deb, .rpm, AUR, Docker)
or build from source with:
</p>
<pre>make build # full build (swagger + frontend + backend)
make build-server # server edition</pre>
<p>
See <a href="https://github.com/smart-mcp-proxy/mcpproxy-go#installation">the project README</a> for details.
</p>
</body>
</html>
Empty file added web/frontend/dist/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion web/frontend/dist/assets/Activity-7YqHqUto.css

This file was deleted.

1 change: 0 additions & 1 deletion web/frontend/dist/assets/Activity-DhitPCWU.js

This file was deleted.

1 change: 0 additions & 1 deletion web/frontend/dist/assets/AdminDashboard-C1SaV16-.js

This file was deleted.

1 change: 0 additions & 1 deletion web/frontend/dist/assets/AdminServers-Bq_mhKvu.js

This file was deleted.

Loading
Loading