Commit graph

12 commits

Author SHA1 Message Date
0da23e9332 Replace complex UnreadMessageData system with elegant path-based wildcard notification tracking inspired by Coracle's pattern. This simplifies the codebase while adding powerful batch "mark as read" capabilities.
Key changes:
  - Add notification store with path-based wildcard support (chat/*, chat/{pubkey}, *)
  - Remove UnreadMessageData interface and processedMessageIds Set tracking
  - Implement timestamp-based "seen at" logic with wildcard matching
  - Add markAllChatsAsRead() for batch operations
  - Integrate ChatNotificationConfig for module configuration
  - Create useNotifications composable for easy notification access

  Benefits:
  - Simpler architecture (removed processedMessageIds complexity)
  - Flexible wildcard-based "mark as read" operations
  - Future-proof for Primal-style backend sync
  - User-scoped storage via StorageService
  - Clean separation of concerns

refactor: enhance chat service with activity tracking and sorting

- Updated the ChatService to track lastSent, lastReceived, and lastChecked timestamps for peers, improving message handling and user experience.
- Implemented sorting of peers by last activity to prioritize recent conversations.
- Adjusted message handling to update peer activity based on message direction.
- Ensured updated peer data is saved to storage after modifications.

These changes streamline chat interactions and enhance the overall functionality of the chat service.

refactor: improve ChatService and notification store initialization

- Updated ChatService to ensure the notification store is initialized only after user authentication, preventing potential errors.
- Introduced a new method to safely access the notification store, enhancing error handling.
- Enhanced peer activity tracking by calculating last activity based on actual message timestamps, improving sorting and user experience.
- Added debounced saving of notification state to storage, optimizing performance and reducing unnecessary writes.
- Improved logging for better debugging and visibility into notification handling processes.

These changes enhance the reliability and efficiency of the chat service and notification management.

refactor: clean up logging in ChatService and notification store

- Removed unnecessary console logs from ChatService to streamline the code and improve performance.
- Simplified the initialization process of the notification store by eliminating redundant logging statements.
- Enhanced readability and maintainability of the code by focusing on essential operations without excessive debug output.

These changes contribute to a cleaner codebase and improved performance in chat service operations.

FIX BUILD ERRORS

refactor: update chat module notification configuration

- Refactored the notification settings in the chat module to use a nested structure, enhancing clarity and organization.
- Introduced `wildcardSupport` to the notification configuration, allowing for more flexible notification handling.
- Maintained existing functionality while improving the overall configuration structure.

These changes contribute to a more maintainable and extensible chat module configuration.

refactor: optimize ChatComponent and ChatService for improved performance

- Removed unnecessary sorting of peers in ChatComponent, leveraging the existing order provided by the chat service.
- Updated the useFuzzySearch composable to directly utilize the sorted peers, enhancing search efficiency.
- Cleaned up logging in ChatService by removing redundant console statements, streamlining the codebase.
- Added critical checks to prevent the current user from being included in peer interactions, improving user experience and functionality.

These changes contribute to a more efficient and maintainable chat module.

refactor: simplify message publishing in ChatService

- Removed unnecessary variable assignment in the message publishing process, directly awaiting the relayHub.publishEvent call.
- This change streamlines the code and enhances readability without altering functionality.

These modifications contribute to a cleaner and more efficient chat service implementation.
2025-10-04 10:29:22 +02:00
f7405bc26e feat: implement image upload functionality with new components and service
- Added ImageUpload and ImageDisplay components for handling image uploads and displaying images, respectively.
- Introduced ImageUploadService to manage image uploads, including validation, processing, and deletion.
- Updated app configuration to include image upload settings and integrated the service into the dependency injection container.
- Enhanced the .env.example file to include image upload configuration options.
- Provided a comprehensive README for the new components, detailing usage and integration examples.

These changes significantly enhance the application's capability to manage image uploads, improving user experience and flexibility in handling images.
2025-09-28 04:08:41 +02:00
ed92c7ba87 Enhance WebSocket service with polling fallback and improved diagnostics
- Added configuration options for polling fallback and polling interval to the WebSocket service, enabling a backup mechanism for real-time updates when WebSocket connections fail.
- Implemented detailed logging for WebSocket events, including connection status, message handling, and error diagnostics, to improve monitoring and debugging capabilities.
- Updated connection handling to manage polling effectively, ensuring users receive timely updates even during WebSocket disruptions.

These changes enhance the reliability and transparency of the WalletWebSocketService, contributing to a better user experience.
2025-09-18 11:52:02 +02:00
15a7540515 Update WebSocket configuration and enhance connection handling in WalletWebSocketService
- Increased reconnect delay from 1 second to 2 seconds and reduced max reconnect attempts from 5 to 3 to minimize server load.
- Improved logging messages for connection status and abnormal closures, providing clearer insights during reconnection attempts.
- Added a ping mechanism to test connection stability and handle network connectivity issues more effectively.

These changes enhance the reliability and performance of the WebSocket service, contributing to a better user experience.
2025-09-18 10:30:33 +02:00
6a1e70303d Update WebSocket configuration and enhance logging in WalletWebSocketService
- Modified WebSocket configuration to allow enabling/disabling via environment variable, improving flexibility.
- Enhanced logging in WalletWebSocketService to provide clearer messages during reconnection attempts and notify users of WebSocket issues.

These changes improve the configurability and user experience of the wallet's WebSocket interactions.
2025-09-18 10:25:17 +02:00
49e94a894c Add WebSocket support for wallet transactions and balance updates
- Introduced WalletWebSocketService to manage WebSocket connections for real-time wallet updates.
- Implemented methods to handle incoming messages, including wallet balance updates and transaction notifications.
- Updated WalletService to add transactions based on WebSocket notifications, ensuring accurate wallet state.
- Enhanced app configuration to support WebSocket settings, improving flexibility in connection management.

These changes enhance the wallet module's responsiveness and user experience by providing real-time updates on wallet activities.

Enhance WalletWebSocketService with improved logging and authentication event handling

- Added detailed logging throughout the WalletWebSocketService to aid in debugging and monitoring.
- Integrated eventBus to listen for authentication events, enabling automatic connection and disconnection based on user login status.
- Adjusted WebSocket connection logic to handle wallet credentials more effectively and ensure accurate balance updates.
- Improved error handling and connection management for a more robust WebSocket experience.

These enhancements improve the reliability and transparency of the wallet's WebSocket interactions, contributing to a better user experience.

Enhance wallet balance update logic and logging in WalletWebSocketService

- Improved logging for wallet balance updates to provide clearer insights into balance changes and payment adjustments.
- Refined balance adjustment logic to correctly handle outgoing and incoming payments, ensuring accurate wallet state.
- Updated AuthService to log both the old and new wallet balance during updates, enhancing debugging capabilities.

These changes improve the reliability and transparency of wallet balance management, contributing to a better user experience.

Refactor wallet balance update logic in AuthService and WalletWebSocketService

- Enhanced the updateWalletBalance method in AuthService to accept an optional walletId, allowing for more flexible wallet balance updates.
- Improved logging to indicate which wallet's balance is being updated, aiding in debugging.
- Updated WalletWebSocketService to retrieve the wallet ID from PaymentService before updating the balance, ensuring accurate wallet state management.

These changes improve the robustness and clarity of wallet balance handling across the application.
2025-09-18 09:31:15 +02:00
f75aae6be6 Add wallet module with receive and send functionality
- Introduced a new wallet module that includes components for sending and receiving Bitcoin payments.
- Implemented WalletService to manage payment links and transactions, including methods for creating LNURL pay links and sending payments.
- Added dialogs for receiving and sending payments, enhancing user interaction with the wallet.
- Updated app configuration to enable the wallet module and integrated it into the main application flow.

These changes provide users with a comprehensive wallet experience, allowing for seamless Bitcoin transactions.
2025-09-14 23:08:01 +02:00
b25e502c17 Add NostrmarketAPI integration and enhance MerchantStore component
- Introduce NostrmarketAPI service for improved merchant profile management.
- Update MerchantStore component to handle loading and error states during merchant profile checks.
- Implement logic to check for merchant profiles using the new API, enhancing user experience.
- Refactor computed properties and lifecycle methods to accommodate the new API integration.

These changes streamline the process of checking and managing merchant profiles, providing users with real-time feedback and improving overall functionality.
2025-09-08 16:58:10 +02:00
0ee0bc428c Refactor chat module and navigation components for improved user experience
- Update app configuration to load chat module on startup for route registration.
- Introduce useModularNavigation composable for dynamic navigation based on enabled modules.
- Simplify Navbar.vue by utilizing userMenuItems for dropdown and button rendering, enhancing maintainability.
- Enhance ChatPage.vue with detailed debug information and user authentication checks for better feedback.
2025-09-05 00:31:53 +02:00
c692664c93 Update app configuration and plugin manager for improved environment variable support
- Modify app configuration to use environment variables for base URL and API key, enhancing flexibility for different environments.
- Refactor plugin installation logic in the PluginManager to ensure proper configuration object structure.
- Update base module initialization to correctly access Nostr relay options from the configuration, improving reliability.
2025-09-05 00:17:11 +02:00
e40ac91417 Enhance market module with new chat and events features
- Introduce chat module with components, services, and composables for real-time messaging.
- Implement events module with API service, components, and ticket purchasing functionality.
- Update app configuration to include new modules and their respective settings.
- Refactor existing components to integrate with the new chat and events features.
- Enhance market store and services to support new functionalities and improve order management.
- Update routing to accommodate new views for chat and events, ensuring seamless navigation.
2025-09-05 00:01:40 +02:00
519a9003d4 Implement modular architecture with core services and Nostr integration
- Introduce a modular application structure with a new app configuration file to manage module settings and features.
- Implement a dependency injection container for service management across modules.
- Create a plugin manager to handle module registration, installation, and lifecycle management.
- Develop a global event bus for inter-module communication, enhancing loose coupling between components.
- Add core modules including base functionalities, Nostr feed, and PWA services, with support for dynamic loading and configuration.
- Establish a Nostr client hub for managing WebSocket connections and event handling.
- Enhance user experience with a responsive Nostr feed component, integrating admin announcements and community posts.
- Refactor existing components to align with the new modular architecture, improving maintainability and scalability.
2025-09-04 23:43:33 +02:00