docs(readme): 中文 README 改以多租户改造为主线 + 忽略 IDE/agent 产物
- README_zh.md:全面重写,把 workspace 租户模型 / Postgres 默认后端 / 行级隔离 / 扩展 JWT / per-workspace 路径 / Headless API schema / apps 脚手架作为主线,新增「多租户改造」「数据库后端」「多租户架构详解」 「apps/」章节,并补 Stage 0–4 路线图与文档入口 - .gitignore:忽略 .qoder/(Qoder repowiki 产物)与 AGENTS.md(agent 指令) - verify_stage0.sh:e2e 校验改用 verify-stage0.com 邮箱域、先 initialize admin、切到 /api/v1/ auth 路径 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -277,19 +277,35 @@ phase_e2e() {
|
||||
|
||||
local tag
|
||||
tag=$(date +%s)
|
||||
local alice="alice-${tag}@verify.local"
|
||||
local bob="bob-${tag}@verify.local"
|
||||
local pw="VerifyStage0_${tag}"
|
||||
local alice="alice-${tag}@verify-stage0.com"
|
||||
local bob="bob-${tag}@verify-stage0.com"
|
||||
local pw="VerifyStage0_${tag}!"
|
||||
local jar_a=/tmp/verify_alice_${tag}.cookies
|
||||
local jar_b=/tmp/verify_bob_${tag}.cookies
|
||||
rm -f "$jar_a" "$jar_b"
|
||||
|
||||
# Ensure system is initialized (admin account exists) before registering users.
|
||||
info "ensuring admin account exists (POST /api/v1/auth/initialize)"
|
||||
local init_code
|
||||
init_code=$(curl -sS -o /dev/null -w '%{http_code}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{\"email\":\"admin-${tag}@verify-stage0.com\",\"password\":\"$pw\"}" \
|
||||
"$GATEWAY_URL/api/v1/auth/initialize")
|
||||
if [ "$init_code" = "201" ]; then
|
||||
ok "admin initialized (first boot)"
|
||||
elif [ "$init_code" = "409" ]; then
|
||||
ok "admin already exists (system previously initialized)"
|
||||
else
|
||||
fail "admin initialization returned $init_code"
|
||||
return
|
||||
fi
|
||||
|
||||
register_user() {
|
||||
local jar="$1"; local email="$2"
|
||||
curl -sS -c "$jar" -o /tmp/verify_register_$$.json -w '%{http_code}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{\"email\":\"$email\",\"password\":\"$pw\"}" \
|
||||
"$GATEWAY_URL/api/auth/register"
|
||||
"$GATEWAY_URL/api/v1/auth/register"
|
||||
}
|
||||
|
||||
info "registering Alice + Bob"
|
||||
|
||||
Reference in New Issue
Block a user