Skip to content
Go back

New Project Idea

Published:  at  07:00 AM

I’ve been thinking about a larger project using QR codes. I’m still not 100% on how that will look and what it’ll do, but I do know that I want a service in my ecosystem that can return me a QR code. So I’m gonna build it!

to recap my design principles for projects:

My work pattern currently is design in the evening, build in the morning when I’m fresh. This works a lot better than bashing away at technical stuff late at night.

The first step in the design process tonight is to work through the design with old mate ChatGPT. We’ve had a productive Q & A session and have settled on this design for our MVP:

QR Code

AI Generated:

# 🧱 QR Code Service MVP – Architecture Summary

## 🎯 Purpose
Public-facing service to generate QR codes and manage short URL redirects.

Internally known as **Qween**, but all public API routes and responses are **brand-neutral or app-branded**.

---

## � API Layer – AWS API Gateway

| Method | Path                | Description                   | Auth        |
|--------|---------------------|-------------------------------|-------------|
| POST   | `/generate`         | Generates a QR + short URL    | `x-api-key` |
| GET    | `/{short_id}`       | Redirects to original URL     | Public      |

> ✅ No `/qween` or internal terms in public routes

---

## ⚙� Processing – AWS Lambda

### 1. `generate.py`
- Validates `type=url` input
- Creates short ID (`abc123`)
- Generates QR code that points to `https://yourdomain.com/abc123`
- Encodes as base64
- Saves to Supabase
- Returns:

>```json
> {
>  "short_url": "https://yourdomain.com/abc123",
>  "qr_base64": "data:image/png;base64,..."
> }
>```

### 2. `redirect.py`
- Resolves `{short_id}` to original URL
- Returns `302 Location: original_url` or 404

---

## 🗄� Supabase Database – `qr_codes`

```sql
CREATE TABLE qr_codes (
  id TEXT PRIMARY KEY,
  type TEXT NOT NULL,
  payload JSONB NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
  status TEXT DEFAULT 'active',
  scan_count INTEGER DEFAULT 0
);

� Authentication


� Public-Facing Experience

FeaturePublic View
QR Encoded URLhttps://yourdomain.com/abc123
API POST URLhttps://api.yourdomain.com/generate
Branding in PayloadNone — neutral by default

Based on that, I'll get him to help with some of the database creation work and create me a prompt to take to Gemini for the coding of the lambda function tomorrow. 

I'm looking forward to building this tomorrow morning.  

also - this post should be the first that Tina publishes on her own via AWS Event Bridge Schedule 🤞�

Suggest Changes

Previous Post
New Project Idea
Next Post
I love Gemini 2.5