diff --git a/App.xaml b/App.xaml
new file mode 100644
index 0000000..3ff38bc
--- /dev/null
+++ b/App.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ #4CAF50
+ #FBC02D
+ #E53935
+ #757575
+
+ #F2F2F2
+ #D0D0D0
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.xaml.cs b/App.xaml.cs
new file mode 100644
index 0000000..cb90803
--- /dev/null
+++ b/App.xaml.cs
@@ -0,0 +1,17 @@
+using Microsoft.Extensions.DependencyInjection;
+
+namespace cfs_tracker
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ InitializeComponent();
+ }
+
+ protected override Window CreateWindow(IActivationState? activationState)
+ {
+ return new Window(new AppShell());
+ }
+ }
+}
\ No newline at end of file
diff --git a/AppShell.xaml b/AppShell.xaml
new file mode 100644
index 0000000..8ca276d
--- /dev/null
+++ b/AppShell.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AppShell.xaml.cs b/AppShell.xaml.cs
new file mode 100644
index 0000000..773ea14
--- /dev/null
+++ b/AppShell.xaml.cs
@@ -0,0 +1,12 @@
+using cfs_tracker.Views;
+
+namespace cfs_tracker;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ Routing.RegisterRoute(nameof(QuickEntryPage), typeof(QuickEntryPage));
+ }
+}
\ No newline at end of file
diff --git a/Data/AppDatabase.cs b/Data/AppDatabase.cs
new file mode 100644
index 0000000..2a6005b
--- /dev/null
+++ b/Data/AppDatabase.cs
@@ -0,0 +1,26 @@
+using SQLite;
+using cfs_tracker.Models;
+
+namespace cfs_tracker.Data;
+
+public class AppDatabase
+{
+ private SQLiteAsyncConnection? _database;
+ private bool _initialized;
+
+ public async Task InitAsync()
+ {
+ if (_initialized)
+ return;
+
+ var dbPath = Path.Combine(FileSystem.Current.AppDataDirectory, "mecfs_tracker.db3");
+
+ _database = new SQLiteAsyncConnection(dbPath);
+ await _database.CreateTableAsync();
+
+ _initialized = true;
+ }
+
+ public SQLiteAsyncConnection Connection =>
+ _database ?? throw new InvalidOperationException("Database not initialized.");
+}
\ No newline at end of file
diff --git a/Data/HealthEntryRepository.cs b/Data/HealthEntryRepository.cs
new file mode 100644
index 0000000..20a222a
--- /dev/null
+++ b/Data/HealthEntryRepository.cs
@@ -0,0 +1,181 @@
+using cfs_tracker.Models;
+
+namespace cfs_tracker.Data;
+
+public class HealthEntryRepository
+{
+ private readonly AppDatabase _database;
+
+ public HealthEntryRepository(AppDatabase database)
+ {
+ _database = database;
+ }
+
+ public async Task AddEntryAsync(
+ HealthState state,
+ EntrySource source,
+ DateTime? timestamp = null)
+ {
+ await _database.InitAsync();
+
+ var entry = new HealthEntry
+ {
+ Timestamp = timestamp ?? DateTime.Now,
+ State = state,
+ Source = source,
+ UpdatedAt = DateTime.Now
+ };
+
+ await _database.Connection.InsertAsync(entry);
+ }
+
+ public async Task UpsertBackfillAsync(
+ DateTime date,
+ DayPart part,
+ HealthState state,
+ EntrySource source)
+ {
+ await _database.InitAsync();
+
+ var slotTimestamp = BuildSlotTimestamp(date, part);
+
+ var existing = await _database.Connection.Table()
+ .FirstOrDefaultAsync(x => x.Timestamp == slotTimestamp);
+
+ if (existing is null)
+ {
+ var entry = new HealthEntry
+ {
+ Timestamp = slotTimestamp,
+ State = state,
+ Source = source,
+ UpdatedAt = DateTime.Now
+ };
+
+ await _database.Connection.InsertAsync(entry);
+ }
+ else
+ {
+ existing.State = state;
+ existing.Source = source;
+ existing.UpdatedAt = DateTime.Now;
+
+ await _database.Connection.UpdateAsync(existing);
+ }
+ }
+
+ public async Task GetBackfillEntryAsync(DateTime date, DayPart part)
+ {
+ await _database.InitAsync();
+
+ var slotTimestamp = BuildSlotTimestamp(date, part);
+
+ return await _database.Connection.Table()
+ .FirstOrDefaultAsync(x => x.Timestamp == slotTimestamp);
+ }
+
+ public async Task> GetEntriesForDateAsync(DateTime date)
+ {
+ await _database.InitAsync();
+
+ var start = date.Date;
+ var end = start.AddDays(1);
+
+ var list = await _database.Connection.Table()
+ .Where(x => x.Timestamp >= start && x.Timestamp < end)
+ .ToListAsync();
+
+ return list
+ .OrderBy(x => x.Timestamp)
+ .ToList();
+ }
+
+ public async Task> GetEntriesBetweenAsync(DateTime startDate, DateTime endDate)
+ {
+ await _database.InitAsync();
+
+ var start = startDate.Date;
+ var end = endDate.Date;
+
+ var list = await _database.Connection.Table()
+ .Where(x => x.Timestamp >= start && x.Timestamp < end)
+ .ToListAsync();
+
+ return list
+ .OrderBy(x => x.Timestamp)
+ .ToList();
+ }
+
+ public async Task> GetMonthEntriesAsync(int year, int month)
+ {
+ var start = new DateTime(year, month, 1);
+ var end = start.AddMonths(1);
+
+ return await GetEntriesBetweenAsync(start, end);
+ }
+
+ public async Task> GetYearEntriesAsync(int year)
+ {
+ var start = new DateTime(year, 1, 1);
+ var end = start.AddYears(1);
+
+ return await GetEntriesBetweenAsync(start, end);
+ }
+
+ public async Task DeleteEntryAsync(int id)
+ {
+ await _database.InitAsync();
+
+ var item = await _database.Connection.Table()
+ .FirstOrDefaultAsync(x => x.Id == id);
+
+ if (item is not null)
+ await _database.Connection.DeleteAsync(item);
+ }
+
+ public async Task DeleteBackfillEntryAsync(DateTime date, DayPart part)
+ {
+ await _database.InitAsync();
+
+ var slotTimestamp = BuildSlotTimestamp(date, part);
+
+ var item = await _database.Connection.Table()
+ .FirstOrDefaultAsync(x => x.Timestamp == slotTimestamp);
+
+ if (item is not null)
+ await _database.Connection.DeleteAsync(item);
+ }
+
+ public async Task DeleteAllAsync()
+ {
+ await _database.InitAsync();
+ await _database.Connection.DeleteAllAsync();
+ }
+
+ public async Task<(HealthEntry? Morning, HealthEntry? Afternoon)> GetBackfillSlotsAsync(DateTime date)
+ {
+ await _database.InitAsync();
+
+ var morningTimestamp = BuildSlotTimestamp(date, DayPart.Morning);
+ var afternoonTimestamp = BuildSlotTimestamp(date, DayPart.Afternoon);
+
+ var items = await _database.Connection.Table()
+ .Where(x => x.Timestamp == morningTimestamp || x.Timestamp == afternoonTimestamp)
+ .ToListAsync();
+
+ var morning = items.FirstOrDefault(x => x.Timestamp == morningTimestamp);
+ var afternoon = items.FirstOrDefault(x => x.Timestamp == afternoonTimestamp);
+
+ return (morning, afternoon);
+ }
+
+ private static DateTime BuildSlotTimestamp(DateTime date, DayPart part)
+ {
+ return part switch
+ {
+ DayPart.Morning => date.Date.AddHours(9),
+ DayPart.Afternoon => date.Date.AddHours(15),
+ _ => date.Date.AddHours(9)
+ };
+ }
+}
\ No newline at end of file
diff --git a/MainPage.xaml b/MainPage.xaml
new file mode 100644
index 0000000..1646f13
--- /dev/null
+++ b/MainPage.xaml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MainPage.xaml.cs b/MainPage.xaml.cs
new file mode 100644
index 0000000..1963f03
--- /dev/null
+++ b/MainPage.xaml.cs
@@ -0,0 +1,24 @@
+namespace cfs_tracker
+{
+ public partial class MainPage : ContentPage
+ {
+ int count = 0;
+
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void OnCounterClicked(object? sender, EventArgs e)
+ {
+ count++;
+
+ if (count == 1)
+ CounterBtn.Text = $"Clicked {count} time";
+ else
+ CounterBtn.Text = $"Clicked {count} times";
+
+ SemanticScreenReader.Announce(CounterBtn.Text);
+ }
+ }
+}
diff --git a/MauiProgram.cs b/MauiProgram.cs
new file mode 100644
index 0000000..bf0f5b9
--- /dev/null
+++ b/MauiProgram.cs
@@ -0,0 +1,44 @@
+using cfs_tracker.Data;
+using cfs_tracker.Services;
+using cfs_tracker.ViewModels;
+using cfs_tracker.Views;
+
+namespace cfs_tracker;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+ builder.Services.AddSingleton();
+ builder.Services.AddSingleton();
+ builder.Services.AddSingleton();
+ builder.Services.AddSingleton();
+
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+
+ builder.Services.AddTransient();
+ builder.Services.AddTransient();
+
+ return builder.Build();
+ }
+}
\ No newline at end of file
diff --git a/Models/CalendarDaySummary.cs b/Models/CalendarDaySummary.cs
new file mode 100644
index 0000000..3c5e4bb
--- /dev/null
+++ b/Models/CalendarDaySummary.cs
@@ -0,0 +1,12 @@
+namespace cfs_tracker.Models
+{
+ public class CalendarDaySummary
+ {
+ public DateTime Date { get; set; }
+
+ public double? Average { get; set; } // null = kein Eintrag
+ public int EntryCount { get; set; }
+
+ public HealthState? DisplayState { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DayDetailSummary.cs b/Models/DayDetailSummary.cs
new file mode 100644
index 0000000..d947b2d
--- /dev/null
+++ b/Models/DayDetailSummary.cs
@@ -0,0 +1,14 @@
+namespace cfs_tracker.Models
+{
+ public class DayDetailSummary
+ {
+ public DateTime Date { get; set; }
+
+ public int GreenCount { get; set; }
+ public int YellowCount { get; set; }
+ public int RedCount { get; set; }
+ public int GrayCount { get; set; }
+
+ public List Entries { get; set; } = new();
+ }
+}
\ No newline at end of file
diff --git a/Models/DayPart.cs b/Models/DayPart.cs
new file mode 100644
index 0000000..a14da5e
--- /dev/null
+++ b/Models/DayPart.cs
@@ -0,0 +1,7 @@
+namespace cfs_tracker.Models;
+
+public enum DayPart
+{
+ Morning = 0,
+ Afternoon = 1
+}
\ No newline at end of file
diff --git a/Models/EntrySource.cs b/Models/EntrySource.cs
new file mode 100644
index 0000000..cbda156
--- /dev/null
+++ b/Models/EntrySource.cs
@@ -0,0 +1,8 @@
+namespace cfs_tracker.Models
+{
+ public enum EntrySource
+ {
+ App = 0,
+ Notification = 1
+ }
+}
\ No newline at end of file
diff --git a/Models/HealthEntry.cs b/Models/HealthEntry.cs
new file mode 100644
index 0000000..fdf7c98
--- /dev/null
+++ b/Models/HealthEntry.cs
@@ -0,0 +1,16 @@
+using cfs_tracker.Models;
+using SQLite;
+
+public class HealthEntry
+{
+ [PrimaryKey, AutoIncrement]
+ public int Id { get; set; }
+
+ public DateTime Timestamp { get; set; }
+
+ public HealthState State { get; set; }
+
+ public EntrySource Source { get; set; }
+
+ public DateTime UpdatedAt { get; set; }
+}
\ No newline at end of file
diff --git a/Models/HealthState.cs b/Models/HealthState.cs
new file mode 100644
index 0000000..381b961
--- /dev/null
+++ b/Models/HealthState.cs
@@ -0,0 +1,10 @@
+namespace cfs_tracker.Models
+{
+ public enum HealthState
+ {
+ Gray = 0, // Totalausfall
+ Red = 1, // schlecht
+ Yellow = 2, // so lala
+ Green = 3 // gut
+ }
+}
\ No newline at end of file
diff --git a/Models/HealthStateExtensions.cs b/Models/HealthStateExtensions.cs
new file mode 100644
index 0000000..d5cf90c
--- /dev/null
+++ b/Models/HealthStateExtensions.cs
@@ -0,0 +1,28 @@
+namespace cfs_tracker.Models;
+
+public static class HealthStateExtensions
+{
+ public static Color ToColor(this HealthState state)
+ {
+ return state switch
+ {
+ HealthState.Green => Color.FromArgb("#4CAF50"),
+ HealthState.Yellow => Color.FromArgb("#FBC02D"),
+ HealthState.Red => Color.FromArgb("#E53935"),
+ HealthState.Gray => Color.FromArgb("#757575"),
+ _ => Colors.Transparent
+ };
+ }
+
+ public static string ToLabel(this HealthState state)
+ {
+ return state switch
+ {
+ HealthState.Green => "Gut",
+ HealthState.Yellow => "So lala",
+ HealthState.Red => "Schlecht",
+ HealthState.Gray => "Totalausfall",
+ _ => ""
+ };
+ }
+}
\ No newline at end of file
diff --git a/Models/WeekDaySummary.cs b/Models/WeekDaySummary.cs
new file mode 100644
index 0000000..3957b42
--- /dev/null
+++ b/Models/WeekDaySummary.cs
@@ -0,0 +1,13 @@
+namespace cfs_tracker.Models
+{
+ public class WeekDaySummary
+ {
+ public DateTime Date { get; set; }
+
+ public double? MorningAverage { get; set; } // vor 12 Uhr
+ public double? AfternoonAverage { get; set; } // ab 12 Uhr
+
+ public int MorningCount { get; set; }
+ public int AfternoonCount { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Platforms/Android/AndroidManifest.xml b/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..e9937ad
--- /dev/null
+++ b/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Platforms/Android/MainActivity.cs b/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..a3cd5f6
--- /dev/null
+++ b/Platforms/Android/MainActivity.cs
@@ -0,0 +1,22 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace cfs_tracker;
+
+[Activity(
+ Theme = "@style/Maui.SplashTheme",
+ MainLauncher = true,
+ ConfigurationChanges = ConfigChanges.ScreenSize
+ | ConfigChanges.Orientation
+ | ConfigChanges.UiMode
+ | ConfigChanges.ScreenLayout
+ | ConfigChanges.SmallestScreenSize
+ | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
+ protected override void OnCreate(Bundle? savedInstanceState)
+ {
+ base.OnCreate(savedInstanceState);
+ }
+}
\ No newline at end of file
diff --git a/Platforms/Android/MainApplication.cs b/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..9b051c0
--- /dev/null
+++ b/Platforms/Android/MainApplication.cs
@@ -0,0 +1,16 @@
+using Android.App;
+using Android.Runtime;
+
+namespace cfs_tracker
+{
+ [Application]
+ public class MainApplication : MauiApplication
+ {
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/Platforms/Android/Resources/values/colors.xml b/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..c04d749
--- /dev/null
+++ b/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/Platforms/MacCatalyst/AppDelegate.cs b/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..8d068a3
--- /dev/null
+++ b/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace cfs_tracker
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/Platforms/MacCatalyst/Entitlements.plist b/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..de4adc9
--- /dev/null
+++ b/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/Platforms/MacCatalyst/Info.plist b/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..f2e0987
--- /dev/null
+++ b/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ LSApplicationCategoryType
+ public.app-category.lifestyle
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Platforms/MacCatalyst/Program.cs b/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..46ecf25
--- /dev/null
+++ b/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace cfs_tracker
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
diff --git a/Platforms/Windows/App.xaml b/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..6bf49e8
--- /dev/null
+++ b/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/Platforms/Windows/App.xaml.cs b/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..9ff3c48
--- /dev/null
+++ b/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,25 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace cfs_tracker.WinUI
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : MauiWinUIApplication
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+
+}
diff --git a/Platforms/Windows/Package.appxmanifest b/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..817f207
--- /dev/null
+++ b/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Platforms/Windows/app.manifest b/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..fd525c4
--- /dev/null
+++ b/Platforms/Windows/app.manifest
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+ true
+
+
+
diff --git a/Platforms/iOS/AppDelegate.cs b/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..8d068a3
--- /dev/null
+++ b/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace cfs_tracker
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/Platforms/iOS/Info.plist b/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..0004a4f
--- /dev/null
+++ b/Platforms/iOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Platforms/iOS/Program.cs b/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..46ecf25
--- /dev/null
+++ b/Platforms/iOS/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace cfs_tracker
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
diff --git a/Platforms/iOS/Resources/PrivacyInfo.xcprivacy b/Platforms/iOS/Resources/PrivacyInfo.xcprivacy
new file mode 100644
index 0000000..24ab3b4
--- /dev/null
+++ b/Platforms/iOS/Resources/PrivacyInfo.xcprivacy
@@ -0,0 +1,51 @@
+
+
+
+
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryFileTimestamp
+ NSPrivacyAccessedAPITypeReasons
+
+ C617.1
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategorySystemBootTime
+ NSPrivacyAccessedAPITypeReasons
+
+ 35F9.1
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryDiskSpace
+ NSPrivacyAccessedAPITypeReasons
+
+ E174.1
+
+
+
+
+
+
diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json
new file mode 100644
index 0000000..4f85793
--- /dev/null
+++ b/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "Project",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/Resources/AppIcon/appicon.svg b/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..9d63b65
--- /dev/null
+++ b/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/Resources/AppIcon/appiconfg.svg b/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/Resources/Fonts/OpenSans-Regular.ttf b/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..2cc82d2
Binary files /dev/null and b/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/Resources/Fonts/OpenSans-Semibold.ttf b/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..fcb5284
Binary files /dev/null and b/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/Resources/Images/dotnet_bot.png b/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..054167e
Binary files /dev/null and b/Resources/Images/dotnet_bot.png differ
diff --git a/Resources/Raw/AboutAssets.txt b/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..89dc758
--- /dev/null
+++ b/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/Resources/Splash/splash.svg b/Resources/Splash/splash.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/Resources/Styles/Colors.xaml b/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..d57fcc6
--- /dev/null
+++ b/Resources/Styles/Colors.xaml
@@ -0,0 +1,44 @@
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Resources/Styles/Styles.xaml b/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..5fef12a
--- /dev/null
+++ b/Resources/Styles/Styles.xaml
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Services/AggregationService.cs b/Services/AggregationService.cs
new file mode 100644
index 0000000..623706e
--- /dev/null
+++ b/Services/AggregationService.cs
@@ -0,0 +1,123 @@
+using cfs_tracker.Models;
+
+namespace cfs_tracker.Services;
+
+public class AggregationService
+{
+ public DayDetailSummary BuildDaySummary(DateTime date, IEnumerable entries)
+ {
+ var list = entries
+ .Where(x => x.Timestamp.Date == date.Date)
+ .OrderBy(x => x.Timestamp)
+ .ToList();
+
+ return new DayDetailSummary
+ {
+ Date = date.Date,
+ GreenCount = list.Count(x => x.State == HealthState.Green),
+ YellowCount = list.Count(x => x.State == HealthState.Yellow),
+ RedCount = list.Count(x => x.State == HealthState.Red),
+ GrayCount = list.Count(x => x.State == HealthState.Gray),
+ Entries = list
+ };
+ }
+
+ public List BuildWeekSummary(DateTime weekStart, IEnumerable entries)
+ {
+ var result = new List();
+
+ for (int i = 0; i < 7; i++)
+ {
+ var date = weekStart.Date.AddDays(i);
+ var dayEntries = entries.Where(x => x.Timestamp.Date == date).ToList();
+
+ var morning = dayEntries.Where(x => x.Timestamp.Hour < 12).ToList();
+ var afternoon = dayEntries.Where(x => x.Timestamp.Hour >= 12).ToList();
+
+ result.Add(new WeekDaySummary
+ {
+ Date = date,
+ MorningAverage = AverageOrNull(morning),
+ AfternoonAverage = AverageOrNull(afternoon),
+ MorningCount = morning.Count,
+ AfternoonCount = afternoon.Count
+ });
+ }
+
+ return result;
+ }
+
+ public List BuildMonthSummary(DateTime month, IEnumerable entries)
+ {
+ var first = new DateTime(month.Year, month.Month, 1);
+ var days = DateTime.DaysInMonth(month.Year, month.Month);
+
+ var result = new List();
+
+ for (int i = 0; i < days; i++)
+ {
+ var date = first.AddDays(i);
+ var dayEntries = entries.Where(x => x.Timestamp.Date == date.Date).ToList();
+
+ var avg = AverageOrNull(dayEntries);
+
+ result.Add(new CalendarDaySummary
+ {
+ Date = date,
+ Average = avg,
+ EntryCount = dayEntries.Count,
+ DisplayState = ToDisplayState(avg)
+ });
+ }
+
+ return result;
+ }
+
+ public List BuildYearSummary(int year, IEnumerable entries)
+ {
+ var result = new List();
+
+ for (int month = 1; month <= 12; month++)
+ {
+ var days = DateTime.DaysInMonth(year, month);
+
+ for (int day = 1; day <= days; day++)
+ {
+ var date = new DateTime(year, month, day);
+ var dayEntries = entries.Where(x => x.Timestamp.Date == date.Date).ToList();
+
+ var avg = AverageOrNull(dayEntries);
+
+ result.Add(new CalendarDaySummary
+ {
+ Date = date,
+ Average = avg,
+ EntryCount = dayEntries.Count,
+ DisplayState = ToDisplayState(avg)
+ });
+ }
+ }
+
+ return result;
+ }
+
+ public HealthState? ToDisplayState(double? average)
+ {
+ if (average is null)
+ return null;
+
+ if (average >= 2.5) return HealthState.Green;
+ if (average >= 1.5) return HealthState.Yellow;
+ if (average >= 0.5) return HealthState.Red;
+ return HealthState.Gray;
+ }
+
+ private double? AverageOrNull(IEnumerable entries)
+ {
+ var list = entries.ToList();
+ if (list.Count == 0)
+ return null;
+
+ return list.Average(x => (int)x.State);
+ }
+}
\ No newline at end of file
diff --git a/Services/INotificationService.cs b/Services/INotificationService.cs
new file mode 100644
index 0000000..71f4f04
--- /dev/null
+++ b/Services/INotificationService.cs
@@ -0,0 +1,8 @@
+namespace cfs_tracker.Services;
+
+public interface INotificationService
+{
+ Task RequestPermissionAsync();
+ Task ScheduleDailyAsync(TimeSpan time, string title, string message);
+ Task CancelAllAsync();
+}
\ No newline at end of file
diff --git a/Services/PdfExportService.cs b/Services/PdfExportService.cs
new file mode 100644
index 0000000..e9e6583
--- /dev/null
+++ b/Services/PdfExportService.cs
@@ -0,0 +1,24 @@
+namespace cfs_tracker.Services;
+
+public class PdfExportService
+{
+ public Task ExportMonthAsync(DateTime month)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task ExportYearAsync(int year)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task ExportWeekAsync(DateTime weekStart)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task ExportDayAsync(DateTime day)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/CalendarViewModel.cs b/ViewModels/CalendarViewModel.cs
new file mode 100644
index 0000000..534f8a3
--- /dev/null
+++ b/ViewModels/CalendarViewModel.cs
@@ -0,0 +1,36 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+
+namespace cfs_tracker.ViewModels;
+
+public enum CalendarMode
+{
+ Day,
+ Week,
+ Month,
+ Year
+}
+
+public partial class CalendarViewModel : ObservableObject
+{
+ [ObservableProperty]
+ private CalendarMode currentMode = CalendarMode.Month;
+
+ [ObservableProperty]
+ private DateTime selectedDate = DateTime.Today;
+
+ public IRelayCommand ShowDayCommand { get; }
+ public IRelayCommand ShowWeekCommand { get; }
+ public IRelayCommand ShowMonthCommand { get; }
+ public IRelayCommand ShowYearCommand { get; }
+ public IRelayCommand TodayCommand { get; }
+
+ public CalendarViewModel()
+ {
+ ShowDayCommand = new RelayCommand(() => CurrentMode = CalendarMode.Day);
+ ShowWeekCommand = new RelayCommand(() => CurrentMode = CalendarMode.Week);
+ ShowMonthCommand = new RelayCommand(() => CurrentMode = CalendarMode.Month);
+ ShowYearCommand = new RelayCommand(() => CurrentMode = CalendarMode.Year);
+ TodayCommand = new RelayCommand(() => SelectedDate = DateTime.Today);
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/DayEntryItemViewModel.cs b/ViewModels/DayEntryItemViewModel.cs
new file mode 100644
index 0000000..f8de925
--- /dev/null
+++ b/ViewModels/DayEntryItemViewModel.cs
@@ -0,0 +1,60 @@
+using cfs_tracker.Models;
+
+
+namespace cfs_tracker.ViewModels;
+
+public class DayEntryItemViewModel
+{
+ public int Id { get; init; }
+ public DateTime Timestamp { get; init; }
+
+ public string TimeText { get; init; } = "";
+ public string StateText { get; init; } = "";
+ public string SourceText { get; init; } = "";
+
+ public Color BackgroundColor { get; init; } = Colors.Transparent;
+ public Color TextColor { get; init; } = Colors.Black;
+
+ public static DayEntryItemViewModel FromEntry(HealthEntry entry)
+ {
+ var state = entry.State;
+ var background = state switch
+ {
+ HealthState.Green => Color.FromArgb("#4CAF50"),
+ HealthState.Yellow => Color.FromArgb("#FBC02D"),
+ HealthState.Red => Color.FromArgb("#E53935"),
+ HealthState.Gray => Color.FromArgb("#757575"),
+ _ => Colors.Transparent
+ };
+
+ var textColor = state switch
+ {
+ HealthState.Gray => Colors.White,
+ HealthState.Green => Colors.White,
+ _ => Colors.Black
+ };
+
+ return new DayEntryItemViewModel
+ {
+ Id = entry.Id,
+ Timestamp = entry.Timestamp,
+ TimeText = entry.Timestamp.ToString("HH:mm"),
+ StateText = state switch
+ {
+ HealthState.Green => "Gut",
+ HealthState.Yellow => "So lala",
+ HealthState.Red => "Schlecht",
+ HealthState.Gray => "Totalausfall",
+ _ => ""
+ },
+ SourceText = entry.Source switch
+ {
+ EntrySource.App => "App",
+ EntrySource.Notification => "Push",
+ _ => ""
+ },
+ BackgroundColor = background,
+ TextColor = textColor
+ };
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/DayViewModel.cs b/ViewModels/DayViewModel.cs
new file mode 100644
index 0000000..d6fba02
--- /dev/null
+++ b/ViewModels/DayViewModel.cs
@@ -0,0 +1,111 @@
+using cfs_tracker.Data;
+using cfs_tracker.Models;
+using cfs_tracker.Views;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using System.Collections.ObjectModel;
+using System.Globalization;
+
+namespace cfs_tracker.ViewModels;
+
+public partial class DayViewModel : ObservableObject
+{
+ private readonly HealthEntryRepository _repository;
+
+ [ObservableProperty]
+ private DateTime selectedDate = DateTime.Today;
+
+ [ObservableProperty]
+ private string selectedDateText = "";
+
+ [ObservableProperty]
+ private int greenCount;
+
+ [ObservableProperty]
+ private int yellowCount;
+
+ [ObservableProperty]
+ private int redCount;
+
+ [ObservableProperty]
+ private int grayCount;
+
+ public ObservableCollection Entries { get; } = new();
+
+ public IAsyncRelayCommand PreviousDayCommand { get; }
+ public IAsyncRelayCommand NextDayCommand { get; }
+ public IAsyncRelayCommand TodayCommand { get; }
+ public IAsyncRelayCommand AddEntryCommand { get; }
+ public IAsyncRelayCommand DeleteEntryCommand { get; }
+
+ public DayViewModel(HealthEntryRepository repository)
+ {
+ _repository = repository;
+
+ PreviousDayCommand = new AsyncRelayCommand(PreviousDayAsync);
+ NextDayCommand = new AsyncRelayCommand(NextDayAsync);
+ TodayCommand = new AsyncRelayCommand(SetTodayAsync);
+ AddEntryCommand = new AsyncRelayCommand(OpenQuickEntryAsync);
+ DeleteEntryCommand = new AsyncRelayCommand(DeleteEntryAsync);
+
+ UpdateDateText();
+ }
+
+ partial void OnSelectedDateChanged(DateTime value)
+ {
+ UpdateDateText();
+ }
+
+ public async Task RefreshAsync()
+ {
+ var entries = await _repository.GetEntriesForDateAsync(SelectedDate);
+
+ GreenCount = entries.Count(x => x.State == HealthState.Green);
+ YellowCount = entries.Count(x => x.State == HealthState.Yellow);
+ RedCount = entries.Count(x => x.State == HealthState.Red);
+ GrayCount = entries.Count(x => x.State == HealthState.Gray);
+
+ Entries.Clear();
+
+ foreach (var entry in entries.OrderBy(x => x.Timestamp))
+ Entries.Add(DayEntryItemViewModel.FromEntry(entry));
+ }
+
+ private async Task PreviousDayAsync()
+ {
+ SelectedDate = SelectedDate.AddDays(-1);
+ await RefreshAsync();
+ }
+
+ private async Task NextDayAsync()
+ {
+ SelectedDate = SelectedDate.AddDays(1);
+ await RefreshAsync();
+ }
+
+ private async Task SetTodayAsync()
+ {
+ SelectedDate = DateTime.Today;
+ await RefreshAsync();
+ }
+
+ private async Task OpenQuickEntryAsync()
+ {
+ string date = SelectedDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
+ await Shell.Current.GoToAsync($"{nameof(QuickEntryPage)}?date={date}");
+ }
+
+ private async Task DeleteEntryAsync(DayEntryItemViewModel? item)
+ {
+ if (item is null)
+ return;
+
+ await _repository.DeleteEntryAsync(item.Id);
+ await RefreshAsync();
+ }
+
+ private void UpdateDateText()
+ {
+ SelectedDateText = SelectedDate.ToString("dddd, dd. MMMM yyyy", new CultureInfo("de-DE"));
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/MonthCellViewModel.cs b/ViewModels/MonthCellViewModel.cs
new file mode 100644
index 0000000..cbe190e
--- /dev/null
+++ b/ViewModels/MonthCellViewModel.cs
@@ -0,0 +1,26 @@
+using Microsoft.Maui.Graphics;
+
+namespace cfs_tracker.ViewModels;
+
+public class MonthCellViewModel
+{
+ public bool IsRealDay { get; init; }
+ public DateTime Date { get; init; }
+
+ public string DayNumberText { get; init; } = "";
+ public string CountText { get; init; } = "";
+
+ public Color BackgroundColor { get; init; } = Colors.Transparent;
+ public Color BorderColor { get; init; } = Colors.Transparent;
+ public Color TextColor { get; init; } = Colors.Black;
+
+ public static MonthCellViewModel Placeholder() => new()
+ {
+ IsRealDay = false,
+ BackgroundColor = Colors.Transparent,
+ BorderColor = Colors.Transparent,
+ TextColor = Colors.Transparent,
+ DayNumberText = "",
+ CountText = ""
+ };
+}
\ No newline at end of file
diff --git a/ViewModels/MonthViewModel.cs b/ViewModels/MonthViewModel.cs
new file mode 100644
index 0000000..1b2c2eb
--- /dev/null
+++ b/ViewModels/MonthViewModel.cs
@@ -0,0 +1,121 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using cfs_tracker.Data;
+using cfs_tracker.Models;
+using cfs_tracker.Services;
+using cfs_tracker.ViewModels;
+using cfs_tracker.Views;
+using Microsoft.Maui.Graphics;
+using System.Collections.ObjectModel;
+using System.Globalization;
+
+namespace cfs_tracker.ViewModels;
+
+public partial class MonthViewModel : ObservableObject
+{
+ private readonly HealthEntryRepository _repository;
+ private readonly AggregationService _aggregationService;
+ private readonly CultureInfo _culture = new("de-DE");
+
+ private DateTime _currentMonth = new(DateTime.Today.Year, DateTime.Today.Month, 1);
+
+ [ObservableProperty]
+ private string selectedMonthText = "";
+
+ public ObservableCollection Days { get; } = new();
+
+ public IAsyncRelayCommand PreviousMonthCommand { get; }
+ public IAsyncRelayCommand NextMonthCommand { get; }
+ public IAsyncRelayCommand TodayCommand { get; }
+ public IAsyncRelayCommand OpenDayCommand { get; }
+
+ public MonthViewModel(
+ HealthEntryRepository repository,
+ AggregationService aggregationService)
+ {
+ _repository = repository;
+ _aggregationService = aggregationService;
+
+ PreviousMonthCommand = new AsyncRelayCommand(PreviousMonthAsync);
+ NextMonthCommand = new AsyncRelayCommand(NextMonthAsync);
+ TodayCommand = new AsyncRelayCommand(SetTodayAsync);
+ OpenDayCommand = new AsyncRelayCommand(OpenDayAsync);
+ }
+
+ public async Task RefreshAsync()
+ {
+ _currentMonth = new DateTime(_currentMonth.Year, _currentMonth.Month, 1);
+ SelectedMonthText = _currentMonth.ToString("MMMM yyyy", _culture);
+
+ var monthStart = _currentMonth;
+ var monthEnd = monthStart.AddMonths(1);
+
+ var entries = await _repository.GetEntriesBetweenAsync(monthStart, monthEnd);
+ var summaries = _aggregationService.BuildMonthSummary(monthStart, entries);
+
+ Days.Clear();
+
+ int leadingEmptyDays = ((int)monthStart.DayOfWeek + 6) % 7;
+
+ for (int i = 0; i < leadingEmptyDays; i++)
+ Days.Add(MonthCellViewModel.Placeholder());
+
+ foreach (var summary in summaries)
+ Days.Add(BuildCell(summary));
+
+ while (Days.Count % 7 != 0)
+ Days.Add(MonthCellViewModel.Placeholder());
+ }
+
+ private MonthCellViewModel BuildCell(CalendarDaySummary summary)
+ {
+ Color background = summary.DisplayState switch
+ {
+ HealthState.Green => Color.FromArgb("#4CAF50"),
+ HealthState.Yellow => Color.FromArgb("#FBC02D"),
+ HealthState.Red => Color.FromArgb("#E53935"),
+ HealthState.Gray => Color.FromArgb("#757575"),
+ _ => Color.FromArgb("#F2F2F2")
+ };
+
+ bool isToday = summary.Date.Date == DateTime.Today.Date;
+
+ return new MonthCellViewModel
+ {
+ IsRealDay = true,
+ Date = summary.Date,
+ DayNumberText = summary.Date.Day.ToString(),
+ CountText = summary.EntryCount > 0 ? $"{summary.EntryCount}x" : "",
+ BackgroundColor = background,
+ BorderColor = isToday ? Colors.Black : Color.FromArgb("#D0D0D0"),
+ TextColor = summary.DisplayState == HealthState.Gray ? Colors.White : Colors.Black
+ };
+ }
+
+ private async Task PreviousMonthAsync()
+ {
+ _currentMonth = _currentMonth.AddMonths(-1);
+ await RefreshAsync();
+ }
+
+ private async Task NextMonthAsync()
+ {
+ _currentMonth = _currentMonth.AddMonths(1);
+ await RefreshAsync();
+ }
+
+ private async Task SetTodayAsync()
+ {
+ _currentMonth = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
+ await RefreshAsync();
+ }
+
+ private async Task OpenDayAsync(MonthCellViewModel? cell)
+ {
+ if (cell is null || !cell.IsRealDay)
+ return;
+
+ string date = cell.Date.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
+ await Shell.Current.GoToAsync($"{nameof(QuickEntryPage)}?date={date}");
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/OptionsViewModel.cs b/ViewModels/OptionsViewModel.cs
new file mode 100644
index 0000000..33b07a4
--- /dev/null
+++ b/ViewModels/OptionsViewModel.cs
@@ -0,0 +1,45 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using cfs_tracker.Data;
+
+namespace cfs_tracker.ViewModels;
+
+public partial class OptionsViewModel : ObservableObject
+{
+ private readonly HealthEntryRepository _repository;
+
+ [ObservableProperty]
+ private string deleteConfirmationText = string.Empty;
+
+ [ObservableProperty]
+ private string statusText = string.Empty;
+
+ public IAsyncRelayCommand DeleteAllDataCommand { get; }
+
+ public OptionsViewModel(HealthEntryRepository repository)
+ {
+ _repository = repository;
+ DeleteAllDataCommand = new AsyncRelayCommand(DeleteAllDataAsync, CanDeleteAllData);
+ }
+
+ partial void OnDeleteConfirmationTextChanged(string value)
+ {
+ DeleteAllDataCommand.NotifyCanExecuteChanged();
+ }
+
+ private bool CanDeleteAllData()
+ {
+ return string.Equals(
+ DeleteConfirmationText?.Trim(),
+ "löschen",
+ StringComparison.OrdinalIgnoreCase);
+ }
+
+ private async Task DeleteAllDataAsync()
+ {
+ await _repository.DeleteAllAsync();
+
+ DeleteConfirmationText = string.Empty;
+ StatusText = "Alle gespeicherten Einträge wurden gelöscht.";
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/QuickEntryViewModel.cs b/ViewModels/QuickEntryViewModel.cs
new file mode 100644
index 0000000..857e6ab
--- /dev/null
+++ b/ViewModels/QuickEntryViewModel.cs
@@ -0,0 +1,120 @@
+using System.Collections.ObjectModel;
+using System.Globalization;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using cfs_tracker.Data;
+using cfs_tracker.Models;
+
+namespace cfs_tracker.ViewModels;
+
+public partial class QuickEntryViewModel : ObservableObject
+{
+ private readonly HealthEntryRepository _repository;
+
+ [ObservableProperty]
+ private DateTime selectedDate = DateTime.Today;
+
+ [ObservableProperty]
+ private string selectedDateText = "";
+
+ [ObservableProperty]
+ private bool isPastDate;
+
+ [ObservableProperty]
+ private bool isFutureDate;
+
+ [ObservableProperty]
+ private string selectedPartText = "Vormittag";
+
+ public ObservableCollection AvailableParts { get; } = new()
+ {
+ "Vormittag",
+ "Nachmittag"
+ };
+
+ public IAsyncRelayCommand SaveGreenCommand { get; }
+ public IAsyncRelayCommand SaveYellowCommand { get; }
+ public IAsyncRelayCommand SaveRedCommand { get; }
+ public IAsyncRelayCommand SaveGrayCommand { get; }
+
+ public QuickEntryViewModel(HealthEntryRepository repository)
+ {
+ _repository = repository;
+
+ SaveGreenCommand = new AsyncRelayCommand(() => SaveAsync(HealthState.Green));
+ SaveYellowCommand = new AsyncRelayCommand(() => SaveAsync(HealthState.Yellow));
+ SaveRedCommand = new AsyncRelayCommand(() => SaveAsync(HealthState.Red));
+ SaveGrayCommand = new AsyncRelayCommand(() => SaveAsync(HealthState.Gray));
+
+ UpdateState();
+ }
+
+ public void SetDateFromQuery(string? dateText)
+ {
+ if (!string.IsNullOrWhiteSpace(dateText) &&
+ DateTime.TryParseExact(
+ dateText,
+ "yyyy-MM-dd",
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out var parsed))
+ {
+ SelectedDate = parsed.Date;
+ }
+ else
+ {
+ SelectedDate = DateTime.Today;
+ }
+
+ UpdateState();
+ }
+
+ partial void OnSelectedDateChanged(DateTime value)
+ {
+ UpdateState();
+ }
+
+ private async Task SaveAsync(HealthState state)
+ {
+ if (IsFutureDate)
+ return;
+
+ if (IsPastDate)
+ {
+ await _repository.UpsertBackfillAsync(
+ SelectedDate,
+ GetSelectedPart(),
+ state,
+ EntrySource.App);
+ }
+ else
+ {
+ await _repository.AddEntryAsync(
+ state,
+ EntrySource.App,
+ DateTime.Now);
+ }
+
+ await Shell.Current.GoToAsync("..");
+ }
+
+ private DayPart GetSelectedPart()
+ {
+ return SelectedPartText == "Nachmittag"
+ ? DayPart.Afternoon
+ : DayPart.Morning;
+ }
+
+ private void UpdateState()
+ {
+ var today = DateTime.Today;
+
+ IsPastDate = SelectedDate.Date < today;
+ IsFutureDate = SelectedDate.Date > today;
+
+ SelectedDateText = SelectedDate.ToString("dddd, dd. MMMM yyyy", new CultureInfo("de-DE"));
+
+ if (!IsPastDate)
+ SelectedPartText = "Vormittag";
+ }
+}
\ No newline at end of file
diff --git a/ViewModels/WeekCellViewModel.cs b/ViewModels/WeekCellViewModel.cs
new file mode 100644
index 0000000..9c969ef
--- /dev/null
+++ b/ViewModels/WeekCellViewModel.cs
@@ -0,0 +1,25 @@
+using Microsoft.Maui.Graphics;
+
+namespace cfs_tracker.ViewModels;
+
+public class WeekCellViewModel
+{
+ public DateTime Date { get; init; }
+
+ public string DayText { get; init; } = "";
+ public string DateText { get; init; } = "";
+
+ public string MorningText { get; init; } = "";
+ public string AfternoonText { get; init; } = "";
+
+ public string MorningCountText { get; init; } = "";
+ public string AfternoonCountText { get; init; } = "";
+
+ public Color MorningBackgroundColor { get; init; } = Colors.Transparent;
+ public Color AfternoonBackgroundColor { get; init; } = Colors.Transparent;
+
+ public Color MorningTextColor { get; init; } = Colors.Black;
+ public Color AfternoonTextColor { get; init; } = Colors.Black;
+
+ public bool IsToday { get; init; }
+}
\ No newline at end of file
diff --git a/ViewModels/WeekViewModel.cs b/ViewModels/WeekViewModel.cs
new file mode 100644
index 0000000..7cb18b2
--- /dev/null
+++ b/ViewModels/WeekViewModel.cs
@@ -0,0 +1,140 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using cfs_tracker.Data;
+using cfs_tracker.Models;
+using cfs_tracker.Services;
+using cfs_tracker.ViewModels;
+using cfs_tracker.Views;
+using Microsoft.Maui.Graphics;
+using System.Collections.ObjectModel;
+using System.Globalization;
+
+namespace cfs_tracker.ViewModels;
+
+public partial class WeekViewModel : ObservableObject
+{
+ private readonly HealthEntryRepository _repository;
+ private readonly AggregationService _aggregationService;
+
+ [ObservableProperty]
+ private DateTime anchorDate = DateTime.Today;
+
+ [ObservableProperty]
+ private string weekText = "";
+
+ public ObservableCollection Days { get; } = new();
+
+ public IAsyncRelayCommand PreviousWeekCommand { get; }
+ public IAsyncRelayCommand NextWeekCommand { get; }
+ public IAsyncRelayCommand TodayCommand { get; }
+ public IAsyncRelayCommand OpenDayCommand { get; }
+
+ public WeekViewModel(
+ HealthEntryRepository repository,
+ AggregationService aggregationService)
+ {
+ _repository = repository;
+ _aggregationService = aggregationService;
+
+ PreviousWeekCommand = new AsyncRelayCommand(PreviousWeekAsync);
+ NextWeekCommand = new AsyncRelayCommand(NextWeekAsync);
+ TodayCommand = new AsyncRelayCommand(SetTodayAsync);
+ OpenDayCommand = new AsyncRelayCommand(OpenDayAsync);
+ }
+
+ public async Task RefreshAsync()
+ {
+ var weekStart = StartOfWeek(AnchorDate);
+ var weekEnd = weekStart.AddDays(7);
+
+ WeekText = $"{weekStart:dd.MM.yyyy} - {weekEnd.AddDays(-1):dd.MM.yyyy}";
+
+ var entries = await _repository.GetEntriesBetweenAsync(weekStart, weekEnd);
+ var summaries = _aggregationService.BuildWeekSummary(weekStart, entries);
+
+ Days.Clear();
+
+ foreach (var summary in summaries)
+ Days.Add(BuildCell(summary));
+ }
+
+ private WeekCellViewModel BuildCell(WeekDaySummary summary)
+ {
+ var morningState = _aggregationService.ToDisplayState(summary.MorningAverage);
+ var afternoonState = _aggregationService.ToDisplayState(summary.AfternoonAverage);
+
+ return new WeekCellViewModel
+ {
+ Date = summary.Date,
+ DayText = summary.Date.ToString("ddd", new CultureInfo("de-DE")),
+ DateText = summary.Date.ToString("dd.MM"),
+ MorningText = summary.MorningAverage.HasValue ? StateLabel(morningState) : "—",
+ AfternoonText = summary.AfternoonAverage.HasValue ? StateLabel(afternoonState) : "—",
+ MorningCountText = summary.MorningCount > 0 ? $"{summary.MorningCount}x" : "",
+ AfternoonCountText = summary.AfternoonCount > 0 ? $"{summary.AfternoonCount}x" : "",
+ MorningBackgroundColor = StateColor(morningState),
+ AfternoonBackgroundColor = StateColor(afternoonState),
+ MorningTextColor = StateTextColor(morningState),
+ AfternoonTextColor = StateTextColor(afternoonState),
+ IsToday = summary.Date.Date == DateTime.Today.Date
+ };
+ }
+
+ private async Task PreviousWeekAsync()
+ {
+ AnchorDate = AnchorDate.AddDays(-7);
+ await RefreshAsync();
+ }
+
+ private async Task NextWeekAsync()
+ {
+ AnchorDate = AnchorDate.AddDays(7);
+ await RefreshAsync();
+ }
+
+ private async Task SetTodayAsync()
+ {
+ AnchorDate = DateTime.Today;
+ await RefreshAsync();
+ }
+
+ private async Task OpenDayAsync(WeekCellViewModel? cell)
+ {
+ if (cell is null)
+ return;
+
+ string date = cell.Date.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
+ await Shell.Current.GoToAsync($"{nameof(QuickEntryPage)}?date={date}");
+ }
+
+ private static DateTime StartOfWeek(DateTime date)
+ {
+ int diff = ((int)date.DayOfWeek + 6) % 7;
+ return date.Date.AddDays(-diff);
+ }
+
+ private static string StateLabel(HealthState? state) => state switch
+ {
+ HealthState.Green => "Gut",
+ HealthState.Yellow => "So lala",
+ HealthState.Red => "Schlecht",
+ HealthState.Gray => "Ausfall",
+ _ => "—"
+ };
+
+ private static Color StateColor(HealthState? state) => state switch
+ {
+ HealthState.Green => Color.FromArgb("#4CAF50"),
+ HealthState.Yellow => Color.FromArgb("#FBC02D"),
+ HealthState.Red => Color.FromArgb("#E53935"),
+ HealthState.Gray => Color.FromArgb("#757575"),
+ _ => Color.FromArgb("#F2F2F2")
+ };
+
+ private static Color StateTextColor(HealthState? state) => state switch
+ {
+ HealthState.Green => Colors.White,
+ HealthState.Gray => Colors.White,
+ _ => Colors.Black
+ };
+}
\ No newline at end of file
diff --git a/ViewModels/YearMonthViewModel.cs b/ViewModels/YearMonthViewModel.cs
new file mode 100644
index 0000000..7a3fac2
--- /dev/null
+++ b/ViewModels/YearMonthViewModel.cs
@@ -0,0 +1,11 @@
+using System.Collections.ObjectModel;
+
+namespace cfs_tracker.ViewModels;
+
+public class YearMonthViewModel
+{
+ public int MonthNumber { get; init; }
+ public string MonthText { get; init; } = "";
+
+ public ObservableCollection Days { get; } = new();
+}
\ No newline at end of file
diff --git a/ViewModels/YearViewModel.cs b/ViewModels/YearViewModel.cs
new file mode 100644
index 0000000..b18871f
--- /dev/null
+++ b/ViewModels/YearViewModel.cs
@@ -0,0 +1,130 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using cfs_tracker.Data;
+using cfs_tracker.Models;
+using cfs_tracker.Services;
+using cfs_tracker.Views;
+using System.Collections.ObjectModel;
+using System.Globalization;
+
+namespace cfs_tracker.ViewModels;
+
+public partial class YearViewModel : ObservableObject
+{
+ private readonly HealthEntryRepository _repository;
+ private readonly AggregationService _aggregationService;
+ private readonly CultureInfo _culture = new("de-DE");
+
+ private int _currentYear = DateTime.Today.Year;
+
+ [ObservableProperty]
+ private string selectedYearText = "";
+
+ public ObservableCollection Months { get; } = new();
+
+ public IAsyncRelayCommand PreviousYearCommand { get; }
+ public IAsyncRelayCommand NextYearCommand { get; }
+ public IAsyncRelayCommand TodayCommand { get; }
+ public IAsyncRelayCommand OpenDayCommand { get; }
+
+ public YearViewModel(
+ HealthEntryRepository repository,
+ AggregationService aggregationService)
+ {
+ _repository = repository;
+ _aggregationService = aggregationService;
+
+ PreviousYearCommand = new AsyncRelayCommand(PreviousYearAsync);
+ NextYearCommand = new AsyncRelayCommand(NextYearAsync);
+ TodayCommand = new AsyncRelayCommand(SetTodayAsync);
+ OpenDayCommand = new AsyncRelayCommand(OpenDayAsync);
+ }
+
+ public async Task RefreshAsync()
+ {
+ SelectedYearText = _currentYear.ToString();
+
+ var start = new DateTime(_currentYear, 1, 1);
+ var end = start.AddYears(1);
+
+ var entries = await _repository.GetEntriesBetweenAsync(start, end);
+ var summaries = _aggregationService.BuildYearSummary(_currentYear, entries);
+
+ Months.Clear();
+
+ for (int month = 1; month <= 12; month++)
+ {
+ var monthVm = new YearMonthViewModel
+ {
+ MonthNumber = month,
+ MonthText = new DateTime(_currentYear, month, 1).ToString("MMMM", _culture)
+ };
+
+ var monthStart = new DateTime(_currentYear, month, 1);
+ int leadingEmptyDays = ((int)monthStart.DayOfWeek + 6) % 7;
+
+ for (int i = 0; i < leadingEmptyDays; i++)
+ monthVm.Days.Add(MonthCellViewModel.Placeholder());
+
+ foreach (var summary in summaries.Where(x => x.Date.Month == month))
+ monthVm.Days.Add(BuildCell(summary));
+
+ while (monthVm.Days.Count % 7 != 0)
+ monthVm.Days.Add(MonthCellViewModel.Placeholder());
+
+ Months.Add(monthVm);
+ }
+ }
+
+ private MonthCellViewModel BuildCell(CalendarDaySummary summary)
+ {
+ Color background = summary.DisplayState switch
+ {
+ HealthState.Green => Color.FromArgb("#4CAF50"),
+ HealthState.Yellow => Color.FromArgb("#FBC02D"),
+ HealthState.Red => Color.FromArgb("#E53935"),
+ HealthState.Gray => Color.FromArgb("#757575"),
+ _ => Color.FromArgb("#F2F2F2")
+ };
+
+ bool isToday = summary.Date.Date == DateTime.Today.Date;
+
+ return new MonthCellViewModel
+ {
+ IsRealDay = true,
+ Date = summary.Date,
+ DayNumberText = summary.Date.Day.ToString(),
+ CountText = summary.EntryCount > 0 ? $"{summary.EntryCount}x" : "",
+ BackgroundColor = background,
+ BorderColor = isToday ? Colors.Black : Color.FromArgb("#D0D0D0"),
+ TextColor = summary.DisplayState == HealthState.Gray ? Colors.White : Colors.Black
+ };
+ }
+
+ private async Task PreviousYearAsync()
+ {
+ _currentYear--;
+ await RefreshAsync();
+ }
+
+ private async Task NextYearAsync()
+ {
+ _currentYear++;
+ await RefreshAsync();
+ }
+
+ private async Task SetTodayAsync()
+ {
+ _currentYear = DateTime.Today.Year;
+ await RefreshAsync();
+ }
+
+ private async Task OpenDayAsync(MonthCellViewModel? cell)
+ {
+ if (cell is null || !cell.IsRealDay)
+ return;
+
+ string date = cell.Date.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
+ await Shell.Current.GoToAsync($"{nameof(QuickEntryPage)}?date={date}");
+ }
+}
\ No newline at end of file
diff --git a/Views/DayPage.xaml b/Views/DayPage.xaml
new file mode 100644
index 0000000..49f5a68
--- /dev/null
+++ b/Views/DayPage.xaml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/DayPage.xaml.cs b/Views/DayPage.xaml.cs
new file mode 100644
index 0000000..e4e6346
--- /dev/null
+++ b/Views/DayPage.xaml.cs
@@ -0,0 +1,20 @@
+using cfs_tracker.ViewModels;
+
+namespace cfs_tracker.Views;
+
+public partial class DayPage : ContentPage
+{
+ private readonly DayViewModel _viewModel;
+
+ public DayPage(DayViewModel viewModel)
+ {
+ InitializeComponent();
+ BindingContext = _viewModel = viewModel;
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+ await _viewModel.RefreshAsync();
+ }
+}
\ No newline at end of file
diff --git a/Views/MonthPage.xaml b/Views/MonthPage.xaml
new file mode 100644
index 0000000..be32d57
--- /dev/null
+++ b/Views/MonthPage.xaml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/MonthPage.xaml.cs b/Views/MonthPage.xaml.cs
new file mode 100644
index 0000000..604b219
--- /dev/null
+++ b/Views/MonthPage.xaml.cs
@@ -0,0 +1,20 @@
+using cfs_tracker.ViewModels;
+
+namespace cfs_tracker.Views;
+
+public partial class MonthPage : ContentPage
+{
+ private readonly MonthViewModel _viewModel;
+
+ public MonthPage(MonthViewModel viewModel)
+ {
+ InitializeComponent();
+ BindingContext = _viewModel = viewModel;
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+ await _viewModel.RefreshAsync();
+ }
+}
\ No newline at end of file
diff --git a/Views/Options.xaml b/Views/Options.xaml
new file mode 100644
index 0000000..180d177
--- /dev/null
+++ b/Views/Options.xaml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/Options.xaml.cs b/Views/Options.xaml.cs
new file mode 100644
index 0000000..68c6bc4
--- /dev/null
+++ b/Views/Options.xaml.cs
@@ -0,0 +1,12 @@
+using cfs_tracker.ViewModels;
+
+namespace cfs_tracker.Views;
+
+public partial class OptionsPage : ContentPage
+{
+ public OptionsPage(OptionsViewModel viewModel)
+ {
+ InitializeComponent();
+ BindingContext = viewModel;
+ }
+}
\ No newline at end of file
diff --git a/Views/QuickEntryPage.xaml b/Views/QuickEntryPage.xaml
new file mode 100644
index 0000000..ecc7f18
--- /dev/null
+++ b/Views/QuickEntryPage.xaml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/QuickEntryPage.xaml.cs b/Views/QuickEntryPage.xaml.cs
new file mode 100644
index 0000000..00f4270
--- /dev/null
+++ b/Views/QuickEntryPage.xaml.cs
@@ -0,0 +1,21 @@
+using Microsoft.Maui.Controls;
+using cfs_tracker.ViewModels;
+
+namespace cfs_tracker.Views;
+
+public partial class QuickEntryPage : ContentPage, IQueryAttributable
+{
+ private readonly QuickEntryViewModel _viewModel;
+
+ public QuickEntryPage(QuickEntryViewModel viewModel)
+ {
+ InitializeComponent();
+ BindingContext = _viewModel = viewModel;
+ }
+
+ public void ApplyQueryAttributes(IDictionary query)
+ {
+ query.TryGetValue("date", out var value);
+ _viewModel.SetDateFromQuery(value?.ToString());
+ }
+}
\ No newline at end of file
diff --git a/Views/WeekPage.xaml b/Views/WeekPage.xaml
new file mode 100644
index 0000000..f0cee75
--- /dev/null
+++ b/Views/WeekPage.xaml
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/WeekPage.xaml.cs b/Views/WeekPage.xaml.cs
new file mode 100644
index 0000000..8d4164d
--- /dev/null
+++ b/Views/WeekPage.xaml.cs
@@ -0,0 +1,20 @@
+using cfs_tracker.ViewModels;
+
+namespace cfs_tracker.Views;
+
+public partial class WeekPage : ContentPage
+{
+ private readonly WeekViewModel _viewModel;
+
+ public WeekPage(WeekViewModel viewModel)
+ {
+ InitializeComponent();
+ BindingContext = _viewModel = viewModel;
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+ await _viewModel.RefreshAsync();
+ }
+}
\ No newline at end of file
diff --git a/Views/YearPage.xaml b/Views/YearPage.xaml
new file mode 100644
index 0000000..75d8f78
--- /dev/null
+++ b/Views/YearPage.xaml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/YearPage.xaml.cs b/Views/YearPage.xaml.cs
new file mode 100644
index 0000000..709bcd4
--- /dev/null
+++ b/Views/YearPage.xaml.cs
@@ -0,0 +1,20 @@
+using cfs_tracker.ViewModels;
+
+namespace cfs_tracker.Views;
+
+public partial class YearPage : ContentPage
+{
+ private readonly YearViewModel _viewModel;
+
+ public YearPage(YearViewModel viewModel)
+ {
+ InitializeComponent();
+ BindingContext = _viewModel = viewModel;
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+ await _viewModel.RefreshAsync();
+ }
+}
\ No newline at end of file
diff --git a/cfs-tracker.csproj b/cfs-tracker.csproj
new file mode 100644
index 0000000..82d4f94
--- /dev/null
+++ b/cfs-tracker.csproj
@@ -0,0 +1,73 @@
+
+
+
+ net10.0-android;net10.0-windows10.0.19041.0
+
+ Exe
+ cfs_tracker
+
+ true
+ true
+ enable
+ enable
+
+ SourceGen
+
+ cfs-tracker
+ com.companyname.cfstracker
+ 1.0
+ 1
+
+ None
+
+
+
+ 21.0
+
+
+
+ 10.0.17763.0
+ 10.0.17763.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+
+
\ No newline at end of file
diff --git a/cfs-tracker.slnx b/cfs-tracker.slnx
new file mode 100644
index 0000000..c7ec7e9
--- /dev/null
+++ b/cfs-tracker.slnx
@@ -0,0 +1,3 @@
+
+
+