A web application that generates beautiful, artistic QR codes with various patterns and styles. Create unique QR codes that are both functional and visually appealing.
- Features
- Technical Overview
- System Architecture
- Component Details
- API Documentation
- Development Guide
- Deployment Guide
- Performance & Security
- Maintenance & Troubleshooting
- License
- Multiple artistic patterns (circles, diamonds, flowers, stars, hexagons, rounded)
- Beautiful color combinations
- High error correction for reliable scanning
- Easy-to-use web interface
- Instant preview and download options
- Backend: Python 3.11+ with Flask framework
- Frontend: HTML5, JavaScript, TailwindCSS
- Image Processing: PIL (Python Imaging Library), qrcode library
- Deployment: Render.com (Cloud Platform)
- Version Control: Git
├── app.py # Flask application server
├── qr_generator.py # Core QR code generation logic
├── demo.py # Demonstration script
├── requirements.txt # Python dependencies
├── render.yaml # Render deployment configuration
├── Procfile # Process file for web servers
├── templates/
│ └── index.html # Frontend user interface
└── static/
└── generated/ # Generated QR code storage
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Web Browser │────▶│ Flask Server │────▶│ QR Generator │
│ (Frontend) │◀────│ (Backend API) │◀────│ Engine │
└─────────────────┘ └──────────────────┘ └─────────────────┘
▲ │ │
│ ▼ ▼
│ ┌──────────────────┐ ┌─────────────────┐
└───────────────│ Static Assets │ │ File System │
│ (Generated QRs) │ │ Storage │
└──────────────────┘ └─────────────────┘
- User inputs text and selects style
- Frontend sends POST request to /generate
- Backend validates input and generates QR code
- QR code is saved to static/generated/
- Frontend displays and enables download
The QR code generation is handled by two main classes:
- Custom pattern styles implementation
- Dual-color scheme support
- Configurable parameters
- High-quality anti-aliased output
Pattern Styles:
-
Circles
- Alternating circle sizes
- Enhanced contrast through size variation
-
Diamonds
- Rotated square patterns
- Mathematical precision in angles
-
Flowers
- Six-petal design
- Overlapping petals with centered dots
-
Stars
- Eight-point star design
- Inner/outer radius variation
-
Hexagons
- Nested patterns with contrast
- Geometric precision
-
Rounded
- Soft-cornered squares
- Nested design with padding
- Handles high-level QR generation
- Manages color schemes
- Implements error correction
- Handles file operations
- Purpose: Main application interface
- Response: HTML page
- Error Codes: 404, 500
- Purpose: QR code generation
- Request Body:
{ "text": "string", "style": "circles|diamonds|flowers|stars|hexagons|rounded" } - Response:
{ "success": true, "image_url": "string", "download_name": "string" } - Error Codes: 400, 500
- Python 3.11+
- pip package manager
- Git (optional)
- Clone the repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Unix/macOS venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Visit
http://localhost:5000in your browser
PORT: Server port (default: 5000)MAX_CONTENT_LENGTH: Max file size (default: 16MB)
- Create a free account at Render.com
- Connect your GitHub repository
- In Render Dashboard, click "New +" and select "Web Service"
- Choose your repository
- Configure the service:
- Name: artistic-qr-generator (or preferred name)
- Environment: Python
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app - Python Version: 3.11
- Click "Create Web Service"
- Verify all QR styles work
- Test error handling
- Monitor performance
- Check file cleanup
- Optimized drawing algorithms
- Memory-efficient image handling
- Automatic file cleanup
- Responsive UI design
-
File System Security
- Controlled file paths
- Automatic cleanup
- Size limitations
-
Input Validation
- Request validation
- Content type checking
- Error boundaries
-
Output Safety
- Secure file serving
- Unique filenames
- Content-Type headers
- Monitor disk usage
- Check error logs
- Verify file cleanup
- Update dependencies
-
QR Generation Fails
- Check input text length
- Verify style parameter
- Check disk space
-
Performance Issues
- Monitor memory usage
- Check file cleanup
- Verify concurrent requests
-
Deployment Issues
- Check Python version
- Verify dependencies
- Check environment variables
MIT License - Feel free to use and modify
Copyright (c) 2025 Sushil Bokade