Skip to content

A .NET 8 MAUI habit tracker for Android and Windows. Offline-first with SQLite and MVVM (CommunityToolkit.Mvvm).

Notifications You must be signed in to change notification settings

fathionsons/HabitForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HabitForge

A .NET 8 MAUI habit tracker for Android and Windows. Offline-first with SQLite and MVVM (CommunityToolkit.Mvvm).

Features

  • Create habits with name, description, frequency (daily/weekly/custom days), start date, reminders, color/icon.
  • Track daily completions and streaks.
  • Dashboard with today’s habits, streaks, and completion rate for last 7/30 days.
  • Habit detail page with completion history and edit/delete actions.
  • Offline-first SQLite storage with repository pattern and async APIs.
  • Export habits + completions to JSON.

Project Structure

  • HabitForge/Models
  • HabitForge/ViewModels
  • HabitForge/Views
  • HabitForge/Services
  • HabitForge/Data

Run

  1. Install .NET 8 SDK and MAUI workload:
    dotnet workload install maui
  2. Restore packages:
    dotnet restore
  3. Run on Windows:
    dotnet build -t:Run -f net8.0-windows10.0.19041.0
  4. Run on Android (emulator or device):
    dotnet build -t:Run -f net8.0-android

Data Storage

  • SQLite via sqlite-net-pcl.
  • Tables created on first run in AppDatabase.InitializeAsync().
  • Simple migration strategy: if you add a column or table, update InitializeAsync() to create it, and add lightweight upgrade logic (e.g., PRAGMA user_version or a Preferences version flag) before calling CreateTableAsync.

Sample Data

  • SampleDataService seeds example habits and completions on first run.
  • Controlled with a Preferences flag (habitforge.seeded).

Reminders (Stub)

  • IReminderService is wired but uses NoOpReminderService.
  • Android: implement with AlarmManager or WorkManager to schedule notifications.

Export

  • JsonExportService writes a JSON export to app data directory.
  • The dashboard exposes an Export action.

Add a New Feature

  1. Add/update models in HabitForge/Models.
  2. Extend data access in HabitForge/Data repositories.
  3. Create/update view models in HabitForge/ViewModels.
  4. Update UI in HabitForge/Views.
  5. Wire new services or pages in HabitForge/MauiProgram.cs and HabitForge/AppShell.xaml.cs.

Notes

  • This app targets Android and Windows. Add iOS/macOS target frameworks to HabitForge/HabitForge.csproj if needed.

About

A .NET 8 MAUI habit tracker for Android and Windows. Offline-first with SQLite and MVVM (CommunityToolkit.Mvvm).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages