@opentask/taskin-task-provider-pinia

Pinia store for task management integration with Taskin
2,224 1
Install
npm install @opentask/taskin-task-provider-pinia
Latest Version:4.0.0
Vue:3
License:MIT
Last Updated:Oct 12, 2026
Links: GitHub  ·  npm
Maintainer: sidartaveloso

@opentask/taskin-task-provider-pinia

Pinia-based task provider with WebSocket synchronization for real-time task management in Vue applications.

Features

  • ✅ Implements ITaskProvider interface
  • ✅ Reactive state management with Pinia
  • ✅ Real-time synchronization via WebSocket
  • ✅ Offline-first with local cache
  • ✅ Automatic reconnection
  • ✅ TypeScript support

Installation

pnpm add @opentask/taskin-task-provider-pinia

Usage

import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { usePiniaTaskProvider } from '@opentask/taskin-task-provider-pinia';

const app = createApp(App);
const pinia = createPinia();
app.use(pinia);

// Connect to WebSocket server
const taskStore = usePiniaTaskProvider();
taskStore.connect('ws://localhost:3001');

// Use as ITaskProvider
const tasks = await taskStore.getAllTasks();

// Change a task through a named operation — reflected in the cache right away
taskStore.operar({ type: 'set-priority', payload: { taskId: '042', priority: 30 } });
taskStore.operar({ type: 'assign-to-group', payload: { taskId: '042', groupId: 'g-sprint' } });

updateTask always rejects: the server only takes named operations (set-priority, set-difficulty, assign-to-group, remove-from-group, move-before, move-after, create-group). See the protocol in @opentask/taskin-task-server-ws.

API

See src/index.ts for full API documentation.

License

MIT © OpenTask

Related Packages

vue-native-websocket

Native WebSocket plugin and composable for Vue 3

478,654 935
vue-native-websocket-vue3

支持vue3和vuex、pinia的websocket插件

162,849 221
vue-indiesockets

A lightweight Websocket-Plugin for vue.js including the fitting server implement...

1,545 3
vue-mqtt

Connect to mqtt through websocket, implementation for Vuejs 2

7,696 95
vue-simple-websocket

A simple native reconnecting websocket for Vue.js

1,595 9

Version History

Version Released License
4.0.0 MIT
3.0.6 MIT
3.0.4 MIT
3.0.3 MIT
3.0.2 MIT