# Launched: My Own Blog Platform

**Goal:** fast, cheap, and fully under my control—no CMS lock‑in, no heavy infra.

---

## How I worked

- Started with a **BRD** written together with **Claude** (requirements, constraints, success criteria).
- Had Claude render **two UI mockups** and hosted them on an Anthropic server so I could compare and pick one before coding.
- I set the **architecture**, **security boundaries**, and **deployment automation**.

---

## High‑level architecture

- **API** on **Azure Container Apps** (simple, low‑ops, easy scaling)
- **Data** in **Cosmos DB**
- **Images**: initially planned to store in **Cloudflare R2**, but that required adding a payment method once the free limit is exceeded.  
  To avoid introducing billing risk for a side project, I instead **reuse existing image URLs from my LinkedIn posts** directly in the markdown.  
  This keeps the design simple, zero‑cost, and good enough for now.
- Two **Cloudflare Workers**:
  - `api-proxy`: calls the ACA API, converts **markdown → HTML**, and will add response caching later
  - `ui-worker`: renders the page UI and composes the final HTML
- **Read API** protected by **API key** for now; **write/update** will use **OIDC tokens** in the next version

---

## Automation (CI/CD)

- **2 GitHub Actions workflows**:
  - **Infra workflow**: creates/updates Cosmos DB (and related resources)
  - **Deploy workflow**: builds and deploys the ACA API + Workers
 **zero manual steps**.

---

## Effort

- ~**8h** for ACA API  
- ~**4h** for Cloudflare frontend + Workers  
- ~**2h** to add a **view‑count** feature  

---

## Current status & next steps

- **Current status:** read‑only interface; I add articles manually in Cosmos.
- **Next up:** insert/update logic with proper token‑based auth and a simple admin UI.
- **Future consideration for images:** if I ever need more control (upload, transform, CDN rules), I can revisit R2 or another object store with a clear budget and alerting. For now, reusing LinkedIn image URLs is the simplest, zero‑cost solution.

---

## Links

- **Blog:** https://blog.koorevaar.com/  
- **Repo:** https://github.com/P47K0/Pat.Aca.BlogServiceApi  

---

*If you like this kind of “small but realistic” cloud design, I’d love your feedback.*

---

*Co-authored with Claude.*

If this was useful, [you can buy me a coffee](https://ko-fi.com/p47k0).

New articles: [follow via RSS](https://blog.koorevaar.com/feed.xml).
