A comprehensive QR code generation framework with advanced features including dynamic QR codes, analytics, security, and extensive customization options.
- π Static & Dynamic QR Codes - Generate traditional static QR codes or dynamic ones with changeable destinations
- π Security Features - Password protection and AES encryption for sensitive data
- β° Expiration Control - Set expiration dates for time-sensitive QR codes
- π¨ Visual Customization - Colors, gradients, logos, frames, and various shapes
- π± Pre-built Templates - 12+ beautiful templates ready to use
- π Analytics Dashboard - Track scans, locations, devices, and performance metrics
- π§ Automated Reports - Schedule daily, weekly, or monthly email reports
- π« Single-Use Codes - Perfect for tickets, coupons, and vouchers
- π Geographic Tracking - Track scan locations by country, region, and city
- π± Device Detection - Identify device types, OS, and browsers
- π Encryption Support - Encrypt QR code content with custom keys
- β‘ Batch Processing - Generate multiple QR codes efficiently
npm install qrverseimport QRVerse from 'qrverse';
// Initialize QRVerse
const qrverse = new QRVerse({
baseUrl: 'https://your-domain.com',
analytics: {
enabled: true,
trackLocation: true,
trackDevice: true,
},
});
// Generate a simple QR code
const result = await qrverse.generateQR({
data: 'https://example.com',
size: 300,
});
console.log('QR Code generated:', result.id);
// result.qrCode contains the PNG bufferconst customQR = await qrverse.generateQR({
data: 'https://mywebsite.com',
type: 'static',
size: 400,
customization: {
foregroundColor: '#2C3E50',
backgroundColor: '#ECF0F1',
logo: {
src: './logo.png',
size: 60,
margin: 10,
},
frame: {
type: 'rounded',
color: '#3498DB',
thickness: 5,
},
dotStyle: 'circle',
shape: 'rounded',
},
});const dynamicQR = await qrverse.generateQR({
data: 'https://changeable-destination.com',
type: 'dynamic',
security: {
password: 'mySecretPassword',
encryption: true,
encryptionKey: 'my-custom-key-32-chars-long',
},
expiration: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000), // 30 days
});
// Later, update the destination
await qrverse.updateDynamicQR(dynamicQR.id, 'https://new-destination.com');// Get all available templates
const templates = qrverse.getTemplates();
// Use a pre-built template
const templateQR = await qrverse.generateQR({
data: 'https://business-site.com',
template: 'corporate-gray',
customization: {
logo: {
src: './company-logo.png',
size: 50,
},
},
});
// Get business-specific templates
const businessTemplates = qrverse.getBusinessTemplates();const ticketQR = await qrverse.generateQR({
data: 'TICKET-12345',
singleUse: true,
template: 'golden-luxury',
expiration: new Date('2024-12-31T23:59:59Z'),
security: {
encryption: true,
},
});const batchOptions = [
{ data: 'https://product1.com', template: 'modern-blue' },
{ data: 'https://product2.com', template: 'vibrant-sunset' },
{ data: 'https://product3.com', template: 'forest-green' },
];
const batchResults = await qrverse.generateBatch(batchOptions);
console.log(`Generated ${batchResults.length} QR codes`);// Record a scan (typically called from your redirect endpoint)
const scanRecorded = await qrverse.recordScan(
qrId,
req.ip,
req.headers['user-agent']
);// Get analytics for a specific QR code
const analytics = await qrverse.getAnalytics(qrId);
console.log({
totalScans: analytics.totalScans,
uniqueScans: analytics.uniqueScans,
scansByDate: analytics.scansByDate,
scansByLocation: analytics.scansByLocation,
scansByDevice: analytics.scansByDevice,
});
// Get top performers
const topQRs = await qrverse.getTopPerformers(10);
// Get scan trends
const trends = await qrverse.getScanTrends(30); // Last 30 days
// Get geographic distribution
const geoDistribution = await qrverse.getGeographicDistribution();const qrverse = new QRVerse({
email: {
service: 'gmail', // or 'outlook', 'yahoo', etc.
user: 'your-email@gmail.com',
pass: 'your-app-password',
},
});// Schedule a weekly report
qrverse.scheduleReport('weekly-report', {
frequency: 'weekly',
email: 'manager@company.com',
qrIds: ['qr1', 'qr2', 'qr3'], // Optional: specific QR codes
includeCharts: true,
});
// Generate immediate report
await qrverse.generateReport({
frequency: 'daily',
email: 'admin@company.com',
});
// Generate CSV export
const csvData = await qrverse.generateCSVReport({
frequency: 'monthly',
email: 'data@company.com',
});QRVerse comes with 12+ pre-built templates:
- classic - Traditional black and white
- modern-blue - Clean blue gradient with rounded corners
- vibrant-sunset - Warm sunset gradient with circular design
- corporate-gray - Professional gray theme for business
- neon-purple - Futuristic neon purple with glow effect
- forest-green - Natural green theme inspired by nature
- ocean-blue - Deep ocean blue with wave-like gradient
- fire-red - Bold red gradient with dynamic energy
- golden-luxury - Elegant gold gradient for premium brands
- minimalist - Clean and simple design
- retro-wave - 80s inspired neon colors
- pastel-dream - Soft pastel colors for gentle look
// Create custom template
const customTemplate = qrverse.createCustomTemplate(
'my-brand',
'My Brand Template',
'Custom template for my brand',
{
gradient: {
type: 'linear',
colors: ['#FF6B6B', '#4ECDC4'],
direction: 45,
},
frame: {
type: 'rounded',
color: '#FF6B6B',
thickness: 4,
},
}
);const protectedQR = await qrverse.generateQR({
data: 'Sensitive information',
security: {
password: 'strongPassword123',
},
});
// Verify password when scanning
const verifiedData = qrverse.verifyPassword(protectedData, 'strongPassword123');const encryptedQR = await qrverse.generateQR({
data: 'Top secret data',
security: {
encryption: true,
encryptionKey: 'your-32-character-encryption-key',
},
});
// Decrypt data
const decryptedData = qrverse.decrypt(encryptedData, 'your-32-character-encryption-key');interface QRVerseConfig {
baseUrl?: string; // Base URL for dynamic QR codes
database?: DatabaseConfig; // Database configuration
analytics?: {
enabled: boolean;
trackLocation: boolean;
trackDevice: boolean;
};
security?: {
defaultEncryption: boolean;
hashAlgorithm: string;
};
email?: EmailConfig; // Email configuration for reports
}- Product QR codes with analytics
- Dynamic pricing and promotions
- Inventory tracking
- Single-use ticket validation
- Event check-in systems
- Promotional campaigns
- Campaign performance tracking
- A/B testing with different designs
- Geographic market analysis
- Dynamic contact information
- Professional templates
- Analytics on networking effectiveness
- Digital menus with analytics
- Table-specific QR codes
- Promotional offers tracking
Generate a QR code with specified options.
Update the destination URL of a dynamic QR code.
Record a QR code scan for analytics.
Get comprehensive analytics for a QR code.
Get the best performing QR codes.
Get scan trends over time.
Get all available templates.
Get a specific template by ID.
createCustomTemplate(id: string, name: string, description: string, customization: QRCustomization): Template
Create a custom template.
Encrypt data with optional custom key.
Decrypt previously encrypted data.
Verify password for protected data.
npm testnpm run buildCheck out our examples repository for complete implementation examples:
- Express.js server integration
- React frontend components
- Next.js full-stack application
- Analytics dashboard
- Batch processing scripts
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/julioamorimdev/qrverse.git
cd qrverse
npm install
npm run devnpm test
npm run test:coverageWe use ESLint and Prettier for code formatting:
npm run lint
npm run lint:fixThis project is licensed under the MIT License - see the LICENSE file for details.
- π Issue Tracker
- π§ Email Support
- qrcode - Core QR code generation
- canvas - Image manipulation
- sharp - High-performance image processing
- crypto-js - Cryptographic functions
See CHANGELOG.md for a detailed history of changes.
- React/Vue/Angular components
- WebAssembly support for better performance
- Machine learning for QR code optimization
- Blockchain integration for verification
- Mobile SDK (React Native, Flutter)
- Advanced analytics with AI insights
Made with β€οΈ by the QRVerse Team
If you find QRVerse useful, please consider giving it a β on GitHub!