feat: major system upgrade v2.0 with desktop app and advanced features - #5
Open
xuan2261 wants to merge 63 commits into
Open
feat: major system upgrade v2.0 with desktop app and advanced features#5xuan2261 wants to merge 63 commits into
xuan2261 wants to merge 63 commits into
Conversation
- Create desktop/ directory with Electron shell setup - Add main process with backend manager, config, auto-updater - Add CI/CD workflow for Win/Mac/Linux builds - Update frontend with dynamic port discovery for Electron - Add loading screens and update notifications - Update docs with desktop architecture
- Add generate-icons.py script for programmatic icon generation - Generate icon.ico (Windows), icon.icns (macOS), icon.png (Linux) - Include all standard sizes: 16x16 to 1024x1024 - Modern banana-themed design with slide elements
- Regenerate icon.ico with multi-resolution (256,128,64,48,32,16) - Add homepage field to desktop/package.json - Add author email for Linux .deb maintainer requirement
Use --publish never flag to prevent electron-builder from publishing directly. Let the workflow release job handle GitHub releases instead.
electron-builder automatically excludes devDependencies, so manual exclusion was causing hoisted production deps like graceful-fs to be missing from the asar archive.
- Set Vite base to './' for production (relative asset paths) - Use HashRouter for Electron file:// protocol compatibility - Add diagnostic logging for renderer loading issues Fixes: assets not loading due to absolute paths in index.html
- Add OutputLanguage type with 10 supported languages (en, vi, zh, ja, ko, th, id, fr, de, es) - Add language dropdown in PresentationSettings UI - Update API schema to accept outputLanguage parameter - Inject language instruction block into prompt for non-English output - Preserve technical terms/proper nouns in translation
- Add export system (JSON/MD/TXT) with client-side generation - Add Prompt Preview component with raw/formatted toggle - Add Template Library with 20+ templates across 4 categories - Add Vietnamese i18n with full translation - Set up Vitest testing infrastructure with 74 tests (97% core coverage) - Add GitHub Actions CI workflow - Configure Prettier + Husky + lint-staged for code quality - Fix server empty catch blocks with proper error logging
- Switch CI from bun to npm (fixes frozen-lockfile error) - Add auto-release workflow that creates tags on version bump - Electron build will auto-trigger on new tags
- Fix desktop version sync in auto-release workflow - Sync root and desktop package.json versions
- Fix auto-release to trigger Electron Build via workflow_dispatch - Version sync and auto-tag now fully automated
Replace useLLMSettings hook with Zustand store + persist middleware. Settings now update immediately without app restart.
- Update version references from 1.0.6 to 1.2.2 - Add Vietnamese i18n and Desktop App (Electron) sections - Update LOC counts (11K to 13K) and testing infrastructure - Refresh roadmap and changelog
…ionality - Remove PromptPreview component and its usage from Index.tsx - Remove showPromptPreview state from sessionStore - Add export dropdown (Markdown, Text, JSON) to PromptOutput - Add i18n keys for export button in en/vi/zh locales - Simplify PromptOutput by removing unused ref-based slide tracking
- Remove redundant PromptPreview component - Add export dropdown (MD, TXT, JSON)
…ssing Phase 1 Quick Wins (v1.3.x) implementation: Import Features: - Add PDF/DOCX file import with server-side parsing (pdf-parse, mammoth) - Magic number validation for file type security - Client-side file size validation (10MB limit) Export Features: - Add PPTX export with pptxgenjs (title slide + content slides) - Add styled PDF export with @react-pdf/renderer - Add export loading states and error logging - Extract sanitizeFilename to shared utility Batch Processing: - Add BatchProcessor class with queue management - Add useBatchGeneration hook with config change detection - Add batch UI components (BatchInput, BatchProgress, BatchPanel) - Support cancel/abort for batch operations Other: - Add i18n translations for batch/export features (EN/VI) - Integrate batch mode toggle in Index page
Phase 2: Core Integrations implementation: - Prompt Optimizer: Self-refine pattern via LLM (POST /api/optimize-prompt) - PDF Preview: Modal for previewing slides before PDF download - Design Tools Export: Canva and Figma JSON export formats New files: - server/src/services/promptOptimizer.ts - server/src/routes/optimize.ts - src/hooks/usePromptOptimizer.ts - src/components/optimizer/OptimizationDiff.tsx - src/components/preview/PdfPreview.tsx - src/lib/exporters/canva-exporter.ts - src/lib/exporters/figma-exporter.ts
- Add Google Gemini SDK for AI-powered slide image generation - Create geminiImageClient.ts with batch generation support - Add /api/gemini/* routes with rate limiting (10 req/min) - Implement server-side API key priority for security - Add GeminiImagePreview modal with carousel and download - Create useGeminiImage hook for React integration - Extend SettingsDialog with Gemini configuration section - Add translations for EN/VI/ZH locales - Bump version to 1.5.0
- Add 4 quiz template types (Multiple Choice, True/False, Fill-in-Blank, Matching) - Add Brand Kit with localStorage persistence (colors, fonts, logo) - Add Course Builder mode with lesson structure UI - Add i18n support for all new features (EN, VI, ZH) - Integrate Brand Kit with prompt generation - Add error feedback for logo upload validation - Refactor TemplateSelector to use event handlers instead of useEffect
- brandKitStore: add sanitizeText, sanitizeColor, sanitizeLogoUrl functions - courseBuilderStore: add sanitizeText, max lessons limit, objectives sanitization - BrandKitEditor: add FileReader onerror handler - Update plan and docs for Phase 4 completion - Bump version to 2.0.0 Security: XSS prevention, input validation, data URL validation Tests: 73/73 passed Code Review: 9.5/10
- All 73 tests passed with 96.42% coverage - Phase 4 features verified (Quiz Templates, Brand Kit, Course Builder) - Security hardening and input sanitization complete - Documentation updated
- Use Bun.serve() explicitly to get actual bound port (fixes PORT=0 bug) - Increase backend startup timeout from 10s to 30s - Add detailed error messages for missing binary/bun runtime - Bump version to v2.0.2
- Add Edit button to SlideCard with textarea for prompt editing - Add Save/Cancel buttons with proper state management - Update PromptOutput to pass onSlidesUpdate callback - Add updateSlides function to useStreamingGeneration hook - Persist edited prompts to session store - Add i18n translations (EN/VI/ZH) for edit, save buttons - Bump version to v2.0.5
…ding - Add retry mechanism for server port binding (tries 5 ports sequentially) - Move PORT output after successful bind to prevent race condition - Update auto-updater config to use fork (xuan2261) - Bump version to 2.0.6
- Update GitHub release URL to xuan2261 fork - Update Docker image registry URLs - Add changelog entries for v2.0.5 and v2.0.6 - Update current version to 2.0.6
…orage - Replace hardcoded localhost:3001 with dynamic port via getApiBase() - Add settings persistence to Electron file storage (config.json) - Load settings from Electron on app startup - Bump version to 2.0.7
- Add Gemini API settings persistence to Electron storage - Disable auto-updater until proper release workflow is set up - Bump version to 2.0.8
- Bump desktop version from 2.0.8 to 2.0.9 - Update documentation and environment examples - Fix backend port handling and settings persistence
Sync root package.json version with desktop/package.json to trigger auto-release workflow
- Bun Bug #10151: compiled binary runs Bun.serve() twice when using export default - First call binds port successfully, second call fails with EADDRINUSE - Removing export default prevents the double execution in production builds
- Fix Bun Bug #10151: remove export default to prevent double server startup - Fixes EADDRINUSE error in production builds
- Add useEffect to reset images when prompt.plainText changes - Fixes button showing "Image Preview" instead of "Generate Images" after new prompt - Bump version to 2.0.11
- Add toggle on/off for Visual Style selector (similar to Color Palette) - When toggled off, no visual style instruction is included in prompt - Increase max slide count from 20 to 200 - Add 'auto' option to SlideStyle type - Update translations (EN, VI, ZH) for new UI elements
- Add slide regeneration API endpoint and frontend hook - Add drag-and-drop slide reordering with dnd-kit - Add auto-save functionality (30s interval) - Add error boundary components - Update documentation for new features - Bump version to 2.0.13
- Frontend now sends selected model to test-connection endpoint - Backend schema accepts model parameter - Service uses config.model instead of hardcoded gemini-1.5-flash
- Add generateSingleImage() and clearImage() to useGeminiImage hook - Add Generate Image button on each SlideCard (changes to Regenerate when image exists) - Add 32px thumbnail preview in SlideCard header when image generated - Add checkbox selection for batch image generation - Add Select All/Deselect All toggle and Generate Selected button - Add AbortController for fetch cleanup on unmount - Memoize image URLs to prevent recreation on every render - Add translation keys for new UI elements (en/vi) Closes: per-slide-image-generation plan
…ation - Add AbortError check in generateImages catch block - Add AbortError check in generateSingleImage catch block - Silent ignore when user clicks multiple generate buttons quickly - Prevents "signal is aborted without reason" error toast Fixes: race condition when clicking generate buttons in quick succession
- README.md: update version, add new features and changelog entries - project-overview-pdr.md: add FR-27/FR-28 for Gemini image gen - codebase-summary.md: add useGeminiImage hook, gemini routes/services - code-standards.md: update version to 2.0.16 - system-architecture.md: add Gemini API endpoints section - development-roadmap.md: update Phase 6 progress to 60% - project-changelog.md: add v2.0.15 and v2.0.16 entries Features documented: - Per-slide image generation with Generate Image button - Batch selection with checkboxes + Generate Selected - 32px thumbnail preview in SlideCard header - AbortController for fetch cleanup
- Move 5 completed plans to plans/archive/ - Add consolidated journal entry for archived plans - Keep 3 pending plans active Archived: - 260112-2023-language-output-feature - 260113-0527-system-upgrade-v2 - 260113-0530-system-upgrade-v2 - 260113-1050-remove-preview-add-export - 260113-1343-feature-upgrade-roadmap
- Add /api/images/save and /api/images/:sessionId/:filename endpoints
- Save images to data/images/{sessionId}/ directory
- Add generatedImageUrl field to ParsedSlide type
- Auto-save images to server after Gemini generation
- Load persisted images from URLs on session restore
- Clean up images when session deleted
- Add filename and session ID validation for security
Closes image persistence issue where generated images were lost on restart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major system upgrade bringing Slides Prompter to v2.0 with comprehensive new features:
Key Changes
Test Plan