feat: add shadcn admin workspace

This commit is contained in:
2026-03-28 17:56:36 +08:00
parent ec96d91548
commit 178434d63e
41 changed files with 6153 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
param(
[switch]$FrontendOnly,
[switch]$BackendOnly,
[switch]$AdminOnly,
[switch]$McpOnly,
[switch]$WithMcp,
[string]$DatabaseUrl = "postgres://postgres:postgres%402025%21@10.0.0.2:5432/termi-api_development",
@@ -16,10 +17,11 @@ $stopScript = Join-Path $repoRoot "stop-services.ps1"
$devScript = Join-Path $repoRoot "dev.ps1"
$frontendScript = Join-Path $repoRoot "start-frontend.ps1"
$backendScript = Join-Path $repoRoot "start-backend.ps1"
$adminScript = Join-Path $repoRoot "start-admin.ps1"
$mcpScript = Join-Path $repoRoot "start-mcp.ps1"
if (@($FrontendOnly, $BackendOnly, $McpOnly).Where({ $_ }).Count -gt 1) {
throw "Use only one of -FrontendOnly, -BackendOnly, or -McpOnly."
if (@($FrontendOnly, $BackendOnly, $AdminOnly, $McpOnly).Where({ $_ }).Count -gt 1) {
throw "Use only one of -FrontendOnly, -BackendOnly, -AdminOnly, or -McpOnly."
}
Write-Host "[restart] Stopping target services first..." -ForegroundColor Cyan
@@ -30,6 +32,9 @@ if ($FrontendOnly) {
elseif ($BackendOnly) {
& $stopScript -BackendOnly
}
elseif ($AdminOnly) {
& $stopScript -AdminOnly
}
elseif ($McpOnly) {
& $stopScript -McpOnly
}
@@ -60,6 +65,16 @@ if ($BackendOnly) {
exit 0
}
if ($AdminOnly) {
Start-Process powershell -ArgumentList @(
"-NoExit",
"-ExecutionPolicy", "Bypass",
"-File", $adminScript
)
Write-Host "[restart] Admin window restarted." -ForegroundColor Green
exit 0
}
if ($McpOnly) {
Start-Process powershell -ArgumentList @(
"-NoExit",