7 Commits

Author SHA1 Message Date
natreex
4bc6a40b38 Extend repository methods and synchronization logic with existence checks for books, chapters, characters, and related entities
- Add methods to verify the existence of acts, plot points, incidents, worlds, characters, locations, and their sub-elements in repositories.
- Update `syncBookFromServerToClient` to integrate existence checks with insert or update logic.
- Enhance multilingual error handling across repository methods.
2025-12-24 11:48:50 -05:00
natreex
64c7cb6243 Update database schema and synchronization logic
- Add `useEffect` in `ScribeLeftBar` for handling book state changes.
- Extend `BooksSyncContext` with new properties and stricter typings.
- Refine `Repositories` to include `lastUpdate` handling for synchronization processes.
- Add comprehensive `fetchComplete*` repository methods for retrieving entity-specific sync data.
- Enhance offline logic for chapters, characters, locations, and world synchronization.
- Improve error handling across IPC handlers and repositories.
2025-12-15 20:55:24 -05:00
natreex
bb331b5c22 Add BooksSyncContext, refine database schema, and enhance synchronization support
- Introduce `BooksSyncContext` for managing book synchronization states (server-only, local-only, to-sync, etc.).
- Remove `UserContext` and related dependencies.
- Refine localization strings (`en.json`) with sync-related updates (e.g., "toSyncFromServer", "toSyncToServer").
- Extend database schema with additional tables and fields for syncing books, chapters, and related entities.
- Add `last_update` fields and update corresponding repository methods to support synchronization logic.
- Enhance IPC handlers with stricter typing, data validation, and sync-aware operations.
2025-12-07 14:36:03 -05:00
natreex
9648d9e9be Upgrade database schema to version 2 and remove unused meta_* columns
- Increment `SCHEMA_VERSION` to 2 in `schema.ts`.
- Remove all `meta_*` columns from database tables.
- Add migration logic to handle schema upgrades and clean up unused columns.
- Modify database models and repository methods to exclude `meta_*` fields for stricter typings and improved structure.
- Refactor and optimize query statements across repositories to align with new schema changes.
2025-11-26 19:17:40 -05:00
natreex
004008cc13 Refactor imports, streamline database IPC handlers, and improve offline support
- Replace absolute import paths with relative paths for consistency across files.
- Transition database operations in Electron main process to modular handlers in `ipc/book.ipc.ts` using the `createHandler` pattern.
- Update database sync service to use `window.electron.invoke()` for improved reliability and structure.
- Refactor `AddNewBookForm` to handle both online and offline book creation seamlessly.
2025-11-18 21:28:41 -05:00
natreex
3bc30d42ad Remove Story model handling verbal styles and linguistic properties
- Delete `Story` model implementation including `getVerbesStyle` method and related properties.
- Cleanup unused interfaces and redundant logic from the codebase.
2025-11-17 21:32:42 -05:00
natreex
4cd4f68d1a Add repository classes for character, location, and user data management
- Implement `CharacterRepo`, `LocationRepo`, and `UserRepo` for managing character, location, and user data with SQLite.
- Add methods for performing CRUD operations on characters, locations, and users, including attributes and metadata handling.
- Integrate error handling with multilingual support (`fr` and `en`).
- Support data encryption and synchronization using the existing database utilities.
2025-11-17 19:57:36 -05:00