2025-02-09 20:38:38 -05:00
# POWR - Cross-Platform Fitness Tracking App
2025-02-05 20:38:39 -05:00
2025-03-06 09:19:16 -05:00
POWR is a local-first fitness tracking application built with React Native and Expo, featuring integration with the Nostr protocol for decentralized social features and improved control of your fitness data.
2025-02-05 20:38:39 -05:00
## Features
2025-02-09 20:38:38 -05:00
### Current
2025-03-06 09:19:16 -05:00
- Exercise library management with local SQLite database
2025-02-09 20:38:38 -05:00
- Workout template creation
2025-03-06 09:19:16 -05:00
- Local-first data architecture with Nostr sync capability
2025-02-09 20:38:38 -05:00
- Cross-platform support (iOS, Android)
2025-03-06 09:19:16 -05:00
- Dark/light mode support
- Nostr authentication and event publishing
2025-02-05 20:38:39 -05:00
2025-02-09 20:38:38 -05:00
### Planned
- Workout record and template sharing
2025-03-06 09:19:16 -05:00
- Enhanced social features
2025-02-09 20:38:38 -05:00
- Training programs
- Performance analytics
2025-03-06 09:19:16 -05:00
- Public/private workout sharing options
2025-02-09 20:38:38 -05:00
## Getting Started
### Prerequisites
- Node.js (v18 or later)
- npm or yarn
2025-03-06 09:19:16 -05:00
- EAS CLI (`npm install -g eas-cli` )
2025-02-09 20:38:38 -05:00
- iOS Simulator (for iOS development)
- Android Studio (for Android development)
### Installation
1. Clone the repository
```bash
git clone https://github.com/docNR/powr.git
cd powr
```
2. Install dependencies
```bash
npm install
```
2025-03-06 09:19:16 -05:00
3. Install development client modules
2025-02-09 20:38:38 -05:00
```bash
2025-03-06 09:19:16 -05:00
npx expo install expo-dev-client expo-crypto expo-nip55
2025-02-09 20:38:38 -05:00
```
2025-03-06 09:19:16 -05:00
### Development Using Expo Dev Client
POWR now uses Expo Dev Client for development instead of Expo Go. This allows us to use native modules required for Nostr integration.
1. Configure EAS (if not already done)
```bash
eas build:configure
```
2. Create a development build
```bash
# For Android
eas build --profile development --platform android
# For iOS
eas build --profile development --platform ios
```
3. Start the development server with dev client
```bash
npx expo start --dev-client
```
4. Install the build on your device and scan the QR code to connect
2025-02-09 20:38:38 -05:00
## Project Structure
```plaintext
powr/
├── app/ # Main application code
2025-03-06 09:19:16 -05:00
│ ├── (tabs)/ # Tab-based navigation
│ ├── (workout)/ # Workout screens
│ └── _layout.tsx # Root layout
├── components/ # Shared components
│ ├── ui/ # UI components
│ ├── sheets/ # Bottom sheets
│ └── library/ # Library components
├── lib/ # Shared utilities
│ ├── db/ # Database services
│ ├── hooks/ # Custom React hooks
│ ├── stores/ # Zustand stores
│ └── mobile-signer.ts # Nostr signer implementation
├── types/ # TypeScript definitions
└── utils/ # Utility functions
2025-02-09 20:38:38 -05:00
```
## Technology Stack
### Core
- React Native
2025-03-06 09:19:16 -05:00
- Expo (with Dev Client)
2025-02-09 20:38:38 -05:00
- TypeScript
- SQLite (via expo-sqlite)
2025-03-06 09:19:16 -05:00
- Zustand (state management)
2025-02-09 20:38:38 -05:00
### UI Components
2025-03-06 09:19:16 -05:00
- NativeWind/Tailwind
2025-02-09 20:38:38 -05:00
- React Navigation
- Lucide Icons
2025-03-06 09:19:16 -05:00
### Nostr Integration
- NDK (Nostr Development Kit)
- Custom mobile signer implementation
- Local event caching
2025-02-09 20:38:38 -05:00
2025-03-06 09:19:16 -05:00
## Database Architecture
2025-02-09 20:38:38 -05:00
2025-03-06 09:19:16 -05:00
POWR uses a SQLite database with a service-oriented architecture:
- Exercise data
- Workout templates
- Nostr event caching
- User profiles
2025-02-09 20:38:38 -05:00
2025-03-06 09:19:16 -05:00
Each domain has dedicated service classes for data operations.
2025-02-09 20:38:38 -05:00
2025-03-06 09:19:16 -05:00
## Nostr Integration
2025-02-09 20:38:38 -05:00
2025-03-06 09:19:16 -05:00
POWR implements the Nostr protocol via NDK with:
- Secure key management using expo-secure-store
- Event publishing for exercises, templates, and workouts
- Profile discovery and following
- Custom event kinds for fitness data
2025-02-09 20:38:38 -05:00
2025-03-06 09:19:16 -05:00
## Building for Production
2025-02-09 20:38:38 -05:00
```bash
# Build for iOS
eas build -p ios
# Build for Android
eas build -p android
```
## Contributing
1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE ](LICENSE ) file for details.
## Acknowledgments
- [Expo ](https://expo.dev/ )
- [React Native ](https://reactnative.dev/ )
2025-03-06 09:19:16 -05:00
- [NDK ](https://github.com/nostr-dev-kit/ndk )
2025-02-09 20:38:38 -05:00
- [Nostr Protocol ](https://github.com/nostr-protocol/nostr )