Skip to content
KoishiAI
ไทย
← Back to all articles
behind-the-scenes astro firebase

How This Site Is Built — Behind the Scenes of KoishiAI

Behind KoishiAI: Astro builds every page as a static HTML file, Cloudflare Pages serves it, and a Python backend takes each news story from source to site.

KoishiAI · Editor: เกียรติดำรง ตรีครุธพันธ์ · · · 3 min read
AI-drafted from cited sources, fact-checked against them by an automated pipeline, and read by a human editor for clarity. How we work · Standards · Report an error
Laptop with code editor open, notebook and pen on wooden desk.
Photo by Lukas Blazek on Pexels

TL;DR: KoishiAI builds its pages with Astro 5 as static HTML files and serves them from Cloudflare Pages. The backend is written in Python and has a scheduled job that runs once a day. A news story goes through source research, drafting, a fact check against the sources and a quality score before it is published.

[Updated · 2026-10-11] Rewritten in full to match the current system. The April version contained several statements that were outdated or wrong; they have been removed.

[Updated · 2026-10-14] Corrected the sentence about the two languages. It said every page exists in both; that holds for articles, guides and tools, while the tag pages of the two languages do not match.

Key facts

  • Pages are built with Astro 5 and come out as static HTML files.
  • The site has two languages, Thai and English, without an extra library.
  • It is served from Cloudflare Pages (Firebase Hosting until 15 October 2026), with images stored in the same place as the pages.
  • The backend is written in Python and keeps its queue and work logs in SQLite.
  • A scheduled job runs once a day and aims to publish one news story.
  • A draft that scores below the quality threshold is held; it goes live only if a later revision passes.
  • The source code is not public.

KoishiAI is a bilingual AI news and insights site. We use AI systems to assist the editorial work. This article explains what the site is built with, and what a news story goes through between a news source and the page you read.

Frontend

  • Astro 5 builds every page as an HTML file at build time. Readers get a finished file; no server-side code runs when a page is opened.
  • Tailwind CSS styles the site.
  • Strict TypeScript catches mistakes while the code is being written.
  • The fonts are IBM Plex Sans Thai and Inter.
  • Two languages. Articles, guides and tools are built under both /th and /en, without an extra library.

The sitemap and each language’s RSS feed are generated at build time as well.

Hosting

  • Cloudflare Pages serves the built files to readers.
  • Images are stored in the same place as the pages.
  • Images and assets may be kept by the browser for 1 year, while HTML pages are fetched fresh every time, so readers always see the latest version.
  • Security headers are set at the host, including HSTS and a Content-Security-Policy.

Backend

  • FastAPI, in Python, is the backend.
  • SQLite holds the topic queue and the work logs.
  • APScheduler starts the news job once a day.

The path of one news story

AI news sources
    ↓
Select a topic, and check it has not been covered already
    ↓
Find and read the sources
    ↓
Draft the article from the cited sources
    ↓
Write the page title and description
    ↓
Check the facts in the draft against the sources
    ↓
Score quality (a draft that fails is held, then revised and scored again; if it still fails it is discarded)
    ↓
Look for a stock photo; a photo carries its photographer credit
    ↓
Produce the other-language version
    ↓
Save the file → git commit → build → deploy
    ↓
Share the day's news story, in its Thai version, to the Facebook Page

The steps above run in our publishing system. An editor reads every article for clarity. If you spot an error, tell us and we will correct it. The Corrections page explains how.

On some days the system also releases older drafts that have been revised until they pass.

Why Astro

  1. Pages are static HTML files. No server-side code runs when a reader opens a page, which leaves less to secure.
  2. Articles can be written directly as Markdown files, and Astro builds the pages from them.
  3. No JavaScript framework is shipped to the browser, so article pages stay light.

What else is on the site

Source code

The source code of this site is not public.

Sources


Questions about how the site is built? Leave a comment on our Facebook Page.

Frequently asked questions

What technology is KoishiAI built with? ▼
The pages are built with Astro 5, Tailwind CSS and strict TypeScript, and served from Cloudflare Pages. The backend is written in Python, uses FastAPI, and keeps its queue and work logs in SQLite.
Why did KoishiAI choose Astro? ▼
Astro builds every page as an HTML file at build time, so no server-side code runs when a reader opens a page. Articles can be written directly as Markdown files, and this site ships no JavaScript framework to the browser.
What steps does a news story go through before it is published? ▼
The system selects a topic from AI news sources, checks it is not a duplicate, researches sources, drafts the article, checks facts against the sources, scores quality, looks for an illustration and produces the other-language version. A draft that scores below the threshold is held.
Is the KoishiAI source code public? ▼
No. The source code is not public.