You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normalize substrate naming to single NativeAppTemplate stem (#45)
Rename all `Nat`-prefixed Kotlin symbols to `NativeAppTemplate*`
(NatApp, NatAppState, NatConstants, NatPreferencesDataSource, NatNavHost,
NatAlertDialog, NatBackground, NatBottomBar, NatDispatchers,
NatNavigationBar*, NatOkHttpClient, NatPreferences, NatTheme,
NatTypography, plus rememberNatAppState) and rename the 8 corresponding
source files.
Rename Compose theme styles `Theme.Nat` and `Theme.Nat.Splash` (and the
`NightAdjusted.Theme.Nat` parent) to the `Theme.NativeAppTemplate.*`
family in themes.xml, values-night/themes.xml, and AndroidManifest.xml.
Rename the three Gradle properties `NATEMPLATE_API_{DOMAIN,PORT,SCHEME}`
to `NATIVEAPPTEMPLATE_API_*` in app/build.gradle.kts, README.md, and
CLAUDE.md.
Rename the `NATA-XXXX` error-code prefix to `NATIVEAPPTEMPLATE-XXXX`
across ApiException.kt, AppError.kt, CodedErrorTest.kt, CLAUDE.md, and
CHANGELOG.md.
Goal: every reference to the product uses one canonical stem
(`NativeAppTemplate`) so the upstream substrate renamer's
`NativeAppTemplate -> <slug-pascal>` rename pair handles every
occurrence in one rule. After this PR, `rg "Nat[A-Z]|NATEMPLATE|NATA-"`
returns zero matches outside `.git/` and `docs-private/`.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
-**DataStore** (`datastore/`): Proto DataStore for user preferences. Proto definitions live in `app/src/main/proto/`.
42
-
-**Navigation**: `NatNavHost.kt` is the top-level nav graph. Three bottom-nav sections: Shops, Scan, Settings. Each section uses nested navigation graphs via `*BaseRoute`.
42
+
-**Navigation**: `NativeAppTemplateNavHost.kt` is the top-level nav graph. Three bottom-nav sections: Shops, Scan, Settings. Each section uses nested navigation graphs via `*BaseRoute`.
43
43
44
44
## Key Patterns
45
45
@@ -49,15 +49,15 @@ MVVM layered architecture following [Android Modern App Architecture](https://de
49
49
-**Proto DataStore**: User preferences and NFC scan state are persisted via Protocol Buffers (lite).
50
50
51
51
## Error Handling (CodedError System)
52
-
All errors should use the `CodedError` interface. Error codes use the `NATA-XXXX` prefix (NativeAppTemplate Android).
52
+
All errors should use the `CodedError` interface. Error codes use the `NATIVEAPPTEMPLATE-XXXX` prefix (NativeAppTemplate Android).
- Use `codedDescription` (not `message` or `localizedMessage`) in all user-facing error messages — this prepends `[NATA-XXXX]` for `CodedError` types
60
+
- Use `codedDescription` (not `message` or `localizedMessage`) in all user-facing error messages — this prepends `[NATIVEAPPTEMPLATE-XXXX]` for `CodedError` types
The debug `buildConfigField` entries in `app/build.gradle.kts` read `NATEMPLATE_API_DOMAIN`, `NATEMPLATE_API_PORT`, and `NATEMPLATE_API_SCHEME` via `project.findProperty(...)` (not `System.getenv` — Android Studio launched from Finder/Dock does not inherit shell env). Set them in `~/.gradle/gradle.properties` (user-global, per-developer); the same config then works from both the terminal and the IDE. Falls back to `https://api.nativeapptemplate.com` when unset. One-off override: `./gradlew -PNATEMPLATE_API_DOMAIN=... assembleDebug`.
79
+
The debug `buildConfigField` entries in `app/build.gradle.kts` read `NATIVEAPPTEMPLATE_API_DOMAIN`, `NATIVEAPPTEMPLATE_API_PORT`, and `NATIVEAPPTEMPLATE_API_SCHEME` via `project.findProperty(...)` (not `System.getenv` — Android Studio launched from Finder/Dock does not inherit shell env). Set them in `~/.gradle/gradle.properties` (user-global, per-developer); the same config then works from both the terminal and the IDE. Falls back to `https://api.nativeapptemplate.com` when unset. One-off override: `./gradlew -PNATIVEAPPTEMPLATE_API_DOMAIN=... assembleDebug`.
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,12 +124,12 @@ By default the debug build hits the hosted API (`https://api.nativeapptemplate.c
124
124
```
125
125
# Use your current Wi-Fi IP (macOS: `ipconfig getifaddr en0`), or 10.0.2.2 for emulator → host.
126
126
# Never use 127.0.0.1, localhost, or 0.0.0.0 — Rails and this app must agree on one reachable address.
127
-
NATEMPLATE_API_DOMAIN=192.168.1.21
128
-
NATEMPLATE_API_PORT=3000
129
-
NATEMPLATE_API_SCHEME=http
127
+
NATIVEAPPTEMPLATE_API_DOMAIN=192.168.1.21
128
+
NATIVEAPPTEMPLATE_API_PORT=3000
129
+
NATIVEAPPTEMPLATE_API_SCHEME=http
130
130
```
131
131
132
-
Then `./gradlew assembleDebug` — or Build → Rebuild Project from Android Studio. The debug `buildConfigField` entries in `app/build.gradle.kts` read these via `project.findProperty(...)`, so the same config works from both the terminal and the IDE. Remove the three properties to fall back to the hosted default. For a one-off override: `./gradlew -PNATEMPLATE_API_DOMAIN=192.168.1.21 -PNATEMPLATE_API_PORT=3000 -PNATEMPLATE_API_SCHEME=http assembleDebug`.
132
+
Then `./gradlew assembleDebug` — or Build → Rebuild Project from Android Studio. The debug `buildConfigField` entries in `app/build.gradle.kts` read these via `project.findProperty(...)`, so the same config works from both the terminal and the IDE. Remove the three properties to fall back to the hosted default. For a one-off override: `./gradlew -PNATIVEAPPTEMPLATE_API_DOMAIN=192.168.1.21 -PNATIVEAPPTEMPLATE_API_PORT=3000 -PNATIVEAPPTEMPLATE_API_SCHEME=http assembleDebug`.
133
133
134
134
Cleartext HTTP to private IPs is already permitted in debug via `app/src/debug/res/xml/network_security_config.xml`; the release config (in `app/src/main/`) keeps `api.nativeapptemplate.com` HTTPS-only.
0 commit comments