2026-05-20 10:27:40 +08:00
|
|
|
|
# 环境模板在 app-expo/env/{development,staging,production}(勿在根目录放 .env.production)。
|
2026-03-23 13:21:07 +08:00
|
|
|
|
# 本地:npm start 会通过 prestart 执行 `use-env development` 生成 .env;
|
|
|
|
|
|
# 或手动 `npm run use-env -- staging` / `npm run use-env -- production`。
|
|
|
|
|
|
# CI:GitHub Actions 在构建 APK 前会按分支调用 use-env(main → staging,tag → production)。
|
|
|
|
|
|
#
|
2026-05-20 10:27:40 +08:00
|
|
|
|
# 勿在 app-expo 根目录创建 .env.staging / .env.production:Release 构建时 Expo 会按
|
|
|
|
|
|
# NODE_ENV=production 自动加载 .env.production,覆盖 use-env 写入的 .env。
|
|
|
|
|
|
#
|
|
|
|
|
|
# APP_VARIANT / EXPO_PUBLIC_APP_VARIANT:控制 Bundle ID 与「关于」页是否显示后端地址
|
|
|
|
|
|
# development / staging → 显示版本 + API 地址;production → 仅版本号
|
|
|
|
|
|
#
|
2026-03-23 13:21:07 +08:00
|
|
|
|
# 变量在构建时注入;修改后需重新 prebuild/打包客户端。
|
2026-05-08 17:28:31 +08:00
|
|
|
|
#
|
|
|
|
|
|
# 助手朗读:无独立 EXPO_PUBLIC_* TTS 开关。会话页顶栏在每轮 WebSocket 中带 `tts_this_turn`;
|
|
|
|
|
|
# 服务端是否具备合成能力见 api/.env 中 ENABLE_TTS 等(模板见 api/.env.example)。
|
2026-03-23 13:21:07 +08:00
|
|
|
|
|
2026-05-20 10:27:40 +08:00
|
|
|
|
# --- development(本地,关于页显示版本 + API)---
|
|
|
|
|
|
# APP_VARIANT=development
|
|
|
|
|
|
# EXPO_PUBLIC_APP_VARIANT=development
|
|
|
|
|
|
# EXPO_PUBLIC_API_URL=http://127.0.0.1:8000
|
|
|
|
|
|
# EXPO_PUBLIC_WS_URL=ws://127.0.0.1:8000
|
|
|
|
|
|
|
feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31) (#32)
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
* chore: enable Grafana Assistant Cursor plugin
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:14:13 +08:00
|
|
|
|
# --- staging(必填,无默认值;示例见 env/staging)---
|
2026-05-20 10:27:40 +08:00
|
|
|
|
# APP_VARIANT=staging
|
|
|
|
|
|
# EXPO_PUBLIC_APP_VARIANT=staging
|
feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31) (#32)
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
* chore: enable Grafana Assistant Cursor plugin
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 15:14:13 +08:00
|
|
|
|
# EXPO_PUBLIC_API_URL=http://your-staging-host:8000
|
|
|
|
|
|
# EXPO_PUBLIC_WS_URL=ws://your-staging-host:8000
|
|
|
|
|
|
|
|
|
|
|
|
# --- production ---
|
|
|
|
|
|
# EXPO_PUBLIC_API_URL=https://your-api.example.com
|
|
|
|
|
|
# EXPO_PUBLIC_WS_URL=wss://your-api.example.com
|