# N8N QR Code Generator Node

An N8N community node for QR Code generation with support for PIX payments, URLs, WiFi networks, and structured data.

## Features

- ✅ **QR Code Generation** for different content types
- ✅ **PIX Support** - Brazilian instant payments with PIX keys
- ✅ **URLs and Text** - Custom links and plain text
- ✅ **WiFi Networks** - Share WiFi credentials easily
- ✅ **vCard Contacts** - Contact information sharing
- ✅ **Flexible Configuration** - Size, colors, error correction
- ✅ **Multiple Formats** - Base64, Data URL, Buffer

## Installation

```bash
npm install n8n-nodes-qrcode-generator
```

## Supported Content Types

### 1. Text/URL
- Plain text
- URLs and links
- Structured JSON data

### 2. PIX Payment
- PIX Key (CPF, CNPJ, email, phone, random key)
- Merchant name
- Amount (optional - leave 0 for variable amount)
- City
- Transaction ID (optional)

### 3. WiFi Network
- Network name (SSID)
- Password
- Security type (WPA/WPA2, WEP, None)

### 4. vCard Contact
- Full name
- Phone number
- Email address
- Organization

## Advanced Settings

- **Output Format**: Base64 Data URL, Base64 String, or Buffer
- **Size**: Width in pixels (default: 300px)
- **Error Correction Level**: Low, Medium, Quartile, High
- **Margin**: Spacing around the QR Code
- **Colors**: Customize dark and light colors

## Usage Examples

### PIX Payment
```json
{
  "pixKey": "user@email.com",
  "merchantName": "Example Store",
  "amount": 25.50,
  "city": "São Paulo",
  "transactionId": "TXN123"
}
```

### WiFi Network
```json
{
  "wifiSSID": "MyNetwork",
  "wifiPassword": "password123",
  "wifiSecurity": "WPA"
}
```

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Development with watch
npm run dev

# Lint
npm run lint
```

## PIX Implementation

This node implements the official Brazilian PIX EMV QR Code specification from the Central Bank of Brazil (BCB), ensuring compatibility with all PIX-enabled banking applications.

## License

MIT