Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/syhily/yufan.me/llms.txt

Use this file to discover all available pages before exploring further.

yufan.me is an open-source, self-hosted blog CMS designed for writers who want full control over their content and data. Built on React Router 7 with server-side rendering, it ships with a rich Tiptap editor, Postgres-backed content model, first-party analytics, and a complete admin console — all in a single deployable image.

Quickstart

Clone, configure, and launch your blog in minutes

Admin Guide

Write posts, manage media, and configure your site

Configuration

Environment variables, settings sections, and storage options

Deployment

Deploy with Docker or directly on Node.js

What is yufan.me?

yufan.me is the full source of a production blog system — the public site, the admin SPA, the API layer, the SSR renderer, and the database schema all live together in one repository. You clone it, configure a Postgres database and Redis instance, and deploy it as your own blog. Key capabilities include:
  • Rich content editor — Tiptap (ProseMirror) editor with support for images, code blocks with syntax highlighting (Shiki), math expressions (KaTeX), Mermaid diagrams, music players, tables, and footnotes
  • PortableText wire format — post bodies are stored as structured PortableText JSON, enabling lossless round-trips between the editor and the rendered page
  • Typed API — every browser-to-server call goes through oRPC at /rpc/*, with Zod-validated inputs and outputs and four permission tiers
  • First-party analytics — visit ingestion and dashboards backed by Postgres, with optional MaxMind GeoLite2 geo-enrichment
  • 14 settings sections — site identity, navigation, SEO, comments, caching, rate limits, search, fonts, and more — each section saves independently from the admin console
  • Optional S3 storage — object storage for images and music is opt-in and can be toggled on or off without redeployment
  • AI-powered search — semantic search via OpenAI embeddings with automatic fallback to SQL LIKE search

How it works

1

Install and configure

Clone the repository, copy .env.example to .env, and fill in your DATABASE_URL, REDIS_URL, and SESSION_SECRET.
2

Run the install gate

On first boot, every request redirects to /admin/setup. Create your admin account and complete the two-stage setup to seed all 14 settings sections.
3

Start writing

Navigate to /admin to access the full admin console. Create posts and pages using the Tiptap editor, manage categories and tags, and upload images or music to your media library.
4

Configure and customize

Open /admin/settings to customize site identity, navigation links, SEO meta, sidebar widgets, comment settings, caching, and more — all without touching code or redeploying.

Stack at a glance

LayerTechnology
App routerReact Router 7 framework mode (SSR)
HTTP serverHono via @hono/node-server
APIoRPC at /rpc/* with Zod schemas
UIReact 19, shadcn/ui (Base UI variant), Tailwind CSS v4
EditorTiptap (ProseMirror) ↔ PortableText bridge
DatabasePostgres (Drizzle ORM)
Cache / sessionsRedis (ioredis + unstorage)
Object storageS3-compatible (opt-in)
BuildVite+ (vp)
yufan.me is licensed under MIT. You are free to use, modify, and deploy it as your own blog. The bundled fonts and third-party assets have separate licenses listed in the licenses/ directory.

Build docs developers (and LLMs) love