▪️ID Card Creator — Documentation▪️

This document fully describes ID Card Creator previously provided. It explains features, how to use the page, technical details, storage, security considerations, customization tips, troubleshooting, and examples.

What I built

How to use — step by step

1) Open the page▪️

Load the single HTML file in a modern browser (Chrome, Edge, Firefox). No server required for basic functionality.

2) Fill the form▪️

  • Full Name — enters the name shown on the left of the card (displayed uppercase).
  • Date of Birth — shown as "DOB: yyyy-mm-dd" on the preview.
  • Nickname on Card — displayed below the name.

3) Choose an avatar▪️

  • Click one of the built-in avatars to select it. Or click the Upload tile to pick an image file from your device.
  • Uploaded images are read as Data URLs and added to the avatar picker (client-side only).

4) Pick a background▪️

Click one of the background cards — the preview updates immediately.

5) (Optional) Add ERC20 QR▪️

  • Token contract — contract address (0x...). Required for the QR to be generated.
  • Amount — numeric amount (raw units; decimals are not converted by default).
  • Recipient — optional address to include.
  • Chain — selects a prefix (ethereum, bsc, polygon) used in the URI. The page builds a transfer-like URI such as:
    ethereum:0xCONTRACT/transfer?address=0xRECIPIENT&uint256=AMOUNT

6) Scan & Generate▪️

Click Scan & Generate to run the scanning animation. The page:

  • Generates a UUID with Web Crypto (or fallback) for the card.
  • Animates a scan line across the card to simulate reading the form data.
  • Shows a loading overlay for a randomized 5–8 second interval (progress bar animation) to simulate processing.
  • Renders the Code128 barcode (UUID) under the exosite() label without a background, scaled to fit the width assigned on the card.
  • Generates/render the ERC20 QR (if token contract was supplied) using the qrcode library.

7) Save / Download▪️

  • Download PNG (no sign-in) — uses html2canvas to capture the card preview and starts a download.
  • Save / Download — requires Google sign-in. Saves a PNG snapshot and metadata into browser localStorage under a key tied to signed-in user's email. Saved cards show up in the "Saved Cards" list and can be reloaded or downloaded.

Technical explanation (how it works)