DEV Community

x t
x t

Posted on AI-assisted

Blog-OS: An Open-Source Blog System with a Local AI Writing Assistant

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

Blog-OS is a complete personal blog system with a built-in AI writing assistant. Article management, Markdown editor, site settings, comment moderation — plus an AI helper that suggests excerpts, tags, and titles.

The twist: the AI runs entirely on your own machine via Ollama and Gemma 3 4B (open-weight model from Google). No API keys. No per-token billing. No drafts leaving your laptop.

The Side Hustle

Who would pay: Independent bloggers, newsletter writers, and small content creators who publish regularly in Chinese.

The math is simple. A managed blog with AI features costs:

  • Ghost Pro + AI add-ons: $15+/month
  • WordPress hosting + AI plugins: $10+/month + API costs

Blog-OS costs $0/month to run (Cloudflare free tier + local model). The AI assistant saves ~10 minutes per post on the tedious parts — writing excerpts, picking tags, brainstorming titles. For someone publishing 3x/week, that's 2 hours/month saved.

The business: Host it for non-technical bloggers at $5/month. They get a professional blog with AI assistance. I get margin because the AI compute is on their machine, not mine. No GPU bills. No API costs to pass through. The open-weight model is what makes the unit economics work — a closed API would eat the entire $5 in token fees.

Demo

Try it yourself:

  • Code: https://github.com/joemh79/blog-os (MIT licensed)
  • Deploy frontend/ to Cloudflare Pages — zero build step, 15 minutes
  • Admin panel at /admin/ — write in Markdown, click the AI assistant buttons
  • AI needs Ollama locally: ollama pull gemma3:4b

How I Built It

The open core: Three API endpoints proxy to Ollama's local API (http://localhost:11434):

  • POST /api/ai/excerpt — Chinese summary from Markdown
  • POST /api/ai/tags — 3-5 relevant tags
  • POST /api/ai/title — title suggestions

Prompts tuned for Chinese blog content. If Ollama isn't running, the UI explains how to set it up instead of crashing.

The stack:

  • Frontend: Pure HTML/CSS/JS, no build. Single config.js for all personal info.
  • Backend: Single-file Cloudflare Worker + D1. Auth, CRUD, settings, AI proxy — ~600 lines, zero npm dependencies.
  • 63 backend tests passing.

Why Open Innovation Matters for This Build

Three places where "open" isn't a philosophy — it's the reason this works:

  1. The model makes the business possible. If the AI required a paid API, every excerpt/tag/title would cost tokens. At $5/month pricing, API fees would exceed revenue. Gemma's open weights mean the AI runs free, forever, on the user's hardware. Closed AI kills this business model; open AI enables it.

  2. Privacy is the feature. Blog drafts are unfinished thoughts — half-formed opinions, personal stories, unannounced projects. Sending those to a cloud API for a tag suggestion is a privacy leak. Local inference means the AI sees your draft and nothing else does. For writers, that's not a nice-to-have; it's the reason to choose this over a cloud alternative.

  3. No vendor lock-in on the stack. Every line is readable. No minified blobs, no telemetry, no proprietary APIs. If Cloudflare changes pricing, the Worker runs on any compatible runtime. If Gemma gets surpassed, swap in any Ollama-compatible model. The user owns their blog completely.

My Agent Session

Designed and built with Muse (AI assistant) through agent sessions. The 63 backend tests, the AI prompt tuning, and the admin UI were all developed iteratively with AI assistance.

Prize Categories

  • Hacktoberfest Week 2: Side Hustle (primary)
  • Best Use of Gemma (Gemma 3 4B via Ollama, local inference)

Top comments (0)