No description
Added granular task state management to scheduled events/tasks with three states plus unclaimed. Tasks now support a full workflow from claiming to completion with visual feedback at each stage. **New Task States:** - **Unclaimed** (no RSVP event) - Task available for anyone to claim - **Claimed** - User has reserved the task but hasn't started - **In Progress** - User is actively working on the task - **Completed** - Task is done - **Blocked** - Task is stuck (supported but not yet used in UI) - **Cancelled** - Task won't be completed (supported but not yet used in UI) **Service Layer (ScheduledEventService.ts):** - Updated `EventCompletion` interface: replaced `completed: boolean` with `taskStatus: TaskStatus` - Added `TaskStatus` type: `'claimed' | 'in-progress' | 'completed' | 'blocked' | 'cancelled'` - New methods: `claimTask()`, `startTask()`, `getTaskStatus()` - Refactored `completeEvent()` and renamed `uncompleteEvent()` to `unclaimTask()` - Internal `updateTaskStatus()` method handles all state changes - Uses `task-status` tag instead of `completed` tag in Nostr events - `unclaimTask()` publishes deletion event (kind 5) to remove RSVP - Backward compatibility: reads old `completed` tag and converts to new taskStatus **Composable (useScheduledEvents.ts):** - Exported new methods: `claimTask`, `startTask`, `unclaimTask`, `getTaskStatus` - Updated `completeEvent` signature to accept occurrence parameter - Marked `toggleComplete` as deprecated (still works for compatibility) **UI (ScheduledEventCard.vue):** - Context-aware action buttons based on current task status: - Unclaimed: "Claim Task" button - Claimed: "Start Task" + "Unclaim" buttons - In Progress: "Mark Complete" + "Unclaim" buttons - Completed: "Unclaim" button only - Status badges with icons and color coding: - 👋 Claimed (blue) - 🔄 In Progress (orange) - ✓ Completed (green) - Shows who claimed/is working on/completed each task - Unified confirmation dialog for all actions - Quick action buttons in collapsed view - Full button set in expanded view **Feed Integration (NostrFeed.vue):** - Added handlers: `onClaimTask`, `onStartTask`, `onCompleteTask`, `onUnclaimTask` - Passes `getTaskStatus` prop to ScheduledEventCard - Wired up all new event emitters **Nostr Protocol:** - Uses NIP-52 Calendar Event RSVP (kind 31925) - Custom `task-status` tag for granular state tracking - Deletion events (kind 5) for unclaiming tasks - Fully decentralized - all state stored on Nostr relays 🐢 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .vscode | ||
| docs | ||
| electron | ||
| public | ||
| src | ||
| .cursorrules | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| components.json | ||
| forge.config.js | ||
| index.html | ||
| nginx.conf.example | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tailwind.config.js | ||
| test-formatting.html | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
Ario Web App
A modular Vue 3 + TypeScript application with Nostr protocol integration and Lightning Network wallet functionality.
Features
- Modular Architecture: Plugin-based system with dependency injection
- Nostr Integration: Decentralized social networking and messaging
- Lightning Wallet: Real-time balance updates with LNbits WebSocket integration
- Event Ticketing: Lightning-powered event tickets and marketplace
- PWA Support: Progressive Web App with offline capabilities
- Desktop App: Electron-based desktop application
Real-Time Wallet Features
The application provides seamless Lightning Network wallet integration:
- Lightning Invoice Creation: Create BOLT11 invoices for receiving payments with QR codes
- Smart Payment Scanning: QR code scanner for Lightning invoices, LNURL, and Lightning addresses
- Universal Payment Support: Send to Lightning invoices, Lightning addresses (user@domain.com), and LNURL
- Smart Amount Fields: Amount input only appears when needed (LNURL, Lightning addresses, or zero-amount invoices)
- Instant Balance Updates: WebSocket connection provides real-time balance updates when payments are sent or received
- Live Notifications: Toast notifications for incoming payments
- Connection Management: Automatic reconnection with exponential backoff
- Battery Optimization: Pauses WebSocket when app is not visible to save battery
- Multi-Wallet Support: Manages multiple Lightning wallets with the first wallet as default
WebSocket Configuration
Configure WebSocket behavior in src/app.config.ts:
modules: {
wallet: {
enabled: true,
config: {
websocket: {
enabled: true, // Enable/disable real-time updates
reconnectDelay: 1000, // Initial reconnection delay (ms)
maxReconnectAttempts: 5 // Maximum reconnection attempts
}
}
}
}
Development
# Install dependencies
npm install
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Run Electron desktop app
npm run electron:dev
Environment Setup
Required environment variables:
# LNbits server URL for Lightning wallet functionality
VITE_LNBITS_BASE_URL=http://localhost:5000
# Nostr relay configuration (JSON array)
VITE_NOSTR_RELAYS='["wss://relay1.example.com","wss://relay2.example.com"]'
Architecture
The application follows a modular architecture with the following core modules:
- Base Module: Authentication, Nostr client, PWA functionality
- Wallet Module: Lightning payments, WebSocket balance updates, transaction management
- Events Module: Event ticketing with Lightning payment integration
- Market Module: Nostr marketplace functionality
- Chat Module: Encrypted messaging via Nostr
For detailed development guidelines, see CLAUDE.md.