Refactors calendar data management and sync infrastructure

Introduces comprehensive data management system for calendar V2
- Adds IndexedDB storage with pluggable entity services
- Implements EventBus for decoupled event communication
- Creates data seeding mechanism for initial application setup
- Establishes sync and repository abstractions for flexible data handling
This commit is contained in:
Janus C. H. Knudsen 2025-12-08 00:26:16 +01:00
parent dee977d4df
commit e581039b62
17 changed files with 1076 additions and 4 deletions

18
src/v2/storage/IStore.ts Normal file
View file

@ -0,0 +1,18 @@
/**
* IStore - Interface for IndexedDB ObjectStore definitions
*
* Each entity store implements this interface to define its schema.
* Enables Open/Closed Principle: IndexedDBContext works with any IStore.
*/
export interface IStore {
/**
* The name of the ObjectStore in IndexedDB
*/
readonly storeName: string;
/**
* Create the ObjectStore with its schema (indexes, keyPath, etc.)
* Called during database upgrade (onupgradeneeded event)
*/
create(db: IDBDatabase): void;
}