Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Gradle
.gradle/
build/
!gradle/wrapper/gradle-wrapper.jar

# IDE
.idea/
*.iml
*.ipr
*.iws
.DS_Store

# Local configuration
local.properties
*.local.properties

# Kotlin
.kotlin/
*.kotlin_module

# Android
/captures
.externalNativeBuild
.cxx

# iOS
iosApp/Pods/
iosApp/*.xcworkspace/
iosApp/*.xcodeproj/xcuserdata/
iosApp/*.xcodeproj/project.xcworkspace/
iosApp/DerivedData/

# Desktop
/out/

# Test outputs
test_output.txt
*.log

# Build artifacts
*.apk
*.aab
*.aar
*.jar
!gradle/wrapper/gradle-wrapper.jar
*.dex

# Generated files
/generated/

# Temporary files
*.tmp
*.temp
*~

# Claude Code / AI tools
.skills
docs/LAST_SESSION.md
.claude
LAST_SESSION.md
CHANGELOG.md
.aider*
/.devilmcp/

# Reference/decompiled code (not for distribution)
/reference/
/vitruvian-decompiled/
/scripts/
/apktool.jar
/vitruvian-official.apk
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Vitruvian Project Phoenix Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
149 changes: 148 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,148 @@
# Project-Phoenix-2.0
# Vitruvian Project Phoenix - Multiplatform Control App

[![Latest Release](https://img.shields.io/github/v/release/DasBluEyedDevil/Project-Phoenix-2.0?include_prereleases)](https://github.com/DasBluEyedDevil/Project-Phoenix-2.0/releases)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Kotlin](https://img.shields.io/badge/Kotlin-2.0+-blue.svg)](https://kotlinlang.org)

A Kotlin Multiplatform application for controlling Vitruvian Trainer workout machines via Bluetooth Low Energy (BLE). This is a multiplatform version of the original [VitruvianProjectPhoenix](https://github.com/DasBluEyedDevil/VitruvianProjectPhoenix) Android app.

## Support the Project

If you find this app useful and want to support its continued development:

**[☕ Buy Me a Coffee](https://buymeacoffee.com/vitruvianredux)**

Your support helps keep the machines running and the code flowing!

---

## Project Overview

This app enables local control of Vitruvian Trainer machines after the company's bankruptcy. It's a community rescue project providing native applications for multiple platforms to keep these machines functional and prevent them from becoming e-waste.

## 🚀 Supported Platforms

| Platform | Status | Notes |
|----------|--------|-------|
| **Android** | 🔄 In Development | BLE support via native APIs |
| **iOS** | 🔄 In Development | BLE support via CoreBluetooth |
| **Desktop (Linux)** | 🔄 In Development | BLE support via BlueZ |
| **Desktop (Windows/macOS)** | 🔄 In Development | BLE support via platform APIs |

## Features

### Core Functionality (Planned)
- **BLE Connectivity**: Reliable connection to Vitruvian Trainer devices
- **All Workout Modes**: Old School, Pump, TUT, TUT Beast, Eccentric-Only, Echo
- **Real-time Monitoring**: Live load, position, velocity, and power metrics
- **Rep Counting**: Accurate rep detection with visual feedback
- **Auto-Stop**: Automatic workout termination based on rep targets

### Enhanced Features (Planned)
- **Exercise Library**: 200+ pre-loaded exercises categorized by muscle group
- **Personal Records**: Automatic PR detection and historical tracking
- **Workout History**: Complete history with metrics stored locally
- **Custom Routines**: Build and save your own workout routines
- **Program Builder**: Create structured multi-exercise programs

### Analytics & Insights (Planned)
- **Muscle Balance Radar**: Visual balance across muscle groups
- **Consistency Gauge**: Monthly workout consistency tracking
- **Volume vs Intensity**: Session comparison charts
- **Total Volume History**: Track volume lifted over time
- **Mode Distribution**: Workout mode usage breakdown

## Technology Stack

| Category | Technology |
|----------|------------|
| **Language** | Kotlin 2.0+ |
| **UI** | Compose Multiplatform |
| **Architecture** | MVVM + Clean Architecture |
| **DI** | Koin (Multiplatform) |
| **BLE** | Platform-specific implementations |
| **Database** | SQLDelight (Multiplatform) |
| **Preferences** | Multiplatform Settings |
| **Async** | Coroutines + Flow |

## Project Structure

```
Project-Phoenix-2.0/
├── shared/ # Shared Kotlin Multiplatform code
│ └── src/
│ ├── commonMain/ # Common business logic
│ ├── androidMain/ # Android-specific implementations
│ ├── iosMain/ # iOS-specific implementations
│ └── desktopMain/ # Desktop-specific implementations
├── androidApp/ # Android application
├── iosApp/ # iOS application (Xcode project)
├── desktopApp/ # Desktop application (Linux, Windows, macOS)
├── gradle/ # Gradle wrapper and version catalog
├── build.gradle.kts # Root build configuration
└── settings.gradle.kts # Project settings
```

## Building from Source

### Prerequisites
- JDK 17+
- Android Studio Hedgehog or newer (for Android development)
- Xcode 15+ (for iOS development, macOS only)
- Kotlin 2.0+

### Building the Android App
```bash
./gradlew :androidApp:assembleDebug
```

### Building the Desktop App
```bash
./gradlew :desktopApp:run
```

### Building for iOS
Open `iosApp/iosApp.xcodeproj` in Xcode and build from there.

## Hardware Compatibility

### Vitruvian V-Form Trainer (Euclid / VIT-200)
- **Status:** 🔄 In Development
- **Device Name:** `Vee_*`
- **Max Resistance:** 200 kg (440 lbs)

### Vitruvian Trainer+
- **Status:** 🔄 In Development
- **Max Resistance:** 220 kg (485 lbs)

## Contributing

This is an open-source community project. Contributions welcome!

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Test with real hardware if possible
5. Submit a pull request

## License

MIT License - See [LICENSE](LICENSE) file for details

## Acknowledgments

- Original [VitruvianProjectPhoenix](https://github.com/DasBluEyedDevil/VitruvianProjectPhoenix) Android app
- Original web app developers for reverse-engineering the BLE protocol
- Vitruvian machine owners community for testing and feedback
- JetBrains for Kotlin Multiplatform
- All contributors and supporters

## Support

- **Issues**: [GitHub Issues](https://github.com/DasBluEyedDevil/Project-Phoenix-2.0/issues)
- **Discussions**: [GitHub Discussions](https://github.com/DasBluEyedDevil/Project-Phoenix-2.0/discussions)
- **Support Development**: [Buy Me a Coffee](https://buymeacoffee.com/vitruvianredux)

---

*This app is a community rescue project to keep Vitruvian Trainer machines functional after the company's bankruptcy. It is not affiliated with or endorsed by Vitruvian.*
116 changes: 116 additions & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}

android {
namespace = "com.example.vitruvianredux"
compileSdk = 34

defaultConfig {
applicationId = "com.example.vitruvianredux"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "0.1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

signingConfigs {
getByName("debug") {
val keystorePath = file("${System.getProperty("user.home")}/.android/debug.keystore")
if (keystorePath.exists()) {
storeFile = keystorePath
storePassword = "android"
keyAlias = "androiddebugkey"
keyPassword = "android"
}
}
}

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
debug {
isDebuggable = true
applicationIdSuffix = ".debug"
versionNameSuffix = "-DEBUG"
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}

buildFeatures {
compose = true
buildConfig = true
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {
// Shared module
implementation(project(":shared"))

// Core Android
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.splashscreen)

// Compose
implementation(platform(libs.compose.bom))
implementation(libs.compose.ui)
implementation(libs.compose.ui.graphics)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.material3)
implementation(libs.compose.material.icons.extended)
implementation(libs.compose.navigation)

// Compose Tooling
debugImplementation(libs.compose.ui.tooling)

// Koin DI
implementation(libs.koin.android)
implementation(libs.koin.compose)
implementation(libs.koin.compose.viewmodel)

// Coroutines
implementation(libs.kotlinx.coroutines.android)

// Logging
implementation(libs.kermit)

// Testing
testImplementation(libs.junit)
testImplementation(libs.mockk)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.turbine)
testImplementation(libs.truth)

androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso)
androidTestImplementation(platform(libs.compose.bom))
}
16 changes: 16 additions & 0 deletions androidApp/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in the SDK tools.

# Keep Koin classes
-keepclassmembers class * {
@org.koin.* <methods>;
}

# Keep Kotlin Serialization
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt

# Keep Coroutines
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
Loading