# denzelvw-xyz/business-card-maker architecture

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

- Interactive diagram: https://gitdiagram.com/denzelvw-xyz/business-card-maker
- Repository: https://github.com/denzelvw-xyz/business-card-maker

## Overview

Business Card Maker is a small interactive Python application: the user supplies QR data, a title, a logo path, and up to four key=value details; the program generates a QR image, composes the card, and saves Result.png. Its principal stages are input and detail parsing, QR generation, visual composition (including logo handling and text rendering), and file output. Background removal is an optional rembg integration. The graph reflects the single inspected implementation file; no separate storage or service layer is present.

Main entry points: [`main.py`](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py) (Card composition), [`fonts`](https://github.com/denzelvw-xyz/business-card-maker/tree/main/fonts) (Bundled font)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["User Input"]
  node_prompts["Interactive prompts<br/>[main.py]"]
  node_details["Detail parsing<br/>[main.py]"]
end

subgraph group_creation["Card Creation"]
  node_qr["QR generation<br/>[main.py]"]
  node_qr_lib["qrcode library"]
  node_canvas["Card composition<br/>[main.py]"]
  node_text["Text rendering<br/>[main.py]"]
  node_font["Bundled font"]
  node_logo["Logo loading<br/>[main.py]"]
  node_pillow["Pillow library"]
  node_bg_remove["Background removal<br/>[main.py]"]
  node_rembg["rembg library"]
end

subgraph group_output["Output"]
  node_save["Save card image<br/>[main.py]"]
  node_result["Result.png<br/>[main.py]"]
end

node_user(("User"))

node_user -->|"provides inputs"| node_prompts
node_prompts -->|"parses details"| node_details
node_prompts -->|"passes QR data"| node_qr
node_qr -->|"generates QR"| node_qr_lib
node_prompts -->|"provides logo path"| node_logo
node_prompts -->|"provides title"| node_canvas
node_details -->|"provides details"| node_canvas
node_qr -->|"pastes QR image"| node_canvas
node_canvas -->|"creates and edits image"| node_pillow
node_text -->|"draws text"| node_pillow
node_canvas -->|"renders title and details"| node_text
node_text -->|"loads font"| node_font
node_logo -->|"opens and resizes"| node_pillow
node_logo -->|"optionally removes background"| node_bg_remove
node_bg_remove -->|"removes background"| node_rembg
node_logo -->|"pastes logo"| node_canvas
node_canvas -->|"saves composed image"| node_save
node_save -->|"writes PNG"| node_result

click node_prompts "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_details "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_qr "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_canvas "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_text "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_font "https://github.com/denzelvw-xyz/business-card-maker/tree/main/fonts"
click node_logo "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_bg_remove "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_save "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"
click node_result "https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py"

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_prompts,node_details,node_user toneBlue
class node_qr,node_qr_lib,node_canvas,node_text,node_font,node_logo,node_pillow,node_bg_remove,node_rembg toneAmber
class node_save,node_result toneMint
```

## Components

### User Input

- [Interactive prompts](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- [Detail parsing](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`

### Card Creation

- [QR generation](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- **qrcode library**
- [Card composition](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- [Text rendering](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- [Bundled font](https://github.com/denzelvw-xyz/business-card-maker/tree/main/fonts): `fonts`
- [Logo loading](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- **Pillow library**
- [Background removal](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- **rembg library**

### Output

- [Save card image](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`
- [Result.png](https://github.com/denzelvw-xyz/business-card-maker/blob/main/main.py): `main.py`

### Other components

- **User**

## Connections

- User → Interactive prompts: provides inputs (evidence: `main.py`)
- Interactive prompts → Detail parsing: parses details (evidence: `main.py`)
- Interactive prompts → QR generation: passes QR data (evidence: `main.py`)
- QR generation → qrcode library: generates QR (evidence: `main.py`)
- Interactive prompts → Logo loading: provides logo path (evidence: `main.py`)
- Interactive prompts → Card composition: provides title (evidence: `main.py`)
- Detail parsing → Card composition: provides details (evidence: `main.py`)
- QR generation → Card composition: pastes QR image (evidence: `main.py`)
- Card composition → Pillow library: creates and edits image (evidence: `main.py`)
- Text rendering → Pillow library: draws text (evidence: `main.py`)
- Card composition → Text rendering: renders title and details (evidence: `main.py`)
- Text rendering → Bundled font: loads font (evidence: `main.py`)
- Logo loading → Pillow library: opens and resizes (evidence: `main.py`)
- Logo loading → Background removal: optionally removes background (evidence: `main.py`)
- Background removal → rembg library: removes background (evidence: `main.py`)
- Logo loading → Card composition: pastes logo (evidence: `main.py`)
- Card composition → Save card image: saves composed image (evidence: `main.py`)
- Save card image → Result.png: writes PNG (evidence: `main.py`)
