# Bincio Mobile App An Expo/React Native mobile app for managing cycling activities locally on your phone. **Features:** - πŸ“± Local-first: all activity data lives on your device - πŸ—ΊοΈ FIT/GPX/TCX import with local extraction (via Pyodide) - πŸ“Š Activity detail: maps, elevation profiles, metric charts - ☁️ Optional sync to a remote Bincio instance - πŸ€– Karoo 2 integration: auto-import from device storage - πŸ“΄ Works offline β€” no account required --- ## Getting Started ```bash npm install npx expo start ``` Install **Expo Go** from the Play Store / App Store and scan the QR code to run the app on your phone. For native module support (maps, file extraction), use a **Development Build** instead of Expo Go. See [DEVELOPMENT.md](./DEVELOPMENT.md) for full setup instructions. --- ## Documentation - **[DEVELOPMENT.md](./DEVELOPMENT.md)** β€” How to build, run, and deploy the app - Prerequisite tools & setup - Two build modes (Expo Go vs Development Build) - Android & iOS development - APK building & distribution - Karoo 2 sideloading - Troubleshooting - **Full design document** β€” For detailed architectural info, sync protocol, data model, and known issues: - Location: `/Users/brutsalvadi/src/bincio_activity/docs/mobile-app.md` - Topics: Pyodide integration, Karoo constraints, implementation phases, technical debt --- ## Project Structure ``` β”œβ”€β”€ app/ β€” Expo Router screens β”‚ β”œβ”€β”€ (tabs)/ β€” Tab screens (Feed, Import, Settings) β”‚ └── activity/[id].tsx β€” Activity detail screen β”œβ”€β”€ components/ β€” Reusable UI components β”œβ”€β”€ db/ β€” SQLite schema, queries, sync logic β”œβ”€β”€ extraction/ β€” Pyodide WebView & extraction engine β”œβ”€β”€ ThemeContext.tsx β€” Theme & color palette β”œβ”€β”€ app.json β€” Expo config β”œβ”€β”€ metro.config.js β€” React Native bundler config └── tsconfig.json β€” TypeScript config ``` --- ## Technology - **Framework:** Expo (React Native) + TypeScript - **Database:** SQLite (expo-sqlite) - **Maps:** MapLibre (with SVG fallback for Android < 29) - **File extraction:** Pyodide (Python in WebView) - **Build:** EAS Build + local Prebuild --- ## Quick Commands | Command | What it does | |---------|-------------| | `npm install` | Install dependencies | | `npx expo start` | Start Expo dev server (use with Expo Go app) | | `npx expo run:android` | Build & run Development Build on Android device/emulator | | `npx expo run:ios` | Build & run on iOS device | | `npx expo prebuild --clean` | Generate native Android/iOS projects | | `eas build -p android --profile preview` | Build standalone APK in the cloud | --- ## Where the code came from This repository was split from `bincio_activity`, which contains: - Backend Python library (`bincio/`) β€” extraction, database, API server - Web frontend (`site/`) β€” Astro app - Original mobile code (now here) The mobile app is designed to work standalone but can sync with a Bincio instance for backup and web access. --- ## License [AGPL v3](LICENSE) β€” see the `LICENSE` file for details.