Edqe14 / tasklists

To-do web app with React and Tauri
MIT License
0 stars 0 forks source link

Model the app's data structure #1

Open Edqe14 opened 2 years ago

Edqe14 commented 2 years ago

v1 Features šŸš€

  1. Day-based tasks
  2. Categorical tasks grouped list
  3. Routine reminders
  4. Focus-mode Pomodoro style
  5. CLI-style way to add tasks or routines.

Idea šŸ¤”

Task šŸ“‹

  1. It's possible to have multiple tasks in a day. (Change: just make the tasks grouped by category)
  2. Each task is grouped by its category prefixed by @.
  3. Each task could be re-ordered.
  4. Each task could be starred and will be always shown at the top of everything (locally ordered by its actual position).
  5. Task have an optional deadline date & time.
  6. Task that is near its deadline customizable for how near it will count as 'near' will take the highest position/priority.

Routine šŸƒā€ā™‚ļø

  1. Pickable intervals.
    1. Multiple days Monday - Sunday
    2. Multiple times Hour : Minute (12/24h format, configurable)
  2. Important routine default: true. Will show a notification if not in focus and show a modal or else just show a toast on the corner.

Focus-mode āŒš

  1. Count-down timer, 25mins for a pomodoro, 5mins for a short break, 15mins for a long break. all is customizable.
  2. Automatically shows the day's tasks & automatically marks them as finished on every pomodoro.
Edqe14 commented 2 years ago

Tasks āœ…

interface Collection {
  id: string;
  name: string;
}

interface Task {
  id: string;                       // Snowflake
  name: string;                     // Simple & short task name (e.g. "Clean the house")
  description: object;              // Longer description of the task, tiptap's JSON output
  collections: Collection['id'][];  // Task collections (prefixed by @)
  order: number;                    // Order of the task in the collection
  starred: boolean;                 // Whether the task is starred
  deadline?: Date;                  // Deadline of the task, optional
}

type AllTasks = Record<string, Task[]>;
Edqe14 commented 2 years ago

Routine

interface RoutineSchedule {
  days: number[];       // 0-6, 0 is Sunday
  times: string[];      // HH:MM
}

interface Routine {
  name: string;
  schedule: RoutineSchedule;
  important: boolean;
}
Edqe14 commented 2 years ago

Configuration

interface Configuration {
  colorScheme: number;           // Index of the color scheme to use

  task: {
    deadline: {
      enabled: boolean;          // Whether to check for deadlines
      threshold: number[];       // In miliseconds, threshold to test for near deadlines
    };
  };

  routine: {
    hour12: boolean;
    defaultImportant: boolean;
  };

  focusMode: {
    pomodoroLength: number;      // In minutes
    shortBreakLength: number;    // In minutes
    longBreakLength: number;     // In minutes
    longBreakAfter: number;      // In pomodoros
    automaticallyMarkAsDone: boolean;
  };

  notifications: {
    enabled: boolean;

    deadline: boolean;
    routine: boolean;
    focusMode: boolean;

    sound: {
      enabled: boolean;

      deadline: boolean;
      routine: boolean;
      focusMode: boolean;
    };
  };
}