I run AI analysis on Meta ads at scale. Every time someone saves an ad in SpreshApp, my pipeline analyzes it with Gemini and returns structured creative insights: the hook tactic, messaging angle, format, target persona, and a few other signals that ad strategists actually use. The first version worked well. It was also costing me around $100-150/month at roughly 1000 analyses per day, and trending upward. I needed to fix it....
ClickHouse in anger
We needed a data warehouse we actually controlled. Not a managed SaaS, something we could wire up ourselves: operational data from Postgres, event streams from Kafka, analytical queries that had to be fast. ClickHouse was the answer. Here’s what I actually ran into building it. Postgres to ClickHouse via ClickPipes CDC The requirement was simple: don’t let ClickHouse go stale. The application was still writing to Postgres constantly, so a one-time dump was useless....
Scraping Facebook Is Hard. But Not Impossible.
Scraping meta ad library costs $40/month on searchapi.io. Apify charges $225 for ~300k ads per month. If there are scrapers out there that can achieve this so why cant I? Getting there wasnt easy, I thought I can achieve this with few prompts. It took 3 infrastructure rewrites and the discovery that Facebook doesn’t fight bots with captchas, it fights them with silence. Here’s everything that didn’t work, and the one stupid thing that did....
sqlc: Write SQL, Skip the Boilerplate
AI coding assistants are great at generating boilerplate. But for database code in Go, there is a better option: one that generates it from your SQL itself, with zero hallucination risk. It is called sqlc . What sqlc does You give it your SQL query files and your schema. It generates type-safe Go functions. Setup is a single config file: # sqlc.yaml sql: - engine: "postgresql" queries: "db/queries" schema: "db/models" gen: go: package: "repo" sql_package: "pgx/v5" out: "db/repo" Point it at your queries, point it at your schema, run sqlc generate....
Svelte Components in Hugo
To integrate Svelte components into your Hugo website, you’ll need to set up a separate npm project within your Hugo project’s root directory. This approach allows you to manage and build your Svelte components independently, making it easier to maintain and update them over time. Here’s the file structure you’ll be working with: ├── content ├── hugo.toml ├── package.json ├── package-lock.json ├── rollup.config.mjs ├── svelte │ └── components │ └── my-component │ └── my-component....