A modern, production-ready iOS expense tracking application built with SwiftUI and MVVM architecture.
✅ Track Expenses - Log expenses by category with date and amount ✅ Categorization - 8+ predefined expense categories (Food, Transport, Health, etc.) ✅ Analytics Dashboard - View spending trends with monthly and category breakdowns ✅ Budget Management - Set and monitor monthly budget with configurable alerts ✅ Secure Authentication - Email-based login with Keychain-stored credentials ✅ Local Storage - All data stored securely on device (no cloud required) ✅ Offline-First - Works completely offline with automatic local persistence ✅ Customizable Settings - Theme (Light/Dark/System), week start, currency, notifications ✅ Production Ready - Comprehensive error handling, logging, and data validation ✅ Privacy-Focused - No tracking, no ads, all data stays on device
- Xcode: 15.0 or later
- iOS: 16.0 or later
- Swift: 5.9 or later
- macOS: 12.0 or later (for development)
-
Clone the repository:
git clone https://github.com/yourusername/ExpenseFlow.git cd ExpenseFlow -
Install dependencies (if using CocoaPods):
pod install
-
Open the project:
open ExpenseFlow.xcodeproj # or if using CocoaPods: open ExpenseFlow.xcworkspace -
Configure signing:
- Select the project in Xcode
- Go to Signing & Capabilities
- Update Team ID with your Apple Developer Team
- Update Bundle Identifier to your domain (e.g.,
com.yourcompany.expenseflow)
-
Select your development device and press Run (⌘R)
git clone https://github.com/yourusername/ExpenseFlow.git
cd ExpenseFlow
xcodegen generate
xcodebuild -scheme ExpenseFlow -configuration ReleaseExpenseFlow/
├── Sources/
│ ├── ExpenseFlowApp.swift # App entry point
│ ├── App/
│ │ └── Theme.swift # Color scheme and styling
│ ├── Views/ # SwiftUI screens
│ │ ├── Expense/
│ │ ├── Settings/
│ │ └── ...
│ ├── Components/ # Reusable UI components
│ ├── Stores/ # State management (MVVM)
│ │ ├── AuthStore.swift # Authentication logic
│ │ ├── ExpenseStore.swift # Expense management
│ │ └── SettingsStore.swift # User preferences
│ ├── Models/ # Data models
│ │ ├── Expense.swift
│ │ └── ExpenseCategory.swift
│ └── Utilities/ # Helper functions
│ ├── KeychainHelper.swift # Secure credential storage
│ ├── Logger.swift # Structured logging
│ ├── DateHelpers.swift
│ └── Formatters.swift
├── Resources/
│ └── PrivacyInfo.xcprivacy # iOS 17 Privacy Manifest
├── project.yml # XcodeGen configuration
├── LICENSE # MIT License
├── README.md # This file
└── .gitignore # Git ignore rules
ExpenseFlow follows the Model-View-ViewModel pattern for clean separation of concerns:
- Models (
Expense,ExpenseCategory): Plain Swift structs representing data - Views: SwiftUI components displaying UI and handling user interaction
- ViewModels (Stores): Observable objects managing state and business logic
- @Published properties in
@ObservableObjectstores - @StateObject in SwiftUI views for store lifecycle management
- Combine framework for reactive updates
- Local Storage: Expenses stored as JSON in Documents directory
- Keychain: Passwords stored securely using Apple's Keychain API
- UserDefaults: Settings and authentication state stored safely
- Automatic Sync: Changes automatically saved to disk via Combine publishers
- ✅ Passwords are NOT stored in UserDefaults (would be visible in plaintext)
- ✅ Passwords stored securely in Keychain using Security framework
- ✅ Keychain access controlled via biometric/passcode authentication
- ✅ Expenses stored encrypted locally (via FileProtection)
- ✅ No hardcoded API keys or secrets
- ✅ All validation and sanitization on user input
- ✅ No tracking - No analytics or third-party tracking code
- ✅ No ads - No advertisements or promotional content
- ✅ On-device only - All data stays on your device
- ✅ Privacy Manifest - iOS 17 compliant with declared data collection
Update project.yml with your configuration:
settings:
DEVELOPMENT_TEAM: "YOUR_TEAM_ID"
ORGANIZATION_IDENTIFIER: "com.yourcompany"
PRODUCT_NAME: "ExpenseFlow"
MARKETING_VERSION: "1.0"
CURRENT_PROJECT_VERSION: "1"Edit Sources/App/Theme.swift to customize:
- Color scheme and appearance
- Typography and fonts
- Component styling
- Spacing and layout
xcodebuild test -scheme ExpenseFlow- ✅ Auth validation (email format, password strength)
- ✅ Expense calculations (daily/monthly totals)
- ✅ Data persistence (save/load)
⚠️ UI tests planned for future release
- 📝 Notifications: Toggle exists but notification delivery not yet implemented
- 📝 Budget Alerts: Settings stored but alert system not active
- 📝 Cloud Sync: No iCloud or multi-device synchronization
- 📝 Export: No CSV/PDF export functionality (coming soon)
- 📝 Edit Expenses: Expenses can only be deleted, not edited (workaround: delete and re-add)
- Check Xcode version:
xcode-select --print-path(should be 15.0+) - Update signing team: Xcode → Project Settings → Signing & Capabilities
- Clean build folder: Cmd+Shift+K
- Delete derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
- Ensure app signing is configured correctly
- Try deleting app and reinstalling
- Check device/simulator storage space
- Check app has Documents folder access
- Verify UserDefaults is not disabled in developer settings
- Check Console.app logs for detailed error messages
- Check Console.app for crash logs
- Check system log:
log stream --level debug --predicate 'eventMessage contains "ExpenseFlow"' - Ensure iOS version matches minimum requirement (iOS 16+)
- Swift 5.9+ syntax
- MARK comments for logical sections
- Minimal inline comments (code should be self-documenting)
- File-scoped access control where possible
The app uses structured logging with os_log:
import os.log
AppLogger.log("Message", category: .auth, level: .info)
AppLogger.error("Error occurred", error: error, category: .auth)
AppLogger.debug("Debug info", category: .storage)- Create models in
Sources/Models/ - Add store logic in
Sources/Stores/ - Create views in
Sources/Views/ - Add UI components in
Sources/Components/ - Write tests for business logic
- Update this README
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a branch:
git checkout -b feature/my-feature - Make changes and test thoroughly
- Commit:
git commit -am 'Add my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Found a bug? Have a feature request?
- 🐛 Report bugs: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📧 Email: support@example.com
- Expense editing UI
- Working budget alerts (local notifications)
- Receipt image attachment
- Data export (CSV/PDF)
- Search and filtering
- iCloud sync via CloudKit
- Shared budgets (family mode)
- Real backend API
- Web dashboard
- Advanced analytics and reports
- Core expense tracking functionality
- Secure authentication with Keychain
- Local data persistence
- Analytics dashboard
- Settings and customization
- iOS 16+ support
Made with ❤️ by the ExpenseFlow team