This repository was archived by the owner on Dec 21, 2025. It is now read-only.
Review QR code builder for website integration#1
Merged
Conversation
This prepares the QR Builder API for integration with aiqso.io website:
Authentication & Authorization:
- Add API key authentication middleware (X-API-Key header)
- Add tier-based access control (free, pro, business)
- Free tier: basic + text QR, 10/day limit, 500px max
- Pro tier: all styles, 500/day, batch up to 10, custom colors
- Business tier: all styles, 5000/day, batch up to 50
Rate Limiting:
- Per-minute and per-day rate limits by tier
- Automatic rate limit headers (X-RateLimit-*)
- 429 responses with helpful upgrade messages
Backend Integration:
- Webhook endpoints for tier updates (/webhooks/update-tier)
- API key invalidation endpoint (/webhooks/invalidate-key)
- Usage tracking endpoints for Odoo (/usage/logs, /usage/stats)
CORS Configuration:
- Configured for aiqso.io domain in production
- Allows all origins when auth is disabled (dev mode)
New Endpoints:
- GET /tiers - List available tiers for pricing page
- GET /me - Get current user info and usage
- POST /webhooks/update-tier - Update user tier
- POST /webhooks/invalidate-key - Invalidate API key
- GET /usage/logs - Get usage logs since timestamp
- GET /usage/stats/{user_id} - Get user statistics
- POST /usage/cleanup - Clean old usage logs
Environment Variables:
- QR_BUILDER_AUTH_ENABLED (default: true)
- QR_BUILDER_BACKEND_SECRET (required for production)
- QR_BUILDER_BACKEND_URL (default: https://api.aiqso.io)
- QR_BUILDER_ALLOWED_ORIGINS (default: aiqso.io domains)
Documentation:
- Add comprehensive Next.js integration guide
- Include code examples for frontend, backend, and Stripe webhooks
- Add Odoo sync integration example
Version bumped to 0.3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This prepares the QR Builder API for integration with aiqso.io website:
Authentication & Authorization:
Rate Limiting:
Backend Integration:
CORS Configuration:
New Endpoints:
Environment Variables:
Documentation:
Version bumped to 0.3.0