Coding & Development🌐universal

FoJin 佛津

Buddhist Digital Text Platform — 9,200+ texts, 500+ sources, 8 UI languages, AI Q&A (RAG), knowledge graph, full-text search

Quick Start

Install this Skill

npx skills add xr843/fojin
<div align="center">

# FoJin 佛津

### The World's Encyclopedic Buddhist Digital Text Platform

**503 sources. 30 languages. 30 countries. 23,500+ full-text volumes. One search.**

Aggregating the world's Buddhist digital heritage — 10,500+ texts with 23,500+ volumes of full content in Pali, Classical Chinese, Tibetan, and Sanskrit from 503 data sources. **The first LLM-driven trilingual cross-canon parallel reading platform** (CBETA × SuttaCentral × 84000), with chunk-level alignment verified by LLM, plus CBETA-style reading, AI-powered Q&A with 8 Buddhist master personas (RAG + tradition-scoped retrieval + citations), knowledge graph with 31K+ entities and 28K+ relations visualized on a 50K-entity Deck.GL geo map, 32 dictionaries with 748K entries across 6 languages, timeline visualization, activity feed, collections, citations, annotations, bookmarks, and multi-language parallel reading.

[Live Demo](https://fojin.app) &nbsp;&middot;&nbsp; [API Docs](https://fojin.app/docs) &nbsp;&middot;&nbsp; [中文文档](./docs/README_zh.md) &nbsp;&middot;&nbsp; [Discussions](https://github.com/xr843/fojin/discussions) &nbsp;&middot;&nbsp; [Discord](https://discord.gg/76SZeuJekq) &nbsp;&middot;&nbsp; [Report Bug](https://github.com/xr843/fojin/issues)

[![CI](https://github.com/xr843/fojin/actions/workflows/ci.yml/badge.svg)](https://github.com/xr843/fojin/actions/workflows/ci.yml)
[![Security Scan](https://github.com/xr843/fojin/actions/workflows/security.yml/badge.svg)](https://github.com/xr843/fojin/actions/workflows/security.yml)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/xr843/fojin?style=social)](https://github.com/xr843/fojin)

![FoJin — Global Buddhist Digital Text Platform](./docs/screenshots/hero.png)

</div>

---

## Why FoJin?

Buddhist texts are scattered across hundreds of databases worldwide — CBETA, SuttaCentral, BDRC, SAT, 84000, GRETIL, and many more. Each has different interfaces, languages, and data formats. Researchers spend more time *finding* texts than *reading* them.

**FoJin solves this.** It aggregates 503 sources into a single, searchable platform with features no other tool provides:

| What you need | How FoJin helps |
|---|---|
| Find a sutra across databases | **Multi-dimensional search** across 10,500+ texts from 503 sources |
| Read the full text online | **8,900+ texts** with 23,500+ volumes of full content, CBETA-style layout |
| Compare translations | **Parallel reading** in 30 languages side by side |
| Compare sutras across Buddhist canons | **Trilingual cross-canon parallel reading** — 5 MVP sutras with 142 LLM-verified chunk alignments across Chinese / Pali / Tibetan (Heart Sutra, Satipaṭṭhāna, Dhammacakka, Dhammapada, Vimalakīrti) |
| Look up Buddhist terms | **32 dictionaries**, 748K entries (Chinese/Sanskrit/Pali/Tibetan/English) |
| Explore relationships | **Knowledge graph** with 31K+ entities and 28K+ relations (23K lineage chains) |
| Discover similar texts | **Semantic similarity** powered by 678K+ embedding vectors (pgvector + HNSW) |
| Ask questions about texts | **AI Q&A** ("XiaoJin") with RAG, reranking, clickable citations, multi-language citation drawer, and follow-up suggestions |
| Learn from a specific master | **Master Persona Mode** — 8 historical Buddhist masters, each with tradition-specific RAG scope |
| Explore Buddhist geography | **Knowledge Graph Map** — 50K+ geo entities, monastery locations, lineage arcs on Deck.GL |
| Track source updates | **Activity Feed** — real-time updates from 503 data sources |
| Explore history visually | **Timeline & Dashboard** — dynasty charts, translation trends, category analytics |
| Save and organize | **Collections, bookmarks, annotations** for personal study |
| Cite in research | **Citation export** (BibTeX, RIS, APA) for academic use |

## Quick Start

```bash
git clone https://github.com/xr843/fojin.git
cd fojin
cp .env.example .env        # edit POSTGRES_PASSWORD before starting
docker compose up -d         # database migrations run automatically
```

Then visit: **http://localhost:3000**

> API docs at http://localhost:8000/docs

After first startup, the platform has the database schema and source metadata but **no text content**. To import texts from public data sources:

```bash
# Import CBETA catalog (auto-scans local xml-p5 directory or fetches from remote)
docker exec fojin-backend python scripts/import_catalog.py

# Import CBETA full text content (requires xml-p5 repository)
docker exec fojin-backend python scripts/import_content.py --all --xml-dir /data/xml-p5

# Generate embeddings for AI Q&A (supports incremental processing)
docker exec fojin-backend python -m scripts.generate_embeddings --source cbeta

# Import SuttaCentral Early Buddhist Texts
docker exec fojin-backend python scripts/import_suttacentral.py

# See all available importers
ls backend/scripts/import_*.py
```

Each importer downloads data directly from the 

... (truncated)
Repository
298stars
55forks
View on GitHub
Details
DiscoveredMay 18, 2026
Last UpdatedMay 18, 2026
Author@xr843
Quality Score
63/100