Purpose: To allow users to generate QR codes for specified URLs.
-
Main Process (
main.js
):- Sets up and controls the primary Electron window.
- Uses a BrowserWindow instance to render
index.html
. - Disables
nodeIntegration
for security and may utilize apreload
script for secure communication between the main and renderer processes.
-
Renderer (
index.html
&renderer.js
):index.html
:- Contains input for URL.
- Dropdown to select the QR code size.
- Canvas to display the generated QR code.
- Button to trigger the QR code generation.
renderer.js
:- Uses the
qrcode
npm package to generate QR codes. - Retrieves the URL and desired size from the UI elements.
- Renders the QR code to the canvas with the specified size.
- Uses the
- Clone or download the project from GitHub.
- Navigate to the project folder in the terminal.
- Run npm install to install all required dependencies.
- Launch the application with npm start.
- User enters a URL into the provided input field.
- User selects the desired QR code size from a dropdown menu.
- Upon clicking the "Generate QR" button, the application generates a QR code representing the entered URL with the specified size.
- The generated QR code is displayed on a canvas element within the app.
- electron: Framework for creating native applications with web technologies.
- qrcode: npm package to generate QR codes.
The app is a simple Electron-based desktop application that offers a user-friendly interface for generating QR codes of varying sizes for user-provided URLs.