Skip to content
KoishiAI
ไทย
← Back to all articles

How This Site Is Built — Behind the Scenes of KoishiAI

Astro + Firebase Hosting + Ollama local + an agent pipeline. Full architecture disclosed. Roughly zero dollars per month.

AI-drafted from cited sources, fact-checked and reviewed by a human editor. How we work · Standards · Report an error

TL;DR: KoishiAI achieves near-zero monthly costs of approximately $1.50 by running a full AI content pipeline on a home PC with an RTX 5090. The architecture combines Astro 5 for static frontend generation, Firebase Spark for free hosting, and local Ollama instances running Qwen3.5 and Qwen3.6 models for autonomous article creation.

Key facts

  • The site runs on Astro 5 with Tailwind CSS and TypeScript strict mode, generating pure static HTML with no server runtime.
  • Hosting utilizes the free Firebase Spark plan, providing 10GB storage and CDN edge nodes in Bangkok.
  • AI processing relies on local Ollama instances running qwen3.5:27b for general tasks and qwen3.6:35b-a3b for long-form content.
  • Hardware requirements include an AMD Ryzen 9 CPU, 64GB RAM, an RTX 5090 (32GB VRAM), and an RTX 5080 (24GB VRAM).
  • Total monthly operational costs are approximately $1.50 USD, covering only electricity for generating roughly two articles per day.
  • The automated pipeline uses FastAPI, SQLite, and APScheduler to orchestrate agents for scouting, writing, image sourcing, SEO optimization, and translation.
  • Astro was selected over Next.js to reduce the attack surface, avoid server-side vulnerabilities, and eliminate React hydration overhead for lower LCP.

This post walks through how KoishiAI is built — from stack choices to making AI autonomously write and publish articles — at an effective cost of near zero per month.

The stack

Frontend

  • Astro 5 for static site generation — output is pure HTML, no server runtime
  • Tailwind CSS — utility-first
  • TypeScript strict mode for safety
  • IBM Plex Sans Thai + Inter — free fonts that render beautifully in both languages

Hosting

  • Firebase Hosting Spark plan (free) — 10GB storage, CDN edge in Bangkok
  • Not using Firebase Storage (now requires Blaze) — images live in Hosting directly

Metadata DB

  • Firestore Spark plan (free) — article metadata and dashboard queries

AI (all runs on a home PC)

  • Ollama + qwen3.5:27b for general work
  • qwen3.6:35b-a3b for long-form pieces
  • ComfyUI for custom-styled images
  • Pexels/Unsplash APIs for stock illustrations

Orchestration

  • FastAPI (Python) — dashboard backend
  • SQLite for the queue + logs
  • APScheduler for cron jobs
  • Firebase Admin SDK to push data to the cloud

The article pipeline

New topic from RSS feed

topic_scout agent filters and ranks candidates

content_writer drafts markdown

image_finder sources illustrations (Pexels / Unsplash / ComfyUI)

seo_optimizer tunes meta tags and keywords

translator produces the other language

editor proofreads

publisher: write .md → git commit → astro build → firebase deploy

fb_poster shares to Facebook Page ~10 min after deploy

All of this runs on one home PC — no foreign APIs required.

Hardware

  • CPU: AMD Ryzen 9
  • RAM: 64GB
  • Primary GPU: RTX 5090 (32GB VRAM) for large LLMs
  • Secondary GPU: RTX 5080 (24GB VRAM) for parallel image generation
  • Storage: 2TB NVMe

Electricity for producing 2 articles per day averages around 50 THB ($1.50 USD) per month.

Real monthly costs

ItemMonthly
Firebase Hosting$0
Firestore$0
Ollama local$0 (~$1.50 electricity)
Pexels API$0
Unsplash API$0
Google Search Console$0
Facebook Graph API$0
Total~$1.50

Why Astro instead of Next.js

  1. Much smaller attack surface — Astro has no middleware, no server actions; the entire site is static HTML
  2. Fewer critical CVEs lately — Next.js recently had a critical middleware auth vulnerability
  3. i18n built-in — no third-party library needed
  4. Lower LCP — no React hydration overhead

Source code

This project is part of the Koishi monorepo, which isn’t yet public — but we plan to gradually open-source it once the system stabilizes (estimated 1–2 months).


Questions about the stack or want to see a specific implementation detail? Drop a comment on our Facebook Page.

Frequently asked questions

How much does it cost to run the KoishiAI site per month?
The total monthly cost is approximately $1.50 USD. This covers only the electricity required to run the local AI hardware, as all software services like Firebase Hosting, Firestore, and Ollama are free.
What AI models are used for content generation?
The system uses Qwen3.5:27b for general tasks and Qwen3.6:35b-a3b for long-form pieces. Both models run locally via Ollama on a home PC equipped with an RTX 5090 and RTX 5080.
Why was Astro chosen over Next.js for this project?
Astro was selected because it generates static HTML with no server runtime, resulting in a smaller attack surface and fewer critical vulnerabilities compared to Next.js. It also offers built-in i18n support and lower Largest Contentful Paint (LCP) scores by avoiding React hydration.
What hardware is required to run this AI pipeline?
The setup requires an AMD Ryzen 9 CPU, 64GB of RAM, and dual GPUs: an RTX 5090 with 32GB VRAM for large language models and an RTX 5080 with 24GB VRAM for parallel image generation.
How does the automated article publishing pipeline work?
The pipeline starts with an RSS feed, then uses agents to filter topics, draft markdown, source images, optimize SEO, translate content, and proofread. Finally, it commits to Git, builds the site with Astro, and deploys to Firebase before posting to Facebook.