Skip to content

Instantly share code, notes, and snippets.

@rkmax
Last active August 29, 2015 14:24
Show Gist options
  • Save rkmax/a2e8b03cdf928dd1a4ab to your computer and use it in GitHub Desktop.
Save rkmax/a2e8b03cdf928dd1a4ab to your computer and use it in GitHub Desktop.
Habits & Tasks

Habits & Tasks

Model

![Class Diagram](http://yuml.me/diagram/plain/class/ [Task|title:string;recurrence:json]<>-template*>[RecommendedTask|instructions:string], [RecommendedTask]<>-task*>[Habit|title:string;instructions:string;recurrence:json], [PracticeStep]<>-step>[Habit], [User]<>-takingBy>[Habit], [Habit]<>-taskCompletion*>[Completions|completed_at:datetime])

Allow contributors to give users "Tasks" to do or perform within context of a practice

Tasks

are composed by

  • Title
  • Recurrence

The tasks serves as template for reusing tasks defined by contributors

Recommended Tasks

Can be inserted in any step type inside a practice when they're edsigning a practice

are composed by

  • Title (inheritance)
  • Instructions
  • Recurrence
  • Resources

The contributors can attach resources for when a user wants to view Task detail

Active Recommended Tasks (aka Habits)

Are recommended tasks accepted by users and install (if it's need) local notifications to remember complete it

are composed by

  • title (inheritance)
  • Instructions (inheritance)
  • Recurrence
  • Resources (inheritance)

Recommendation History (aka Completions)

Are created by users when sent his completions to the backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment