diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..aa26167 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Michał Leśniak + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a71449 --- /dev/null +++ b/README.md @@ -0,0 +1,111 @@ +# Where's My Money + +Where's My Money is a personal finance management app designed to help you keep track of your finances and plan your expenses efficiently. Built using .NET MAUI, this solution consists of two projects: + +1. **WheresMyMoney.Maui** - The main .NET MAUI project responsible for the UI and overall app behavior. +2. **WheresMyMoney.Maui.Core** - A .NET MAUI Class Library containing the Repository class and POCO representations of the database structure. + +--- + +## Features + +- **Track Your Balance**: Monitor your financial balance with precision. +- **Planned Payments**: Keep an eye on recurring or one-time payments. + +--- + +## Planned Features + +- **Categorization**: Categorize payments and expenses for better insights. +- **Sync Online**: Synchronize your data across multiple devices via cloud. +- **Localization**: Support for multiple languages. + +--- + +## Technical Overview + +This project is built using the .NET SDK 9.0 and is designed to run on Android devices with .NET MAUI. Below is an overview of the `Repository` class and its corresponding database schema: + +### Database Schema + +```sql +CREATE TABLE IF NOT EXISTS planned_payment ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + amount INTEGER NOT NULL, + name TEXT NOT NULL, + date_start TEXT NOT NULL, + date_end TEXT NULL, + is_subscription BOOLEAN NOT NULL, + reoccurences INTEGER NULL, + reoccurence_type INTEGER NULL CHECK(CASE reoccurences IS NOT NULL AND reoccurence_type IS NOT NULL WHEN TRUE THEN is_subscription ELSE NOT is_subscription END) +); + +CREATE TABLE IF NOT EXISTS balance ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + amount INTEGER NOT NULL, + date TEXT NOT NULL +); + +CREATE TABLE IF NOT EXISTS settings ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + payday TINYINT NOT NULL CHECK(payday BETWEEN 1 AND 31) +); +``` + +### POCO Classes + +#### `PlannedPayment` +```csharp +public class PlannedPayment +{ + public int Id { get; set; } + public int Amount { get; set; } + public string Name { get; set; } + public DateTime DateStart { get; set; } + public DateTime? DateEnd { get; set; } + public bool IsSubscription { get; set; } + public int? Reoccurences { get; set; } + public int? ReoccurenceType { get; set; } +} +``` + +#### `Balance` +```csharp +public class Balance +{ + public int Id { get; set; } + public int Amount { get; set; } + public DateTime Date { get; set; } +} +``` + +#### `Settings` +```csharp +public class Settings +{ + public int Id { get; set; } + public byte Payday { get; set; } +} +``` + +### Repository Class +The `Repository` class provides an abstraction layer for data access and manipulation, ensuring seamless integration between the app and the SQLite database. It uses asynchronous methods for CRUD operations to enhance app performance. + +--- + +## How to Build and Run + +1. Ensure you have .NET SDK 9.0 installed on your system. +2. Clone the repository and open the solution in your preferred IDE (e.g., JetBrains Rider, Visual Studio). +3. Set `WheresMyMoney.Maui` as the startup project. +4. Build and deploy the app to an Android emulator or physical device. + +--- + +## Contributing +Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to improve this project. + +--- + +## License +This project is licensed under the MIT License. See the LICENSE file for more details.