DeviceValue is an iOS application that helps you track and manage your device investments and their depreciation over time. Built with SwiftUI and The Composable Architecture (TCA), it provides a clean and intuitive interface for monitoring your device expenses and usage costs.
- 📱 Add and manage devices with detailed information
- 💰 Track purchase prices and depreciation
- 📊 Monitor usage rates and costs over time
- 🌐 Support for multiple currencies with automatic conversion
- 📅 Flexible usage rate periods (daily, weekly, monthly, yearly)
- 💾 Persistent storage using GRDB (SQLite)
- 🌓 Support for light and dark mode
- iOS 17.0+
- Xcode 15.0+
- Swift 6.0+
- The Composable Architecture (1.17.1+)
- Swift Dependencies (1.7.0+)
- GRDB (7.2.0+)
- Sharing GRDB (0.1.0+)
DeviceValue/
├── DeviceValue
├── Assets.xcassets
├── Preview Content
├── FinancialFlowApp.swift
├── Info.plist
├── Localizable.xcstrings
├── DeviceValue.xcodeproj
└── DeviceValueTests
DeviceValueApp/
├── Sources/
│ ├── AddDeviceFeature/ # Add device form and logic
│ ├── AnalyticsFeature/ # Analytics dashboard and insights
│ ├── BuildClient/ # Build configuration client
│ ├── CurrenciesRatesFeature/ # Currency rates management
│ ├── Generated/ # Generated code resources
│ ├── HomeFeature/ # Main home screen
│ ├── Models/ # Data models and database setup
│ ├── SettingsFeature/ # App settings and preferences
│ ├── UIApplicationClient/ # UI application client utilities
│ └── Utils/ # Shared utilities and helpers
├── Tests/
└── Plugins/ # Swift package plugins
Scripts/ # contains usefull scripts for local-auto-gen
The project follows The Composable Architecture (TCA) pattern, providing:
- Clear separation of concerns
- Predictable state management
- Testable business logic
- Type-safe dependency management
The application uses SQLite (via GRDB) with the following main tables:
devices: Stores device information and usage metricscurrencies: Manages supported currencies and exchange ratesusage_rate_periods: Defines different rate periods (day, week, month, year)app_settings: Stores application settings and preferences
DeviceValue automatically converts device costs between currencies using user provided exchange rates, allowing you to see your total device expenses in your preferred currency.
The app calculates the user specified interval usage cost of all your devices, helping you understand your ongoing expenses at a glance.
Sort your devices by creation date, name, currency, purchase price, or last update to organize your inventory effectively.
- Clone the repository
- Open the project in Xcode
- If the
.xcworkspaceis empty, drag theDeviceValue.xcodeproj&DeviceValueAppfolder to the Xcode window.
- If the
- Build and run the project
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - (Optional) If you added localization keys/values, run the localization script:
cd Scripts && sh local.sh
- Format the code (
cd DeviceValueApp && swift package --allow-writing-to-package-directory format-source-code --config ../swiftformat) - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Point-Free for The Composable Architecture
- Gwendal Roué for GRDB.swift