Last active
July 29, 2025 17:47
-
-
Save csain/2c09368bcde85b7da6debe7a759cc82c to your computer and use it in GitHub Desktop.
Revisions
-
csain revised this gist
Jul 29, 2025 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,9 +28,6 @@ Data access is managed using the **Room persistence library**. This is optimal f ## ER Diagram ```mermaid erDiagram CHALLENGES { -
csain revised this gist
Jul 29, 2025 . 2 changed files with 78 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,9 +10,11 @@ - Back-end: Kotlin ## Features - personalized challenge with fixed number of days - custom units for daily progress tracking - full progress tracking view ## Links - [Repo]( https://github.com/csain/flex-75-android ) (private) - [Colleen's Projects](https://gist.github.com/csain/20ff7a32d2bc13d8a24597d54db9d630) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,74 @@ # Habit Challenge Schema This schema supports a simple habit challenge app where users commit to completing a set of tasks daily over a fixed number of days. --- ## Database Overview A **Challenge** is a fixed-length commitment of a set of **ChallengeTasks**. For example, the **Challenge** may last 21 days and include 3 **ChallengeTasks**: - Walk 10K steps - Drink 8 glasses of water - Study 45 minutes Each day, the user sees the same list of tasks, **DailyTaskItems**, which are grouped in the **DailyTaskList** for that day. The schema is designed to record consistency and progress without changing the challenge once it starts. --- ## Database Details This schema is implemented using **SQLite**, the native local database engine on Android devices. Data access is managed using the **Room persistence library**. This is optimal for offline-first, local storage of structured data in Android apps. --- ## ER Diagram  ```mermaid erDiagram CHALLENGES { Long id PK Int numDays Date startDate Date stoppedAt Date completedAt } CHALLENGE_TASKS { Long id PK Long challengeId FK String title String unit Float amount } DAILY_TASK_LISTS { Long id PK Long challengeId FK Date date Int numDay Date completedAt } DAILY_TASK_ITEMS { Long id PK Long dailyTaskListId FK Long challengeTaskId FK Float progressAmount Date completedAt } CHALLENGES ||--o{ CHALLENGE_TASKS : has CHALLENGES ||--o{ DAILY_TASK_LISTS : contains DAILY_TASK_LISTS ||--o{ DAILY_TASK_ITEMS : includes CHALLENGE_TASKS ||--o{ DAILY_TASK_ITEMS : used_by ``` -
csain created this gist
Jul 22, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # Daily Habit Challenge ## Overview **What**: A daily habit challenge app for Android. ## Tech Stack - Front-end: Jetpack Compose (Kotlin) - Back-end: Kotlin ## Features - ## Links - [Repo]( ) (private) - [Colleen's Projects](https://gist.github.com/csain/20ff7a32d2bc13d8a24597d54db9d630)