中文 README · English
One-line · A unified research workbench for punctuation diff, multi-edition collation, commentary cross-reading, and version-lineage analysis of Buddhist canonical texts.
🛡️ Security · 🤝 Contributing · 🗺️ Roadmap · 📝 Changelog
See docs/screenshots/ — high-fidelity captures
with real data are tracked in #26.
A research workbench that unifies the textual-criticism workflow for Buddhist canonical texts: punctuation diff, multi-edition collation, commentary cross-reading, and version-lineage analysis. It integrates open scholarly resources (CBETA, DILA) and ships with a focused reading UI suited to long collation sessions.
| Module | Capability |
|---|---|
| Punctuation Diff | per-file multi-edition diff, sentence-level adjudication |
| Two-Edition Collation | line/char diff, variant-character recognition, decision tracking |
| Multi-Edition Collation | up to 31 editions in one workspace, auto-generated collation notes |
| Commentary Reading | sutra + commentaries side-by-side, cross-text citations |
| Version Lineage | variant clustering, lineage-graph generation |
| Collaboration | projects, members, roles, annotations, edit locks |
| Export | TXT / DOCX / collation-note CSV / full alignment table |
- Backend: Python 3.11 · FastAPI · SQLAlchemy (async) · PostgreSQL · Redis
- Frontend: React 18 · TypeScript · Vite · Zustand · Ant Design
- Infra: Docker Compose · nginx · Umami (optional analytics)
Architecture: docs/ARCHITECTURE.md · Auth: docs/AUTH.md · Collaboration: docs/COLLAB.md · Admin: docs/ADMIN.md
Don't want to set up the stack first? Browse examples/ for
public-domain samples. A single diff shows the kind of textual
variation this platform highlights and writes into a collation note.
diff examples/classical-chinese-sample/punctuated.txt \
examples/classical-chinese-sample/variant.txtOnce the platform is running, upload the two sample files to Two-Edition Collation or Punctuation Transfer to walk the full path locally.
- Python 3.11+
- Node.js 20+
- PostgreSQL 14+ and Redis 7+ (Docker is fine for development)
git clone https://github.com/xr843/Buddhist-Text-Collation.git
cd Buddhist-Text-Collation
cp .env.example .env
cp backend/.env.example backend/.env
# Generate SECRET_KEY
python3 -c "import secrets; print(secrets.token_urlsafe(48))"
# paste into backend/.env as SECRET_KEY# Backend
cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
# Frontend
cd ../frontend
npm install./start_backend.sh # http://localhost:8001
./start_frontend.sh # http://localhost:5173docker-compose up -d --buildSee docs/DEPLOYMENT_CHECKLIST.md and docs/WSL_SETUP.md for production guidance.
This repo does not redistribute copyrighted modern punctuated editions. Public sources you can wire up:
Large derived datasets (variant indices, alignment caches) are distributed via GitHub Releases, not committed to the repo.
Read the Deployment Requirements in SECURITY.md before exposing the platform publicly. Report vulnerabilities privately via GitHub Security Advisories — please do not open a public issue.
This project stands on the shoulders of:
- CBETA — Chinese Buddhist Electronic Text Association
- DILA — Dharma Drum Institute of Liberal Arts Digital Archives
- Variant Character Dictionary / Unihan / IDS
- Every researcher and volunteer who has quietly contributed to the digitization of canonical Buddhist texts.
GNU Affero General Public License v3.0.
AGPL was chosen so that derivative works — including network-deployed services — remain open, in keeping with the open-knowledge ethos of Buddhist textual scholarship.



