Commit graph

9 commits

Author SHA1 Message Date
14d6bc6329 Add NostrmarketService to dependency injection container
- Introduce NOSTRMARKET_SERVICE token in the DI container for better service management.
- Update market module to create and register NostrmarketService instance using the new DI pattern.
- Refactor components and composables to inject NostrmarketService via the DI container, enhancing modularity and testability.

These changes improve the architecture by ensuring consistent service injection and eliminating legacy singleton references, aligning with the overall dependency injection strategy.
2025-09-07 01:31:24 +02:00
7a32085ee1 Migrate InvoiceService to dependency injection pattern
- Add INVOICE_SERVICE token to DI container
- Register InvoiceService in base module with proper lifecycle
- Update market store to use dependency injection instead of singleton
- Remove exported singleton from InvoiceService class
- Add comprehensive migration documentation with examples
- Maintain type safety with proper TypeScript interfaces

This migration eliminates the legacy singleton pattern and improves:
- Testability through service injection
- Modular architecture with clear boundaries
- Single source of truth for service instances
- Consistent dependency injection patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 01:10:55 +02:00
04d64fe116 1.3.6 Toast Notification Pattern: Add centralized ToastService abstraction
- Create ToastService extending BaseService with context-specific toast methods
- Add useToast composable for convenient dependency injection access
- Provide standardized toast patterns: auth, payment, clipboard, operations
- Include async operation support with automatic loading/success/error states
- Integrate with DI container and base module for automatic initialization
- Demonstrate refactoring in LoginDialog.vue with context-specific methods
- Eliminate duplicate vue-sonner imports across 20+ files for better maintainability
- Support custom ToastOptions interface with full TypeScript compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 12:24:05 +02:00
3cf10b1db4 1.3.4 User-Scoped Storage Pattern: Add StorageService integration across modules for improved data management
- Introduced STORAGE_SERVICE token in the DI container for consistent service registration.
- Updated BaseService to include storageService as a dependency, ensuring proper initialization and error handling.
- Refactored ChatService to utilize storageService for managing unread messages and peers, replacing localStorage usage.
- Enhanced MarketStore to save and load orders using storageService, improving data persistence and user experience.
- Registered storageService in the base module, ensuring it is initialized and disposed of correctly.

This integration streamlines data handling across the application, promoting better maintainability and consistency.
2025-09-06 12:08:39 +02:00
7e4b64b831 Remove LEGACY Nostr client services and related components to streamline the codebase
- Delete Nostr client hub and associated files, including the Nostr store, to eliminate unused functionality.
- Update service tokens and dependency injections to reflect the removal of Nostr client services.
- Adjust notification settings in NotificationSettings.vue to prepare for future implementation of notifications.
2025-09-06 10:55:10 +02:00
3e9c9bbdef Add VisibilityService for managing app visibility state and connection recovery
- Introduce a new VisibilityService to handle application visibility state, including online/offline status and connection management.
- Update DI container to register the new VisibilityService and integrate it into the base module.
- Modify BaseService to include visibilityService as a dependency, ensuring proper initialization and error handling.
- Enhance RelayHub to register with VisibilityService for improved connection management during visibility changes.
- Refactor related components to utilize the new service, streamlining visibility handling across the application.
2025-09-05 15:34:09 +02:00
0bced11623 Add PaymentService integration to enhance ticket purchasing and lightning payment functionality
- Introduce PAYMENT_SERVICE token in di-container for dependency injection.
- Update base module to register and initialize PaymentService, ensuring it is available for use.
- Refactor useTicketPurchase and useLightningPayment composables to utilize PaymentService for wallet management, payment processing, and QR code generation.
- Delegate payment handling and error management to PaymentService, streamlining the payment workflow and improving user experience.
2025-09-05 15:17:51 +02:00
8d4c389f71 Add BaseService and refactor ChatService for improved dependency management
- Introduce BaseService as a foundational class for services, providing standardized dependency injection and initialization logic.
- Refactor ChatService to extend BaseService, enhancing its initialization process and dependency handling.
- Implement service metadata and structured initialization in ChatService, allowing for better tracking and error handling during service setup.
- Update chat module to initialize ChatService with dependency management, ensuring readiness before use.
2025-09-05 06:19:08 +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