450+ sources. 30 languages. 30 countries. One search.
Aggregating the world's Buddhist digital heritage — from the Chinese Tripitaka to Sanskrit manuscripts, Pali suttas to Tibetan texts — with full-text reading, AI-powered Q&A, knowledge graph, and multi-language parallel reading.
Live Demo · 中文文档 · Discord · Report Bug
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 450+ 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 local index with 450+ sources |
| Read the full text online | 4,488 fascicles available for online reading |
| Compare translations | Parallel reading in 30 languages side by side |
| Look up Buddhist terms | 6 dictionaries, 237K entries (Chinese/Sanskrit/Pali/English) |
| Explore relationships | Knowledge graph with 9,600+ entities and 3,800+ relations |
| View original manuscripts | IIIF manuscript viewer connected to BDRC and more |
| Ask questions about texts | AI Q&A ("XiaoJin") grounded in 11M characters of canonical text |
git clone https://github.com/xr843/fojin.git
cd fojin
cp .env.example .env
docker compose up -dThen visit: http://localhost:3000
API docs at http://localhost:8000/docs
Search across Buddhist canons by title, translator, catalog number, or full-text keyword. Powered by Elasticsearch with ICU tokenizer for multi-language support.
Read 4,488 fascicles of Buddhist texts online. Navigate by volume, scroll through content, and jump between related texts.
Compare translations side by side — Classical Chinese, Sanskrit, Pali, Tibetan, English, Japanese, Korean, Gandhari, and 21 more languages.
6 authoritative dictionaries with 237,593 entries:
- DDB (Digital Dictionary of Buddhism)
- SuttaCentral Glossary (Pali)
- NCPED (New Concise Pali-English Dictionary)
- NTI (Nan Tien Institute Buddhist Dictionary)
- Edgerton BHS (Buddhist Hybrid Sanskrit Dictionary)
- Monier-Williams (Sanskrit-English Dictionary)
9,600+ entities (persons, monasteries, texts, schools) and 3,800+ relationships, visualized as an interactive force-directed graph. Click any node to explore connections.
Ask questions in natural language. XiaoJin answers based on canonical Buddhist texts (38 core sutras, ~11M characters) using RAG (Retrieval-Augmented Generation). Every answer includes citations to the source text.
Browse digitized manuscripts and rare editions from BDRC and other institutions via IIIF protocol.
FoJin aggregates data from major Buddhist digital projects worldwide:
| Source | Content | Languages |
|---|---|---|
| CBETA | Chinese Buddhist Canon | Classical Chinese |
| SuttaCentral | Early Buddhist Texts | Pali, Chinese, English |
| 84000 | Tibetan Buddhist Canon | Tibetan, English, Sanskrit |
| BDRC | Tibetan manuscripts (IIIF) | Tibetan |
| SAT | Taisho Tripitaka | Chinese, Japanese |
| GRETIL | Sanskrit e-texts | Sanskrit |
| DSBC | Digital Sanskrit Buddhist Canon | Sanskrit |
| Gandhari.org | Gandhari manuscripts | Gandhari |
| VRI Tipitaka | Pali Canon (Chattha Sangayana) | Pali |
| Korean Tripitaka | Goryeo Tripitaka | Chinese, Korean |
| + 398 more... |
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite, Ant Design 5, Zustand, TanStack Query |
| Backend | FastAPI, SQLAlchemy (async), Pydantic v2 |
| Database | PostgreSQL 15 + pgvector + pg_trgm |
| Search | Elasticsearch 8 (ICU tokenizer) |
| Cache | Redis 7 |
| AI | Dify + RAG (vector + keyword dual retrieval) |
| Deploy | Docker Compose, Nginx (gzip_static, security headers) |
| CI | GitHub Actions |
+-----------+
| Nginx | (gzip, security headers, static cache)
+-----+-----+
|
+-----------+-----------+
| |
+-----+-----+ +-----+-----+
| React 18 | | FastAPI |
| (Vite) | | (async) |
+------------+ +-----+------+
|
+---------+-------+---------+
| | | |
+-----+ +----+--+ +--+---+ +---+----+
| PG 15 | | ES 8 | |Redis | | Dify |
|pgvector| | ICU | |cache | | RAG/AI |
+--------+ +------+ +------+ +--------+
# Backend
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txt
alembic upgrade head
uvicorn app.main:app --reload
# Frontend
cd frontend
npm install
npm run dev
# Tests
cd backend && pytest tests/ -q- Non-root containers (backend:
app, frontend:nginx) - Multi-stage Docker builds (no build tools in production)
- Internal services bound to
127.0.0.1only - Memory/CPU limits per container
- CSP, X-Frame-Options, X-Content-Type-Options headers
- Query length limits on all search parameters
- JWT with 8h expiry, production requires strong secret
Contributions are welcome! Whether it's adding a new data source, improving search, fixing bugs, or translating the UI — we'd love your help.
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
-
Citation export (BibTeX, RIS, APA) -
Mobile-responsive reader -
Public REST API with rate limiting -
User annotations -
Community-contributed data sources - Internationalization (i18n) — Japanese, Korean, Thai, Vietnamese UI
- OCR pipeline for scanned texts
- Embedding-based semantic search across all texts
- Collaborative annotation sharing
- API documentation and developer portal
- Integration with Zotero and reference managers
Apache License 2.0 — applies to FoJin source code only. Third-party data sources retain their own licenses (CC BY-NC-SA, CC0, CC BY-NC-ND, etc.). See NOTICE for details.
FoJin is built on the generous work of the global Buddhist digital humanities community. Special thanks to:
- CBETA — Chinese Buddhist Electronic Text Association
- SuttaCentral — Early Buddhist Texts
- BDRC — Buddhist Digital Resource Center
- 84000 — Translating the Words of the Buddha
- SAT — SAT Daizokyo Text Database
- All other data source providers listed in the Sources page
If FoJin is useful for your research, please consider giving it a star!
Discussions · Issues · Contributing · contact@fojin.app
Made with care for the Buddhist studies community.



