# EXP Env Example

This file is a sanitized snapshot of the current exp env shape.

## Public contract

```dotenv
ENV_NAME=exp
ENV_ROOT=/home/ec2-user/nexuscrm-deployment/offline/envs/exp
DOWNSTREAM_REF=main
UPSTREAM_REF=stable/biz-system-case-clean
OFFICIAL_APP_PACKS_REF=stable/biz-system-case-clean
BACKEND_PORT=3103
PUBLIC_BASE_URL=https://nexuscrm-new-exp.pingcap.com
SERVER_NAME=nexuscrm-new-exp.pingcap.com
TIDB_HOST=127.0.0.1
TIDB_PORT=4000
TIDB_DATABASE=nexuscrm_sandbox_exp
TIDB_TLS=false
RESET_DB=1
RESET_TIDB_BRANCH=0
INSTALL_SYSTEMD=1
INSTALL_NGINX=0
FILE_STORAGE_PROVIDER=filesystem
FILE_STORAGE_ROOT=/home/ec2-user/nexuscrm-deployment/offline/envs/exp/shared/data/object-storage
FILE_STORAGE_LEGACY_UPLOAD_ROOT=/home/ec2-user/nexuscrm-deployment/offline/envs/exp/shared/data/uploads
TMPDIR=/home/ec2-user/nexuscrm-deployment/offline/envs/exp/shared/tmp
GOCACHE=/home/ec2-user/nexuscrm-deployment/offline/envs/exp/shared/cache/go-build
GOMODCACHE=/home/ec2-user/nexuscrm-deployment/offline/envs/exp/shared/cache/gomod
GOTMPDIR=/home/ec2-user/nexuscrm-deployment/offline/envs/exp/shared/tmp/go-build
GOOGLE_CLIENT_ID=<google-oauth-client-id>
GOOGLE_CLIENT_SECRET=<google-oauth-client-secret>
REACT_APP_GOOGLE_CLIENT_ID=<google-oauth-client-id>
NEXUS_LOGIN_METHODS=google,backend

# Optional local-dev overrides:
# FRONTEND_URL=http://127.0.0.1:5173
# CORS_ALLOWED_ORIGINS=http://127.0.0.1:5173,http://localhost:5173
# NEXUS_API_HOURLY_LIMIT=100000
# NEXUS_API_DAILY_LIMIT=1000000
# APPLY_SHARED_DEPLOY_BASELINE=1
```

## Secret-bearing keys not recorded here

1. `TIDB_USER`
2. `JWT_SECRET`
3. `NEXUS_ADMIN_PASSWORD`
4. `GH_TOKEN`
5. `GOOGLE_CLIENT_ID`
6. `GOOGLE_CLIENT_SECRET`

## Notes

1. `exp` is local-empty-TiDB, not branch-backed
2. dedicated EC2 EXP keeps `RESET_DB=1`; local case deploy should instead use a fresh case-scoped database with `RESET_DB=0`
3. stale CloudFront HTML can mask a correct source deploy
4. leave `FRONTEND_URL` unset for the default served-frontend path; set it only when running vite-dev separately from the backend
5. `APPLY_SHARED_DEPLOY_BASELINE=1` keeps exp aligned with the shared deploy baseline while preserving the exp-owned baseline seed
6. mutable storage, temp, and Go cache paths must stay under `shared/`; source worktrees under `.runtime/` are deploy-owned release material
