docs/ — GitHub Pages rootThis folder is the source for the project’s GitHub Pages site. After
enabling Pages on the main branch / docs/ folder,
the contents become publicly available at:
https://senghan1992.github.io/trading_diary/
app-config.jsonhttps://senghan1992.github.io/trading_diary/app-config.json is the
endpoint the in-app UpdateService polls at startup to decide whether
to show the optional-update dialog, the force-update screen, or nothing.
{
"latest_version": "1.0.0",
"minimum_version": "1.0.0",
"force_update": false,
"update_message_ko": "...",
"update_message_en": "...",
"store_url_ios": "https://apps.apple.com/app/id...",
"store_url_android": "https://play.google.com/store/apps/details?id=..."
}
| Field | Behavior |
|---|---|
latest_version |
If the installed version is below this, surface the optional “Update available” dialog (unless blocked by force/minimum). |
minimum_version |
If the installed version is below this, block the app with the force-update screen. |
force_update |
When true, the force-update screen shows even if version math would allow access. |
update_message_ko / update_message_en |
Body text shown in the dialog/screen. Falls back to the bundled default when missing or empty. |
store_url_* |
Optional override for the store URL. When empty, UpdateService falls back to the IOS_APP_STORE_ID / ANDROID_PACKAGE_NAME --dart-define values. |
pubspec.yaml (version: 1.1.0+2) and ship the build.app-config.json:
latest_version: "1.1.0" to surface the optional-update prompt to users still on 1.0.0.minimum_version to the new version or flip force_update: true.See ../scripts/UPDATE_SERVICE.md for the
end-to-end ops runbook.
In the GitHub web UI for the repo:
Deploy from a branchmain / /docsThe first deploy takes ~30 seconds. After that, app-config.json is served
at the URL above with Content-Type: application/json and standard GitHub
Pages caching headers.
/docs instead of /?lib/ files to the public web.After Pages is enabled (or any time you change the JSON), run the verification script from the repo root:
./scripts/verify_app_config.sh
It fetches the URL, parses the response, checks every required field,
cross-references latest_version against pubspec.yaml, and prints a
red-flagged exit code on any drift. Overridable:
APP_CONFIG_URL=https://staging.example.com/app-config.json \
PUBSPEC_PATH=/path/to/other/pubspec.yaml \
./scripts/verify_app_config.sh
Requires jq. Install with brew install jq if missing.
Run it from a CI job after every config edit; a non-zero exit means the in-app UpdateService will treat the config as null and silently skip the update check.