Skip to content

meel-ayush/Wellora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฟ Wellora โ€” Your Personal Wellness Habit Tracker

Android Kotlin Jetpack Compose Room Material3 Min SDK Version Live Demo

Build streaks. Break bad patterns. One tap to log Water, Exercise, Sleep, and Meditation โ€” with real stats that actually tell you something.

๐Ÿ“ฑ Features โ€ข ๐Ÿ—๏ธ Architecture โ€ข ๐Ÿš€ Getting Started โ€ข ๐ŸŽฏ Future Goals โ€ข ๐Ÿ”— Live Demo


๐Ÿ“ธ Screenshots

Splashโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒDashboardโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒHabit Stats
ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย 


Log Entryโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒEntry Detailโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒโ€ƒDate Filter
ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย 

๐Ÿ“‚ All high-resolution screenshots are available in the screenshots/ directory.


๐Ÿค” The Problem

Most people want to build better health habits โ€” drink more water, exercise regularly, sleep enough, meditate daily. The problem? Habit apps are either:

  • Too complex โ€” bloated with features nobody uses, requiring setup that feels like a project.
  • Too shallow โ€” basic streak counters with no real insight into your actual patterns.
  • Not local-first โ€” requiring accounts, subscriptions, or cloud sync before you can log a single glass of water.

I built Wellora to fix that.


๐Ÿ’ก The Solution

Wellora is a focused, offline-first native Android app that makes habit tracking effortless. Log your Water ๐Ÿ’ง, Exercise ๐Ÿƒ, Sleep ๐Ÿ˜ด, and Meditation ๐Ÿง˜ in seconds โ€” and get back genuinely useful stats: daily totals, weekly averages, monthly summaries, and consecutive-day streaks. No account. No subscription. No internet required.

One app. Four habits. Complete clarity on how consistent you actually are.


โœจ Features

๐Ÿ“Š Dashboard โ€” Your Day at a Glance

  • 2ร—2 category grid with today's logged total and unit displayed per habit.
  • Streak badge (๐Ÿ”ฅ Nd) automatically surfaces on any card where you have an active consecutive-day streak.
  • Dynamic greeting with today's date โ€” the app always feels current.
  • One-tap FAB to quickly log any entry without navigating to a specific category first.

๐Ÿ“ˆ Habit Stats Screen โ€” Real Insight Per Category

  • Dedicated stats page for each of the 4 habit types.
  • Summary cards showing: total today, total this week, total this month, and weekly average.
  • Animated progress bar visualising today's total against the week's best.
  • Full scrollable history of every logged entry for that habit.
  • Date range filter โ€” tap the calendar to drill into any single day's history.
  • Quick-filter chips to toggle between custom date ranges and the default "this week" view.
  • Inline delete with a confirmation dialog to prevent accidental removal.

โœ๏ธ Log & Edit Entry โ€” Precise and Flexible

  • Supports all 4 habit types from a single form โ€” the unit label auto-updates (ml / min / hrs) as you switch.
  • Numeric input with built-in validation: blank and zero values are rejected with clear inline error messages.
  • Date picker restricted to today or past dates only โ€” no future logging.
  • Optional free-text notes field for context (e.g., "post-gym session", "woke up at 3am").
  • Full edit support: pre-populates all fields when editing an existing entry.

๐Ÿ” Entry Detail View

  • Full read-only breakdown of a single logged entry: habit type, value + unit, date, timestamp, and notes.
  • Direct shortcut to edit the entry from the detail screen.

๐Ÿ† Streak Engine

  • Calculates consecutive-day streaks per habit type independently using epoch-day arithmetic.
  • Streak resets if no entry was logged on either today or yesterday โ€” accurate and honest.
  • Streak count displayed live on the dashboard and in the stats screen.

๐ŸŽจ Polished UI/UX

  • Built entirely with Jetpack Compose + Material 3.
  • Each habit has its own accent colour and icon โ€” Water (blue), Exercise (green), Sleep (indigo), Meditation (purple).
  • Animated splash screen with the Wellora logo on launch.
  • Snackbar feedback for every create, update, and delete action.
  • Fully offline โ€” all data lives in a local Room (SQLite) database.

๐Ÿ—๏ธ Architecture

Wellora is built using the MVVM (Model-View-ViewModel) architectural pattern, with a Repository layer for clean separation between the database and the UI:

wellora/
โ”œโ”€โ”€ README.md                                   # This file
โ”œโ”€โ”€ LICENSE                                     # CC BY-NC 4.0 open-source rights
โ”œโ”€โ”€ screenshots/                                # High-res UI captures and GIFs
โ”‚   โ”œโ”€โ”€ screen_splash.gif
โ”‚   โ”œโ”€โ”€ screen_dashboard.png
โ”‚   โ”œโ”€โ”€ screen_stats.png
โ”‚   โ”œโ”€โ”€ screen_add_edit.png
โ”‚   โ”œโ”€โ”€ screen_detail.png
โ”‚   โ””โ”€โ”€ screen_date_filter.png
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ build.gradle.kts                        # App-level build configurations
โ”‚   โ””โ”€โ”€ src/main/
โ”‚       โ”œโ”€โ”€ AndroidManifest.xml                 # App manifest (permissions, components)
โ”‚       โ””โ”€โ”€ java/com/wellness/habitlog/
โ”‚           โ”œโ”€โ”€ MainActivity.kt
โ”‚           โ”œโ”€โ”€ AppNavigation.kt                # Sealed routes + NavHost graph
โ”‚           โ”œโ”€โ”€ data/
โ”‚           โ”‚   โ”œโ”€โ”€ HabitEntry.kt               # Room @Entity โ€” core data model
โ”‚           โ”‚   โ”œโ”€โ”€ HabitDao.kt                 # DAO: queries, aggregates, streak data
โ”‚           โ”‚   โ”œโ”€โ”€ HabitDatabase.kt            # Room database singleton
โ”‚           โ”‚   โ””โ”€โ”€ HabitRepository.kt          # Abstracts all DAO access
โ”‚           โ”œโ”€โ”€ viewmodel/
โ”‚           โ”‚   โ””โ”€โ”€ HabitViewModel.kt           # State, filters, streak engine, summaries
โ”‚           โ””โ”€โ”€ ui/
โ”‚               โ”œโ”€โ”€ screens/
โ”‚               โ”‚   โ”œโ”€โ”€ SplashScreen.kt
โ”‚               โ”‚   โ”œโ”€โ”€ MainScreen.kt           # Dashboard grid
โ”‚               โ”‚   โ”œโ”€โ”€ HabitStatsScreen.kt     # Per-habit analytics + history
โ”‚               โ”‚   โ”œโ”€โ”€ AddEditScreen.kt        # Log / edit entry form
โ”‚               โ”‚   โ””โ”€โ”€ DetailScreen.kt         # Read-only entry view
โ”‚               โ”œโ”€โ”€ components/
โ”‚               โ”‚   โ”œโ”€โ”€ HabitCard.kt            # Reusable history list item
โ”‚               โ”‚   โ”œโ”€โ”€ SummaryCard.kt          # Animated stats card
โ”‚               โ”‚   โ””โ”€โ”€ HabitUtils.kt           # Colour, icon, format helpers
โ”‚               โ””โ”€โ”€ theme/
โ”‚                   โ”œโ”€โ”€ Color.kt
โ”‚                   โ””โ”€โ”€ Theme.kt                # Material 3 colour scheme
โ”œโ”€โ”€ gradle/                                     # Gradle wrapper and version catalog
โ”‚   โ””โ”€โ”€ libs.versions.toml                      # Centralized dependency management
โ”œโ”€โ”€ build.gradle.kts                            # Project-level build configurations
โ”œโ”€โ”€ settings.gradle.kts                         # Project settings and module definitions
โ”œโ”€โ”€ gradlew                                     # Linux/macOS build script
โ””โ”€โ”€ gradlew.bat                                 # Windows build script

๐Ÿ”ง Tech Stack

Layer Technology
Language Kotlin 2.0.21
UI Framework Jetpack Compose + Material 3
Navigation Navigation Compose 2.7.7 (string-route based)
State Management ViewModel + StateFlow + SharedFlow
Local Database Room 2.6.1 (SQLite)
Async / Reactive Kotlin Coroutines + Flow
Annotation Processing KSP 2.0.21-1.0.25
Architecture Pattern MVVM + Repository
Build System Gradle KTS + Version Catalog
Min SDK API 26 (Android 8.0 Oreo)
Target SDK API 34 (Android 14)

๐Ÿงฎ Streak Calculation Engine

The streak algorithm runs entirely in the ViewModel using epoch-day arithmetic โ€” no third-party library required:

// Streak logic โ€” HabitViewModel.kt
private suspend fun calculateStreak(habitType: String): Int {
    val epochDays = repository.getDistinctEpochDaysForHabit(habitType).sortedDescending()
    if (epochDays.isEmpty()) return 0

    val todayEpochDay = (System.currentTimeMillis() / 86_400_000L).toInt()
    if (epochDays.first() < todayEpochDay - 1) return 0   // gap > 1 day โ†’ streak dead

    var streak = 0
    var expected = epochDays.first()
    for (day in epochDays) {
        if (day == expected) { streak++; expected-- } else break
    }
    return streak
}

A streak breaks immediately if the last logged day is more than one calendar day before today โ€” no grace periods, no artificial inflation.


๐Ÿ“ฑ Screens

Screen What It Does
Splash Animated Wellora logo on launch
Dashboard (Main) 2ร—2 grid of habit categories โ€” daily totals, streak badges, quick-add FAB
Habit Stats Full analytics for one habit: summary cards, animated progress bar, date-filtered history, inline delete
Add / Edit Entry Single form to log or update any entry โ€” type selector, value input, date picker, notes
Detail Read-only view of a single log entry with edit shortcut

๐Ÿš€ Getting Started

Prerequisites

  • Android Studio Hedgehog or later
  • JDK 11+
  • Android device or emulator (API 26+)

Run Locally

git clone https://github.com/meel-ayush/wellora.git
cd wellora

Open the project in Android Studio โ†’ select your device โ†’ click โ–ถ Run

No API keys, no internet connection, no backend required. The app runs fully offline using a local Room database.


โš ๏ธ Current Storage Model

Wellora v1.0 stores all data locally using Room (SQLite). Entries persist across app restarts on the same device indefinitely. There is no cloud sync, no user account, and no network dependency โ€” this was a deliberate design decision to ensure the app is instant, private, and dependency-free while the core tracking engine and UX were being validated.


๐ŸŽฏ Future Goals

Here's what's planned for upcoming versions:

  • Daily targets & progress rings โ€” Set a daily goal per habit (e.g., 2000ml water) and see a progress ring fill in real time.
  • Bar / line charts โ€” Visual weekly and monthly trend charts using a charting library.
  • Push notifications & reminders โ€” Configurable daily reminders per habit with custom times.
  • Cloud sync & multi-device support โ€” Firebase Firestore backend for syncing across devices.
  • Custom habit types โ€” Allow users to define their own habits beyond the built-in four.
  • Export to CSV โ€” One-tap export of the full history for personal data analysis.
  • Widgets โ€” Home screen widgets showing today's totals and streak counts.
  • Dark mode โ€” Full Material 3 dynamic colour theming with dark/light toggle.

๐ŸŽฏ Why This Project?

Most wellness apps are either overkill or oversimplified. Wellora finds the productive middle ground: enough structure to build real habits, enough simplicity to actually use it every day.

This project demonstrates:

  • End-to-end native Android development with Jetpack Compose and Material 3.
  • Production-grade Room database integration with complex DAO queries (aggregates, date-range filtering, epoch-day streak arithmetic).
  • Reactive UI architecture using StateFlow and coroutine-based data pipelines.
  • Clean MVVM + Repository separation that is genuinely ready to scale โ€” plug in a Firestore backend and nothing in the ViewModel or UI layer needs to change.

๐Ÿง‘โ€๐Ÿ’ป Developer

Ayush Meel

LinkedIn GitHub


๐Ÿ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

In short: You are free to download, modify, and use this code privately for local learning or school projects. However, if you share this project or any modifications publicly, you must give clear credit to the original author. You are strictly prohibited from using this project, its code, or its concepts for commercial purposes, generating revenue, or business operations without explicit written permission.


Built with โค๏ธ and a stubborn belief that consistency beats intensity โ€” every time.

About

Production-grade, offline-first wellness tracker built with Kotlin 2.0 and Jetpack Compose. Demonstrates a scalable MVVM + Repository architecture featuring a custom SQL-driven Streak Engine, reactive data pipelines via Flow/StateFlow, and complex Room aggregates for real-time habit analytics.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages