Skip to content

Repository files navigation

mosaiq

Customizable QR generator that runs entirely in the browser. Encode, preview, and download happen on the client. No sign-up, no API, no database.

mosaiq.fernaandojr.dev

Content

13 kinds. Each one has a Zod schema in packages/domains, a form in the editor, and an encoder in qr-core:

Kind Encodes
url HTTP(S) link
text Plain text
whatsapp wa.me with optional message
wifi WIFI: (SSID, security, password)
pix EMV TLV + CRC-16. A payload Brazilian bank apps actually scan
email mailto:
phone tel:
geo Coordinates
mecard Contact card
sms sms:
event iCal
telegram Telegram username / share
bitcoin bitcoin: URI

PIX is not a URL wrapper. Same rule for Wi-Fi, MeCard, iCal: the payload is the standard.

Style

renderSvg(matrix, style) is a pure function. Matrix plus QrStyle in, SVG string out. No DOM, no canvas, no node:*.

  • Solid color or gradient
  • 11 module shapes
  • 16 outer / 9 inner eye shapes
  • 14 frames (banner, plate, capsule, …)
  • Center logo (PNG, JPEG, SVG). ECC H when a logo is present, modules excavated underneath

The same function feeds the live preview and the file you download (SVG, PNG, or PDF).

Repo

apps/web            Next.js. Landing + editor
packages/domains    Zod schemas. Only source of `Content` and `QrStyle`
packages/qr-core    encode + `renderSvg`. Isomorphic, no `node:*` / `fs` / `canvas`

apps/web never duplicates a schema that already lives in domains. qr-core never imports the filesystem.

Setup

Node ≥ 20, pnpm ≥ 10.

pnpm install
pnpm dev

pnpm test · pnpm lint · pnpm check-types

The round-trip suite in packages/qr-core rasterizes the SVG, runs it through jsqr, and compares against the original payload for every CONTENT_KINDS × covered moduleShape. If that breaks, CI breaks.

License

MIT. Fernando Divino de Moraes Junior © 2026

About

Customizable QR code generator that runs 100% in the browser. Colors, modules, eyes, logo, PIX, and SVG/PNG/PDF download. No sign-up, no server.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages