webapp/src/modules/nostr-feed/index.ts
padreug 6b5c6d4ffe 1.3.5 Module Registration Pattern: Add BaseModulePlugin abstraction
- Create BaseModulePlugin class to eliminate boilerplate across modules
- Provide standardized service registration, component registration, and event setup
- Implement declarative configuration approach with onInstall/onUninstall hooks
- Add automatic logging with consistent emoji patterns and error handling
- Refactor nostr-feed and events modules to demonstrate pattern (~47% code reduction)
- Maintain full TypeScript compatibility and backward compatibility
- All modules now follow identical registration patterns for better maintainability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 12:16:40 +02:00

27 lines
No EOL
541 B
TypeScript

import { createModulePlugin } from '@/core/base/BaseModulePlugin'
import NostrFeed from './components/NostrFeed.vue'
import { useFeed } from './composables/useFeed'
/**
* Nostr Feed Module Plugin
* Provides social feed functionality with admin announcements support
*/
export const nostrFeedModule = createModulePlugin({
name: 'nostr-feed',
version: '1.0.0',
dependencies: ['base'],
components: {
NostrFeed
},
routes: [],
exports: {
composables: {
useFeed
}
}
})
export default nostrFeedModule