85 lines
1.7 KiB
Markdown
85 lines
1.7 KiB
Markdown
# FightRateRN
|
|
|
|
React Native Community CLI rebuild of FightRate. This app is **bare React Native only** and does not use Expo.
|
|
|
|
## Visual source of truth
|
|
|
|
The app follows the selected FightRate direction:
|
|
|
|
- `../FIGHTRATE_DESIGN_SYSTEM.md`
|
|
- Direction: `01 — Corner Instrument`
|
|
|
|
Do not reuse the deprecated Combat Lab/card-heavy direction.
|
|
|
|
## Current slice
|
|
|
|
Implemented in this first slice:
|
|
|
|
- Corner Instrument app shell.
|
|
- Continuous capture-first home screen.
|
|
- History, Sensor, and Insights screens.
|
|
- Centralized design tokens in `src/theme`.
|
|
- Reusable UI components in `src/components`.
|
|
- No Expo dependencies.
|
|
- Android `applicationId` aligned to `com.healthtracking.fightrate`.
|
|
|
|
Not implemented yet:
|
|
|
|
- Real BLE Magene H003 integration.
|
|
- SQLite/local persistence.
|
|
- Real timestamped workout chart data.
|
|
- Navigation library.
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
npm install
|
|
npm run typecheck
|
|
npm run lint
|
|
npm test -- --runInBand
|
|
```
|
|
|
|
Run Metro:
|
|
|
|
```bash
|
|
npm run start
|
|
```
|
|
|
|
Run Android on a device/emulator:
|
|
|
|
```bash
|
|
npm run android
|
|
```
|
|
|
|
Build Android debug APK:
|
|
|
|
```bash
|
|
cd android
|
|
./gradlew assembleDebug
|
|
```
|
|
|
|
If Gradle reports `No Java compiler found`, point `JAVA_HOME` to Android Studio JBR:
|
|
|
|
```bash
|
|
export JAVA_HOME="/c/Users/Evandro/AppData/Local/Programs/Android Studio/jbr"
|
|
export PATH="$JAVA_HOME/bin:$PATH"
|
|
cd android
|
|
./gradlew assembleDebug
|
|
```
|
|
|
|
If React Native autolinking keeps a stale package after renaming Android package paths,
|
|
clean generated Gradle caches before rebuilding:
|
|
|
|
```bash
|
|
cd ..
|
|
rm -rf android/.gradle android/app/build android/build .gradle
|
|
cd android
|
|
./gradlew assembleDebug
|
|
```
|
|
|
|
Debug APK output:
|
|
|
|
```text
|
|
android/app/build/outputs/apk/debug/app-debug.apk
|
|
```
|