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.
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:27bfor general work qwen3.6:35b-a3bfor 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
| Item | Monthly |
|---|---|
| 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
- Much smaller attack surface — Astro has no middleware, no server actions; the entire site is static HTML
- Fewer critical CVEs lately — Next.js recently had a critical middleware auth vulnerability
- i18n built-in — no third-party library needed
- 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.