POWR/README.md

159 lines
3.8 KiB
Markdown
Raw Permalink Normal View History

2025-02-09 20:38:38 -05:00
# POWR - Cross-Platform Fitness Tracking App
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.
## Features
2025-02-09 20:38:38 -05:00
### Current
- Exercise library management with local SQLite database
2025-02-09 20:38:38 -05:00
- Workout template creation
- Local-first data architecture with Nostr sync capability
2025-02-09 20:38:38 -05:00
- Cross-platform support (iOS, Android)
- Dark/light mode support
- Nostr authentication and event publishing
2025-02-09 20:38:38 -05:00
### Planned
- Workout record and template sharing
- Enhanced social features
2025-02-09 20:38:38 -05:00
- Training programs
- Performance analytics
- Public/private workout sharing options
2025-02-09 20:38:38 -05:00
## Getting Started
### Prerequisites
- Node.js (v18 or later)
- npm or yarn
- 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
```
3. Install development client modules
2025-02-09 20:38:38 -05:00
```bash
npx expo install expo-dev-client expo-crypto expo-nip55
2025-02-09 20:38:38 -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
│ ├── (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
- Expo (with Dev Client)
2025-02-09 20:38:38 -05:00
- TypeScript
- SQLite (via expo-sqlite)
- Zustand (state management)
2025-02-09 20:38:38 -05:00
### UI Components
- NativeWind/Tailwind
2025-02-09 20:38:38 -05:00
- React Navigation
- Lucide Icons
### Nostr Integration
- NDK (Nostr Development Kit)
- Custom mobile signer implementation
- Local event caching
2025-02-09 20:38:38 -05:00
## Database Architecture
2025-02-09 20:38:38 -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
Each domain has dedicated service classes for data operations.
2025-02-09 20:38:38 -05:00
## Nostr Integration
2025-02-09 20:38:38 -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
## 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/)
- [NDK](https://github.com/nostr-dev-kit/ndk)
2025-02-09 20:38:38 -05:00
- [Nostr Protocol](https://github.com/nostr-protocol/nostr)