john b5c600ad81 Split back-office into standalone memind_adm service
Carve the platform super-admin API (/admin-api) and plaza operations console
API (/api/ops/v1) out of the public server.mjs into their own process, so the
user-facing fleet can no longer be taken down or scaled by back-office traffic.

Architecture (split-ready, single process for now):
- admin-routes.mjs: createAdminApi / createOpsApi route factories (DI, single
  source of truth; the route logic moved verbatim out of server.mjs).
- admin-bootstrap.mjs: lean service container (user-auth, LLM providers, minimal
  plaza graph) with no user-facing daemons.
- admin-server.mjs: standalone entry with a console registry. ADMIN_CONSOLES
  selects which consoles a process mounts (default both), so splitting into two
  processes later is a config change, not a code change.
- admin-guard.mjs (+ tests): per-console host / IP-CIDR allowlists, letting the
  super-admin surface be locked down harder than moderation.

server.mjs no longer serves or mounts either surface. user-auth.mjs gains
pagination on listUsers/listUsageRecords/listBillingLedger to back the admin
dashboards. dev.mjs launches memind_adm; the ops SPA proxies /api to it while
/auth stays on the portal. Sessions are read from the shared cookie
(H5_COOKIE_DOMAIN=.tkmind.cn); login stays on the main domain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 20:55:23 +08:00

Memind (TKMind H5)

Memind 主应用与 Plaza 发现广场。当前以本机 Mac 为主服务105 服务器已停用。

开发基线: v0.1.0-baseline2026-06-16)— 后续开发请从此 tag 创建分支,详见 docs/BASELINE.md

快速开始

pnpm install
cp .env.example .env   # 按需填写
pnpm dev               # MindSpace + Plaza + Ops

仅 Plaza

pnpm start:plaza       # 本机正式模式(Tunnel 回源)
pnpm dev:plaza         # 开发热更新
pnpm open:plaza        # 浏览器打开 https://plaza.tkmind.cn/plaza

Plaza 本机为主

完整说明见 docs/plaza-local.md,摘要如下:

步骤 命令
首次 DNS sudo pnpm setup:plaza-dns
首次 TLS(可选) sudo pnpm setup:plaza-local
公网 Tunnel pnpm setup:plaza-tunnel
日常正式 pnpm start:plaza
开发调试 pnpm dev:plaza
诊断 pnpm check:plaza

公网 https://plaza.tkmind.cn 经 Cloudflare Tunnel 回源本机 :3001,需保持 pnpm start:plaza 运行。

常用脚本

命令 说明
pnpm dev 全栈开发
pnpm start:plaza Plaza 正式模式 + Portal
pnpm dev:plaza Plaza 开发模式 + Portal
pnpm open:plaza 浏览器强制本地解析
pnpm check:plaza 本地 Plaza 诊断
pnpm test 单元测试

文档

S
Description
Memind project
Readme 82 MiB
Languages
JavaScript 82.6%
TypeScript 11.4%
Shell 2.5%
CSS 2.2%
HTML 1.1%
Other 0.2%