# devmakibul/upi architecture

> Architecture diagram of the GitHub repository devmakibul/upi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devmakibul/upi
- Repository: https://github.com/devmakibul/upi

## Overview

This is a browser-based UPI QR-code creator with a promotional landing page and supporting informational pages. The principal workflow appears to be entering or scanning payment details, configuring a QR code, and producing an image for use or download. The creator script is heavily obfuscated and only partially excerpted, so its detailed processing and output flow cannot be verified; unverified workflow links are dashed. The service worker’s cache behavior and the landing page’s tutorial-video handling are visible in the supplied excerpts.

Main entry points: [`create/script.js`](https://github.com/devmakibul/upi/blob/main/create/script.js) (QR Creator UI), [`sw.js`](https://github.com/devmakibul/upi/blob/main/sw.js) (Service Worker), [`script.js`](https://github.com/devmakibul/upi/blob/main/script.js) (Landing Interactions), [`pages/pages.js`](https://github.com/devmakibul/upi/blob/main/pages/pages.js) (Page Behavior)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creator["QR Creator"]
  node_creator_app["QR Creator UI<br/>[script.js]"]
  node_payment_setup["Payment Setup<br/>[script.js]"]
  node_qr_customization["QR Customization<br/>[script.js]"]
  node_qr_output["QR Output<br/>[script.js]"]
  node_qr_scanner["QR Scanner<br/>[script.js]"]
  node_settings_store[("Browser Settings<br/>[script.js]")]
  node_creator_styles["Creator Styles<br/>[style.css]"]
  node_theme_data["Theme Assets"]
end

subgraph group_site["Public Website"]
  node_landing["Landing Interactions<br/>[script.js]"]
  node_tutorial["Tutorial Video<br/>[tutorial.mp4]"]
  node_info_pages["Information Pages"]
  node_page_scripts["Page Behavior<br/>[pages.js]"]
  node_site_styles["Shared Site Styles<br/>[style.css]"]
end

subgraph group_offline["Offline Support"]
  node_service_worker["Service Worker<br/>[sw.js]"]
  node_browser_cache[("Browser Cache")]
end

node_visitor(("Visitor"))
node_qr_library["QR Styling Library"]
node_scan_library["QR Scanning Library"]
node_image_library["Image Export Library"]

node_visitor -.->|"opens"| node_creator_app
node_creator_app -.->|"configures"| node_payment_setup
node_creator_app -.->|"configures"| node_qr_customization
node_creator_app -.->|"offers scanning"| node_qr_scanner
node_creator_app -.->|"generates"| node_qr_output
node_creator_app -->|"reads and writes"| node_settings_store
node_visitor -.->|"views"| node_landing
node_landing -->|"loads video"| node_tutorial
node_page_scripts -->|"sets year"| node_info_pages
node_service_worker -->|"caches assets"| node_browser_cache
node_service_worker -->|"caches files"| node_creator_app
node_service_worker -->|"caches assets"| node_theme_data
node_creator_app -.->|"uses"| node_qr_library
node_creator_app -.->|"uses"| node_scan_library
node_creator_app -.->|"uses"| node_image_library

click node_creator_app "https://github.com/devmakibul/upi/blob/main/create/script.js"
click node_payment_setup "https://github.com/devmakibul/upi/blob/main/create/script.js"
click node_qr_customization "https://github.com/devmakibul/upi/blob/main/create/script.js"
click node_qr_output "https://github.com/devmakibul/upi/blob/main/create/script.js"
click node_qr_scanner "https://github.com/devmakibul/upi/blob/main/create/script.js"
click node_settings_store "https://github.com/devmakibul/upi/blob/main/create/script.js"
click node_landing "https://github.com/devmakibul/upi/blob/main/script.js"
click node_tutorial "https://github.com/devmakibul/upi/blob/main/assets/tutorial.mp4"
click node_info_pages "https://github.com/devmakibul/upi/tree/main/pages"
click node_page_scripts "https://github.com/devmakibul/upi/blob/main/pages/pages.js"
click node_site_styles "https://github.com/devmakibul/upi/blob/main/assets/style.css"
click node_creator_styles "https://github.com/devmakibul/upi/blob/main/create/style.css"
click node_theme_data "https://github.com/devmakibul/upi/tree/main/assets/themes"
click node_service_worker "https://github.com/devmakibul/upi/blob/main/sw.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_creator_app,node_payment_setup,node_qr_customization,node_qr_output,node_qr_scanner,node_settings_store,node_creator_styles,node_theme_data toneBlue
class node_landing,node_tutorial,node_info_pages,node_page_scripts,node_site_styles toneAmber
class node_service_worker,node_browser_cache toneMint
class node_visitor,node_qr_library,node_scan_library,node_image_library toneIndigo
```

## Components

### QR Creator

- [QR Creator UI](https://github.com/devmakibul/upi/blob/main/create/script.js): `create/script.js`
- [Payment Setup](https://github.com/devmakibul/upi/blob/main/create/script.js): `create/script.js`
- [QR Customization](https://github.com/devmakibul/upi/blob/main/create/script.js): `create/script.js`
- [QR Output](https://github.com/devmakibul/upi/blob/main/create/script.js): `create/script.js`
- [QR Scanner](https://github.com/devmakibul/upi/blob/main/create/script.js): `create/script.js`
- [Browser Settings](https://github.com/devmakibul/upi/blob/main/create/script.js): `create/script.js`
- [Creator Styles](https://github.com/devmakibul/upi/blob/main/create/style.css): `create/style.css`
- [Theme Assets](https://github.com/devmakibul/upi/tree/main/assets/themes): `assets/themes`

### Public Website

- [Landing Interactions](https://github.com/devmakibul/upi/blob/main/script.js): `script.js`
- [Tutorial Video](https://github.com/devmakibul/upi/blob/main/assets/tutorial.mp4): `assets/tutorial.mp4`
- [Information Pages](https://github.com/devmakibul/upi/tree/main/pages): `pages`
- [Page Behavior](https://github.com/devmakibul/upi/blob/main/pages/pages.js): `pages/pages.js`
- [Shared Site Styles](https://github.com/devmakibul/upi/blob/main/assets/style.css): `assets/style.css`

### Offline Support

- [Service Worker](https://github.com/devmakibul/upi/blob/main/sw.js): `sw.js`
- **Browser Cache**

### Other components

- **Visitor**
- **QR Styling Library**
- **QR Scanning Library**
- **Image Export Library**

## Connections

- Visitor → QR Creator UI: opens
- QR Creator UI → Payment Setup: configures (evidence: `create/script.js`)
- QR Creator UI → QR Customization: configures (evidence: `create/script.js`)
- QR Creator UI → QR Scanner: offers scanning (evidence: `create/script.js`)
- QR Creator UI → QR Output: generates (evidence: `create/script.js`)
- QR Creator UI → Browser Settings: reads and writes (evidence: `create/script.js`)
- Visitor → Landing Interactions: views
- Landing Interactions → Tutorial Video: loads video (evidence: `script.js`)
- Page Behavior → Information Pages: sets year (evidence: `pages/pages.js`)
- Service Worker → Browser Cache: caches assets (evidence: `sw.js`)
- Service Worker → QR Creator UI: caches files (evidence: `sw.js`)
- Service Worker → Theme Assets: caches assets (evidence: `sw.js`)
- QR Creator UI → QR Styling Library: uses
- QR Creator UI → QR Scanning Library: uses
- QR Creator UI → Image Export Library: uses
