Initial commit: Calendar Plantempus project setup with TypeScript, ASP.NET Core, and event-driven architecture

This commit is contained in:
Janus Knudsen 2025-07-24 22:17:38 +02:00
commit f06c02121c
38 changed files with 8233 additions and 0 deletions

50
src/index.ts Normal file
View file

@ -0,0 +1,50 @@
// Main entry point for Calendar Plantempus
import { eventBus } from './core/EventBus.js';
import { CalendarManager } from './managers/CalendarManager.js';
import { NavigationManager } from './managers/NavigationManager.js';
import { ViewManager } from './managers/ViewManager.js';
import { EventManager } from './managers/EventManager.js';
import { EventRenderer } from './managers/EventRenderer.js';
import { CalendarConfig } from './core/CalendarConfig.js';
/**
* Initialize the calendar application
*/
function initializeCalendar(): void {
console.log('🗓️ Initializing Calendar Plantempus...');
// Create calendar configuration
const config = new CalendarConfig();
// Initialize managers
const calendarManager = new CalendarManager(eventBus, config);
const navigationManager = new NavigationManager(eventBus);
const viewManager = new ViewManager(eventBus);
const eventManager = new EventManager(eventBus);
const eventRenderer = new EventRenderer(eventBus);
// Enable debug mode for development
eventBus.setDebug(true);
// Initialize all managers
calendarManager.initialize();
console.log('✅ Calendar Plantempus initialized successfully with all core managers');
// Expose to window for debugging
(window as any).calendarDebug = {
eventBus,
calendarManager,
navigationManager,
viewManager,
eventManager,
eventRenderer
};
}
// Initialize when DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initializeCalendar);
} else {
initializeCalendar();
}