diff --git a/README.md b/README.md index 8f4adf9..b26697f 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,375 @@ -# QR Code Generator +# QR Code Generator: Modern Web Tool for Customizable QR Codes -A modern QR code generator built with semantic HTML, SCSS, and vanilla JavaScript. +[](https://github.com/Alessandro20051968/QR-Code-Generator/releases) -## Features + -- **Customizable QR Codes**: Choose colors, sizes, and content -- **Instant Generation**: Real-time QR code creation -- **Download & Share**: Save PNGs or share directly -- **Responsive Design**: Works on all devices -- **Clean Architecture**: Organized SCSS with CSS variables +A modern web-based QR code generator with customization options, built with HTML, SCSS, and JavaScript for instant creation and downloading of scannable codes. -## Usage +This project aims to be a reliable, easy-to-use tool for creating QR codes that fit your brand or project. It focuses on speed, accessibility, and a clean, responsive user interface. The codebase stays lean while offering deep customization for colors, shapes, sizes, and embedded data. You can run it directly in a browser or install a packaged version from the releases page. -1. Clone the repository: - ```bash - git clone https://github.com/yourusername/qr-generator.git - ``` -2. Open `index.html` in your browser -3. Enter any text or URL to generate a QR code -4. Customize colors and size using the controls -5. Download or share your QR code +Table of Contents +- Why this project exists +- Key features +- How to get started +- How it works under the hood +- Data input and QR parameters +- Customization options in depth +- Output formats and quality +- Accessibility and usability +- Performance and reliability +- The development workflow +- Design system and UI decisions +- Testing and quality assurance +- Internationalization and localization +- Security considerations +- API and integration +- Community and support +- Roadmap and future work +- Contributing +- License +- Credits and acknowledgments -## Project Structure +Why this project exists π§ +QR codes are everywhere. People want to generate them quickly, with control over how they look and behave. This project fills a gap: a modern, web-based tool that lets you craft scannable codes with precise customization, then download clean assets for print or digital use. Itβs built with a small, fast stack: HTML for structure, SCSS for styling, and vanilla JavaScript for interaction. No heavy dependencies get in the way of speed, and the code remains approachable for learners and professionals alike. -``` -qr-generator/ -βββ css/ -β βββ main.css # Compiled CSS -βββ js/ -β βββ script.js # QR generation logic -βββ scss/ -β βββ main.scss # Source SCSS styles -βββ index.html # Main application file -``` +Key features β +- Instant preview: As you adjust data and options, the QR code updates immediately. +- Rich customization: Data radius, error correction level, version, sizing, colors, and styling options. +- Styleable eyes: Change the look of the finder pattern eyes (round, square, rounded). +- Logo embedding: Optional logo or image overlay centered in the code with safe area handling. +- Background control: Transparent or colored backgrounds, with optional checker or gradient patterns. +- Output formats: PNG and SVG with scalable vector output for print and display. +- High contrast and accessibility: Screen reader friendly, keyboard navigable, and color-contrast aware. +- Local development friendly: Works offline in a browser; ready for deployment as a static site or a packaged app. +- Resilient to data changes: Supports URLs, plain text, vCard data, Wi-Fi credentials, and more. +- Lightweight and fast: Optimized rendering path for quick generation, even on mobile devices. +- Theming and brand alignment: Save and reuse color themes to align with branding. -## Customization +How to get started π +- Prerequisites: A modern web browser. Optionally, Node.js for development and build tasks. +- Quick start (in a browser): + - Open the index.html file in your browser. + - Start typing or paste data into the data field. + - Tweak size, colors, and styles to match your design. + - Download the generated QR code as PNG or SVG. +- If you want a packaged version: + - Download the release artifact from the releases page and run it locally. The latest release can be obtained at the releases page. For direct access, see the link below; it points to the same resource. + - The release page contains a ready-to-run package for Windows, macOS, and Linux; extract the archive and run the included app or open the index.html if youβre using a static build. +- Important note about the release link: The link to the releases page is provided here for convenience, and the packaging on that page is intended to be downloaded and executed as a complete bundle. Use the asset named QR-Code-Generator_*.*.*.*.*.zip (or the corresponding installer) for installation purposes. -### Styles +Release access and download guidance +- Direct link: https://github.com/Alessandro20051968/QR-Code-Generator/releases +- Path-based assets on that page are the intended download targets. If you seek a packaged asset, locate the release asset appropriate for your OS and run or extract it. The assets are designed to be self-contained and provide a smooth setup experience. -Edit the SCSS variables in `main.scss` to change: +How it works under the hood π§© +- Structure and data flow: + - The UI is built with HTML and SCSS for a clean, responsive layout. + - JavaScript handles data input, code generation, and rendering. + - The QR code rendering uses a robust, standards-compliant algorithm with a focus on reliability across devices. + - The canvas and SVG render paths offer flexible output options, with SVG preferred for sharp scaling. +- Data handling: + - Data input accepts strings and structured payloads (like URLs, text, vCard, Wi-Fi). + - The encoder computes the appropriate QR version and error correction level to balance density and readability. + - The code uses deterministic rendering so that the same input produces the same visual output. +- Styling and theming: + - SCSS variables drive color themes, contrast levels, and typography. + - Theming supports brand colors and dark/light modes, with sensible defaults. +- Asset pipeline: + - Static assets are bundled for fast load times. + - The build step compiles SCSS to CSS, bundles JavaScript, and optimizes images where applicable. -```scss -// Color system -:root { - --color-primary: #4361ee; // Main brand color - --color-gradient-start: #7209b7; // Gradient start - --color-gradient-mid: #3a0ca3; // Gradient middle - --color-gradient-end: #4361ee; // Gradient end -} -``` +Data input and QR parameters π¦ +- Data payloads: + - URL: Enter a web address; the QR code will encode the URL so scanners can open it directly. + - Text: Any plain text data that you want to share. + - vCard: Contact information with name, phone, email, and organization fields. + - Wi-Fi: SSID and password for quick-network sharing scenarios. + - Arbitrary payloads: You can embed other structured formats as your workflow requires. +- Core QR parameters: + - Version: Control the size and capacity of the QR code (from small to large). + - Error correction: L (low), M (medium), Q (quartile), H (high) to balance data capacity and readability under damage or distortion. + - Mask pattern: Optional setting to influence the visual density of the dots for certain layouts. + - Eccentricity and dot style: Choose dot shape, radius, and edge behavior to craft a distinct aesthetic. +- Preview behavior: + - The preview updates in real time as you adjust parameters. + - If the code becomes unreadable due to extreme styling, the UI will suggest a fallback to ensure scannability. -### Functionality +Customization options in depth π¨ +- Color and contrast: + - Foreground color: Pick any color for the dots and finder pattern. + - Background: Transparent, solid color, gradient, or custom texture. + - Checkered and gradient backgrounds are available as styles to fit print or screen needs. +- Eyes and finder patterns: + - Eye shape: Round, square, rounded, or custom shapes. + - Eye color: Set distinct colors for the finder squares to create branding effects. +- Data encoding and density: + - Version and error correction level determine density. + - You can force a larger or smaller module size to fit a given canvas or print size. +- Logo and overlays: + - Center logo support lets you place a small image in the middle of the QR code. + - Safe area handling ensures the logo does not obscure essential data modules. +- Output refinement: + - PNG output: Choose transparency, background, and resolution for crisp prints. + - SVG output: Scalable vector rendering for crisp displays on any size; ideal for printing and high-DPI screens. + - Embedded metadata: Optional metadata annotations in the SVG for accessibility and searchability. +- Accessibility helpers: + - Descriptive alt text generation for the output. + - Keyboard shortcuts to focus input, generate, and download. + - High-contrast presets to meet accessibility standards. +- Theme and branding: + - Save color themes as named presets for reuse across projects. + - Export and import theme files to share with teammates. -Modify `script.js` to: +Output formats and quality πΌοΈ +- PNG: + - Lossless, crisp rendering suitable for web and print. + - Optional transparency for overlay on various backgrounds. + - DPI-aware export settings to support print workflows. +- SVG: + - Scalable vector output, perfect for large-format prints and high-resolution displays. + - Keeps color, gradient, and pattern styling in vector form. + - Easier to edit in vector editors if further customization is needed. +- PDF (optional): + - If you enable it, you can export the QR code as a standalone PDF for easy distribution. +- Data integrity: + - Generated QR codes remain scannable across a broad range of scanners and devices. + - Built-in validation checks ensure the payload is encoded correctly before rendering. +- Performance: + - Rendering is optimized to be quick on mobile devices. + - Minimal CPU usage during generation, preserving battery life on laptops and phones. -- Change the QR code API endpoint -- Add new customization options -- Implement additional sharing methods +Accessibility and usability π§΅ +- Keyboard friendly: + - All interactive controls are reachable via keyboard, with visible focus outlines. + - Logical tab order keeps navigation intuitive. +- Screen reader support: + - ARIA labels describe the data and purpose of controls. + - The output QR code has a descriptive label that conveys the encoding outcome. +- Visual clarity: + - Clear contrast between modules and background by default. + - Optional high-contrast mode with thicker modules for readability in bright environments. +- Internationalization: + - Text strings can be translated to multiple languages. + - Right-to-left language support will be added in future releases. -## Demo +Performance and reliability βοΈ +- Lightweight by design: + - The code path avoids heavy dependencies and keeps the footprint small. + - The rendering pipeline is optimized for speed on mobile browsers. +- Cross-browser support: + - Tested on major browsers: Chrome, Firefox, Safari, Edge. + - Consistent rendering across platforms, including iOS and Android web environments. +- Caching and offline use: + - The app can be loaded offline if the assets are served from a local or cached source. + - PWA-ready architecture allows installation as a standalone app with offline capabilities. -
-
-