How heliomarpm/udemy-downloader-gui works
Project Type and Purpose
• This is a cross-platform desktop application built with Electron and Node.js, serving as a GUI tool to download your purchased Udemy courses.
• It combines a Chromium-based renderer (the UI) with a Node.js main process to handle file I/O, HTTP requests, and packaging.
File Structure Analysis
• Top-level files:
– main.js: Electron’s main process entry point—initializes windows, IPC, auto-updater.
– preload.js: Exposes safe, limited Node.js APIs to the renderer via contextBridge.
– environments.js & .env.example: Configuration loader for environment variables (Udemy credentials, timeouts, directories).
• app/: Contains the renderer application:
– app/index.html, app/assets, app/css: UI layout and styling (Semantic UI).
– app/locale: JSON files for internationalization.
– app/renderer.js: Renderer startup script, initializes UI event listeners and IPC calls to the main process.
• app/core/services/: Business-logic modules that perform HTTP calls to Udemy’s API (udemy.service.js) and handle M3U8 stream parsing/downloads (m3u8.service.js).
• app/helpers/: Utility modules (auto_authenticator.js, settings.js, ui.js, utils.js) for session management, UI helpers, local settings, and generic functions.
• sync-locales.js: Script to synchronize locale files.
• Package & CI: package.json, package-lock.json, GitHub workflows for CodeQL, publishing with electron-builder.
README Insights
• Confirms Electron + Node.js stack, uses semantic-ui for the front end.
• Describes usage (npm start, npm run dev), packaging (npm run deploy).
• Mentions auto-updates via electron-builder and GitHub releases.