Apps

Tasks

Lists, tags, natural language quick add, grouping, subtasks, repeats and an inline task panel.

composables/apps/useTodo.ts
View in the demo

Tasks carry time, repeat, notes, subtasks, createdAt and createdBy. TodoTaskPanel edits every field in place, so there is no task dialog.

Every app follows the same pattern: typed models in types/models/, demo data in mocks/, state and actions in a composable under composables/apps/, page-only components in components/pages/<app>/ and UI strings in locales/<code>/apps.json. Read the apps overview once and every app looks familiar.

Files

File
Role
pages/todo.vueThe page: sidebar, list and task panel.
composables/apps/useTodo.tsTasks, filters, groups, quick add and trash.
types/models/todo.tsTasks, filters and the provider.
config/todo.config.tsLists, tags, priorities and repeat options.
utils/todo.tsPure rules, unit tested.
components/pages/todo/TodoSidebar, TodoList, TodoTaskItem, TodoTaskPanel, TodoQuickAdd.

Data and provider

types/models/todo.ts
export interface TodoProvider {
  list: () => Promise<TodoTask[]>
  save: (task: TodoTask) => Promise<void>
  remove: (id: string) => Promise<void>
}

Connect your backend

The page calls useTodo() with the mock provider. Write a provider that calls your API with useApi() and pass it in the page. The composable loads it through useAsyncData and applies every change optimistically, so the interface does not wait for the server.

providers/todo.ts
import type { TodoProvider, TodoTask } from '~/types/models/todo'

export function createTodoApiProvider(): TodoProvider {
  const api = useApi()

  return {
    list: () => api<TodoTask[]>('/tasks'),
    save: (task) => api(`/tasks/${task.id}`, { method: 'PUT', body: task }),
    remove: (id) => api(`/tasks/${id}`, { method: 'DELETE' }),
  }
}
pages/todo.vue
<script setup lang="ts">
import { createTodoApiProvider } from '~/providers/todo'

const { ... } = useTodo({ provider: createTodoApiProvider() })
</script>

Keep ids in your data and labels in the locales: folders, labels and tags resolve their names through apps.<app>.* unless you give them a raw title. See Connect your API for the token, validation errors and the actions the demo only fakes.

Configuration

TODO_FILTERS

The lists of the sidebar with their icon.

config/todo.config.ts
const TODO_FILTERS: TodoFilterConfig[]

TODO_TAGS

Tags with their color and an optional raw title; otherwise apps.todo.tags.<id>.

config/todo.config.ts
const TODO_TAGS: TodoTagConfig[]

TODO_PRIORITIES

The priorities.

config/todo.config.ts
const TODO_PRIORITIES: TodoPriority[]

TODO_REPEATS

The repeat options.

config/todo.config.ts
const TODO_REPEATS: TodoRepeat[]

Rules

Pure functions in utils/, unit tested. Use them in your backend too if you want the same answers.

parseTodoQuickAdd()

Parses the quick add text.

utils/todo.ts
parseTodoQuickAdd(text: string, today: string, vocabulary: TodoQuickAddVocabulary): TodoQuickAdd

todoDateGroup()

The date group of a task.

utils/todo.ts
todoDateGroup(task: TodoTask, today: string, weekEnd: string): TodoDateGroup

matchesTodoFilter()

Whether a task belongs to a list.

utils/todo.ts
matchesTodoFilter(task: TodoTask, filter: TodoFilter, context: { today: string; weekEnd: string; me: string }): boolean

subtaskProgress()

Subtask progress.

utils/todo.ts
subtaskProgress(task: TodoTask): { done: number; total: number; }
Returnsdonetotal

How it works

  • TodoQuickAdd understands today and tomorrow (plus the words in apps.todo.quickAdd.todayWords|tomorrowWords), HH:MM, !priority and #tag, and previews the chips before Enter. n focuses it.
  • Groups follow groupBy (date, priority or assignee). The completed group starts collapsed and the overdue group offers “move all to today”.
  • Moving to the trash shows an undo toast; deleting forever and emptying the trash confirm with useConfirm().
  • The sidebar has the progress ring, the lists and multi-select tags.
© 2026 melsami UI.
Developer documentation for melsami UI.