@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
ITaskProviderinterface - ✅ 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-indiesockets
A lightweight Websocket-Plugin for vue.js including the fitting server implement...
1,545
3
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 | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.0.1 | MIT | |
| 1.0.4 | MIT | |
| 1.0.3 | MIT | |
| 1.0.2 | MIT | |
| 1.0.1 | MIT | |
| 1.0.0 | MIT |