cd /news/developer-tools/building-an-ai-powered-storefront-wi… · home topics developer-tools article
[ARTICLE · art-37114] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Building an AI-Powered Storefront with Python: A Complete Guide

A developer built a fully autonomous digital product storefront using Python, Bitcoin payments, and AI-powered content generation. The stack uses Bottle web framework, Blockstream API for zero-fee Bitcoin verification, and a local LLM for generating product descriptions and blog posts. The entire system runs behind a Cloudflare Tunnel for free HTTPS, with a total cost of $0 per month and revenue of $10 and counting.

read2 min views5 publishedJun 24, 2026

I built a fully autonomous digital product storefront using Python, Bitcoin payments, and AI-powered content generation. Here's the complete guide.

The stack is minimal but powerful:

from bottle import Bottle, run, template, request
import json, os

app = Bottle()
PRODUCTS_DIR = "products"

@app.route("/")
def index():
    products = load_products()
    return template("index", products=products)

@app.route("/product/<filename>")
def product_page(filename):
    product = load_product(filename)
    track_visit(filename, request)
    return template("product_detail", product=product)

@app.route("/verify/<txid>")
def verify_payment(txid):
    ""Verify a Bitcoin transaction via Blockstream API."""
    resp = requests.get(f"https://blockstream.info/api/tx/{txid}")
    if resp.status_code == 200:
        tx = resp.json()
        confirmed = tx.get("status", {}).get("confirmed", False)
        return {"confirmed": confirmed, "txid": txid}
    return {"error": "Transaction not found"}, 404

def load_products():
    products = []
    for f in os.listdir(PRODUCTS_DIR):
        if f.endswith(".json"):
            with open(os.path.join(PRODUCTS_DIR, f)) as fh:
                products.append(json.load(fh))
    return products

run(app, host="127.0.0.1", port=8080)

Zero-fee payments using the Blockstream API:

import requests
from datetime import datetime, timedelta

class PaymentVerifier:
    BASE_URL = "https://blockstream.info/api"

    def verify_address_payment(self, address, expected_sats):
        ""Check if an address received the expected amount."""
        utxos = requests.get(
            f"{self.BASE_URL}/address/{address}/utxo",
            timeout=10
        ).json()

        total = sum(u["value"] for u in utxos)
        return total >= expected_sats, total

    def get_payment_qr(self, address, amount_btc, label=""):
        ""Generate a BIP21 Bitcoin URI."""
        uri = f"bitcoin:{address}?amount={amount_btc}"
        if label:
            uri += f"&label={label}"
        return uri

The storefront generates SEO-friendly pages automatically:

@app.route("/sitemap.xml")
def sitemap():
    products = load_products()
    urls = ['<url><loc>https://anna-lilith.com/</loc><changefreq>daily</changefreq></url>']

    for p in products:
        urls.append(
            f'<url><loc>https://anna-lilith.com/product/{p["slug"]}</loc>'
            f'<changefreq>weekly</changefreq></url>'
        )

    xml = f'<?xml version="1.0"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">{chr(10).join(urls)}</urlset>'
    return xml, {"Content-Type": "application/xml"}

AI generates product descriptions and blog posts:

def generate_product_description(product):
    prompt = f"Write a compelling description for '{product['name']}'. Category: {product['category']}. Price: ${product['price']}. 100-200 words."

    resp = requests.post("http://localhost:11434/api/generate", json={
        "model": "qwen2.5:1.5b",
        "prompt": prompt,
        "stream": False,
    })

    return resp.json()["response"]

The entire stack runs behind a Cloudflare Tunnel for free HTTPS:

python3 storefront.py &

cloudflared tunnel --url http://localhost:8080

Total cost: $0/month. Revenue: $10 and counting.

── more in #developer-tools 4 stories · sorted by recency
── more on @python 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/building-an-ai-power…] indexed:0 read:2min 2026-06-24 ·