- Remove packages/shared package entirely
- Update all apps and packages to use @mediago/shared-common and @mediago/shared-node instead
- Simplify router implementation by removing dynamic electron imports
- Update build configurations and dependency references
- Clean up pnpm-lock.yaml to reflect new package structure
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Consolidate download-related methods to reduce duplication:
- Merge downloadNow, downloadItemsNow into addDownloadItems with startDownload flag
- Merge editDownloadNow into editDownloadItem with startDownload flag
- Remove redundant addDownloadItem method in favor of addDownloadItems
- Update both Electron and Web backends with unified parameter structure
- Maintain backward compatibility while simplifying the API surface
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extract shared package into three separate packages for better separation of concerns:
- @mediago/shared-common: Common types, constants, utilities, i18n
- @mediago/shared-node: Node.js specific services, DAOs, entities
- @mediago/shared-browser: Browser-specific code
Benefits:
- Improved dependency management and package isolation
- Eliminated circular dependencies between packages
- Better maintainability with domain-separated codebases
- Enhanced type safety across the monorepo
Changes:
- Created new packages with proper TypeScript configurations
- Migrated all code from packages/shared/src/{common,node,browser}
- Updated 40+ import statements across the entire codebase
- Resolved package dependency conflicts and circular references
- All backend packages pass TypeScript compilation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extract platform-agnostic business logic from backend-electron and backend-web controllers
into reusable services in the shared package, enabling code reuse across platforms:
- ConversionService: handles conversion record management operations
- DownloadManagementService: manages download lifecycle, CRUD operations, and metadata
- FavoriteManagementService: handles bookmark/favorites management
Benefits:
- Eliminates code duplication between Electron and Web backends
- Centralizes business logic maintenance in shared package
- Preserves platform-specific UI interactions (dialogs, notifications)
- Maintains dependency injection architecture consistency
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename IpcHandlerService to ElectronRouter for clarity
- Introduce shared MEDIAGO_METHOD and MEDIAGO_EVENT constants
- Replace separate @get/@post decorators with unified @handle decorator
- Standardize routing metadata handling across platforms
- Add MediaGoRouter interface for consistent router contracts
- Remove unused @on decorator from Electron helpers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move adapters from src/adapters/ to src/hooks/adapters/
- Add ownKeys and getOwnPropertyDescriptor traps to electronAdapter Proxy
- Enable Object.keys() iteration over electronAdapter methods
- Fix useAPI hook to properly enumerate API methods in Electron environment
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Upgrade Inversify from v6 to v7 and implement modern binding decorators pattern:
- Replace manual container bindings with @provide decorators
- Update all controllers, services, and vendors to use decorator-based DI
- Simplify inversify.config.ts by removing explicit bindings
- Add @inversifyjs/binding-decorators dependency for cleaner configuration
- Maintain singleton pattern and existing functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extract preload.ts from apps/backend-electron to packages/electron-preload for better modularity and reusability. This includes:
- Create new @mediago/electron-preload package with proper build configuration
- Update backend-electron to use the new preload package dependency
- Maintain all existing functionality while improving architecture
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace `apis/` folder with `adapters/` for clearer architecture
- Integrate IPC logic into corresponding adapter files:
- `electronIpcAdapter` in `electron.ts`
- `webIpcAdapter` in `web.ts`
- Add new `useAPI` Hook with cleaner separation of concerns
- Maintain backward compatibility with `useElectron` alias
- Improve code organization and maintainability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create base configurations in packages/config for different app types
- Standardize all tsconfig.json files to extend from shared configs
- Fix module resolution inconsistencies (NodeNext -> bundler mode)
- Remove duplicate configuration options across packages
- Improve code quality by fixing linting issues in shared services
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add Docker configuration to resolve node-pty native module conflicts
- Create docker/Dockerfile for production builds
- Create docker/Dockerfile.dev for development with hot reload
- Add docker-compose.yml for easy development setup
- Include system dependencies (python3, make, g++, libicu-dev) for native modules
- Update package.json with dev:docker and build:docker commands
- Move .dockerignore to root directory for proper build context
- Remove electron rebuild scripts as Docker handles native module compilation
- Enable mixed development: webapi in container, electron on host
Usage:
- pnpm dev:docker # Start webapi in Docker container
- pnpm -F electron dev # Start electron locally in parallel
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename apps with more descriptive names:
• main → electron (Electron main process)
• renderer → frontend (React UI for both Electron and web)
• backend → webapi (Koa.js API server)
- Remove tools/scripts custom build logic:
• Replace custom zx scripts with native Turbo commands
• Update dev command to use Turbo filters for plugin/mobile builds
• Migrate web-release build to use Turbo pipeline
• Remove tools/scripts directory entirely
- Update comprehensive README documentation for each app:
• apps/electron/README.md - Desktop application lifecycle and system integration
• apps/frontend/README.md - React UI shared between Electron and web
• apps/webapi/README.md - Standalone API server with Docker support
- Update all configuration references:
• package.json: Update all Turbo filter commands
• biome.json: Remove tools/scripts path references
• pnpm-workspace.yaml: Remove tools/* workspace
• CLAUDE.md: Update architecture documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Install Turborepo for build orchestration and caching
- Reorganize directory structure following monorepo best practices:
- Move packages/main,renderer,backend,mobile,plugin → apps/
- Keep packages/shared for shared utilities and types
- Create packages/config for shared configurations
- Move scripts/ → tools/scripts/
- Update pnpm-workspace.yaml for new structure (apps/*, packages/*, tools/*)
- Configure turbo.json with build pipelines and task dependencies
- Update all package.json scripts to use Turbo commands
- Update biome.json paths for new directory structure
- Add packageManager field to root package.json
- Update CLAUDE.md documentation with new architecture
Benefits:
- Faster builds with intelligent caching and incremental builds
- Parallel task execution across packages
- Clear separation between apps and shared packages
- Improved developer experience with unified build system
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>