Commit Graph

10 Commits

Author SHA1 Message Date
natreex
d5eb1691d9 Add database schema, encryption utilities, and local database service
- Implement `schema.ts` for SQLite schema creation, indexing, and sync metadata initialization.
- Develop `encryption.ts` with AES-256-GCM encryption utilities for securing database data.
- Add `database.service.ts` to manage CRUD operations with encryption support, user-specific databases, and schema initialization.
- Integrate book, chapter, and character operations with encrypted content handling and sync preparation.
2025-11-17 09:34:54 -05:00
natreex
09768aafcf Implement synchronization, offline data handling, and intelligent request routing
- Add services for offline data management, including `offline-data.service.ts`, ensuring data is saved to a local database and synced with the server when online.
- Introduce bidirectional `SyncService` for managing data synchronization with conflict resolution and retry mechanisms.
- Create `data.service.ts` to handle smart routing between local database and server API based on connectivity status.
- Update models and logic to support comprehensive synchronization for books, chapters, characters, and conversations.
- Implement event listeners for online/offline detection and automatic sync scheduling.
2025-11-17 07:47:15 -05:00
natreex
71067c6fa8 Integrate local database management and IPC handlers into Electron
- Add comprehensive IPC handlers for database operations like books, chapters, characters, and conversations.
- Implement local database initialization and user data encryption.
- Update preload script paths for consistent environment handling.
- Modify `page.tsx` to initialize local database within Electron environment.
- Add new dependencies including `node-sqlite3-wasm` and `electron-rebuild`.
2025-11-17 07:46:20 -05:00
natreex
b4eafca3bc Add comprehensive models and script for handling inline scripts and structured data
- Implement `remove-inline-scripts.js` to externalize Next.js inline scripts, enhancing CSP compliance.
- Add models for `Book`, `Character`, `Story`, `Editor`, `System`, and `BookSerie` with relevant properties and utilities.
- Include macOS entitlements plist for app development with advanced permissions.
- Add utility functions to handle script hashing, cookie management, and content formatting.
2025-11-16 19:56:14 -05:00
natreex
a1fcca45cb Update Electron main process for production readiness and app protocol handling
- Register `app://` protocol for secure file handling in production.
- Adjust icon paths to support macOS and Windows/Linux distinctions.
- Enhance security by validating file paths under the `out/` directory.
- Replace `file://` accesses with the `app://` protocol.
- Update `package.json` build scripts for platform-specific builds and refined output directory structure.
- Modify main and login window settings for improved compatibility across all platforms.
2025-11-16 19:18:17 -05:00
natreex
de03dedaf0 Add Electron main process with token management and navigation setup
- Implement main and login windows for Electron.
- Integrate `electron-store` for secure token storage and management.
- Setup IPC handlers for authentication.
- Update dependencies to support Electron, including `vite`, `react-router-dom`, and plugins.
2025-11-16 13:55:08 -05:00
natreex
1e6ebba56d Add login page and social login integration
- Implement `LoginPage`, `LoginForm`, and `SocialForm` components.
- Add language toggle and dynamic title support.
- Update `tsconfig.electron.json` for stricter settings.
- Add `electron-store` and associated types for token storage.
- Update `package.json` scripts and dependencies for Electron compatibility.
2025-11-16 13:20:20 -05:00
natreex
c9cf99e166 Update imports and Electron compatibility
- Removed unnecessary React imports.
- Adjusted package.json scripts for Electron integration.
- Updated components to replace Next.js-specific imports with Electron-compatible alternatives.
- Minor tsconfig.json changes for better compatibility.
2025-11-16 11:55:52 -05:00
natreex
8167948881 Add components for Act management and integrate Electron setup 2025-11-16 11:00:04 -05:00
natreex
e192b6dcc2 Add initial package.json file 2025-11-16 10:28:51 -05:00