Introduction
Baan (Thai for home) is a Markdown-based narrative platform — a place to keep being the one who tells the story, instead of the one being synthesized by AI.
In an era when AI synthesizes knowledge from countless web fragments, your own narrative — your thoughts, experiences, and writing — has been scattered across platforms you don’t control. Baan is the home where you take it back.
The Name
Section titled “The Name”Baan (บ้าน) is the Thai word for home. We wanted a name for the opposite of platform fragmentation: a single place where your knowledge, thinking, and experience live together. A place your information comes back to. Your information’s home.
What Sets Baan Apart
Section titled “What Sets Baan Apart”1. Content outside the heavy RDB. No Git pollution.
Section titled “1. Content outside the heavy RDB. No Git pollution.”Article bodies live as Markdown files in storage; operational data such as settings, users, sessions, metadata, article indexes, and rate-limit counters sits in lightweight SQLite/libSQL. Unlike traditional CMSes that store full article bodies in a heavy RDB, Baan keeps the writing itself readable in any editor. And unlike static site generators that mix article files into the Git repository, Baan separates the code repository from article storage so your commit history stays clean. See Architecture.
2. Write in any editor you like
Section titled “2. Write in any editor you like”Stay in the browser with Baan’s built-in AI-assisted editor, or write in Obsidian / Typora / VSCode and sync via the Baan CLI. Authoring is fully local; publishing is one command. See Writing Posts and External Editors.
3. Knowledge Graph + Bridge Article Generator
Section titled “3. Knowledge Graph + Bridge Article Generator”AI can extract entities (people, organizations, places, concepts, products) from published articles and link them to Wikidata IDs. Select two entities on the graph and Baan proposes 5 article ideas that bridge them, complete with title, angle, and outline. It is a rare CMS combination: file-based content, entity graph, and narrative workflow together. See Knowledge Graph.
4. AI Optimization
Section titled “4. AI Optimization”Baan outputs JSON-LD for public pages and can serve /llms.txt when AI Optimization is enabled. These machine-readable signals help ChatGPT, Gemini, Perplexity, and other AI systems understand your content, without pretending citation is guaranteed. The Admin Dashboard consolidates AEO Score, E-E-A-T checklist, structured data status, and bot management in one screen. See AI Optimization.
5. Search and AI bot control
Section titled “5. Search and AI bot control”Allow or block individual AI bots and search engine bots from Admin. Choices are reflected in a dynamically generated robots.txt. See Security.
6. AI traffic analysis
Section titled “6. AI traffic analysis”Built-in analytics tracks both axes that matter in the AI era: AI Bot visits (User-Agent) and AI-sourced human visits when referrers are available. See Analytics.
7. Security
Section titled “7. Security”The admin panel lives at an unguessable secret URL, supports IP allowlisting, and offers application-level Basic Auth across three scopes (admin only / public only / both). See Security.
8. Theme system
Section titled “8. Theme system”Seven built-in themes ship by default. Generate new themes from a prompt via Admin, or — for higher quality — ask Claude Code, Codex, or Cursor: “Create a theme.” The Baan repo ships per-agent configuration plus the create-theme skill, so all three agents produce themes that satisfy Baan’s contract. Every theme bundles its prompts/concept.md (Theme Provenance), so themes carry their recipe alongside the code. See Themes.
How Baan Works
Section titled “How Baan Works”Baan runs on both serverless (Vercel and similar) and self-hosted (Docker / EC2 / Compute Engine / VPS) targets:
| Environment | Database | Storage |
|---|---|---|
| Serverless (Vercel etc.) | libSQL / Turso (DATABASE_URL + DATABASE_AUTH_TOKEN required) | Choose from GCS / S3 / R2 |
| Self-hosted (Docker / EC2) | SQLite (data/app.db, auto-created) | Choose from GCS / S3 / R2 / Local |
The active environment is determined by the value the user picks and saves to the DB at the setup wizard or Settings → System → Current Environment. Auto-detection from platform env vars is used only as a default suggestion. See Hosting environments.
Note: Serverless deployment is currently verified on Vercel only. Support for other serverless platforms (Cloudflare Workers, AWS Amplify, etc.) is planned for future releases.
Technology Stack
Section titled “Technology Stack”| Area | Technology |
|---|---|
| Framework | Next.js (App Router) |
| Language | TypeScript |
| UI | React, Radix UI, shadcn/ui, Tailwind CSS |
| Editor | Milkdown, TipTap |
| Database | libSQL / SQLite (@libsql/client) |
| Storage | Pluggable — GCS, S3, R2, or local disk |
| Search | SQLite FTS5 (server-side, trigram) + Orama (SSG fallback) |
| AI | Claude (Anthropic), OpenAI, Gemini |
| Testing | Vitest, Playwright |
| License | GNU AGPL v3 or later |
Next Steps
Section titled “Next Steps”- Quick Start — up and running in under 5 minutes
- Installation — detailed setup with all options explained
- Deploy to Vercel — serverless deployment guide
- Deploy with Docker — self-hosted containerized deployment