- 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.
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
// New modular application entry point
|
|
import { startApp } from './app'
|
|
import { registerSW } from 'virtual:pwa-register'
|
|
import 'vue-sonner/style.css'
|
|
|
|
// Simple periodic service worker updates
|
|
const intervalMS = 60 * 60 * 1000 // 1 hour
|
|
registerSW({
|
|
onRegistered(r) {
|
|
r && setInterval(() => {
|
|
r.update()
|
|
}, intervalMS)
|
|
},
|
|
onOfflineReady() {
|
|
console.log('App ready to work offline')
|
|
}
|
|
})
|
|
|
|
// Start the modular application
|
|
startApp()
|