TreeMap
A free, open-source disk-space visualizer. Squarified treemap, duplicate hunting, disk-full forecasting, and cleanup that only ever moves files to the Trash.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证DocTalk - AI-powered document reading and citation assistant
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Chat with any document. Get answers with citations that highlight the source.
Upload PDFs, Word docs, PowerPoints, spreadsheets, or any webpage — then ask questions in natural language. DocTalk returns AI-generated answers with numbered citations ([1], [2]) that link directly to the source text. Click a citation and the original passage highlights on the page.查看完整 README ↗Upload PDFs, Word docs, PowerPoints, spreadsheets, or any webpage — then ask questions in natural language. DocTalk returns AI-generated answers with numbered citations ([1], [2]) that link directly to the source text. Click a citation and the original passage highlights on the page.
| Layer | Technology |
|---|---|
| Frontend | Next.js 14 (App Router), Auth.js v5, react-pdf v9, Tailwind CSS, Radix UI, Zustand |
| Backend | FastAPI, Celery, Redis |
| Database | PostgreSQL 17, Qdrant (vector search) |
| Storage | Cloudflare R2 (S3-compatible; MinIO locally) |
| Auth | Auth.js v5 — Google OAuth, Microsoft OAuth, Email Magic Link |
| Payments | Stripe Checkout + Subscriptions |
| AI | DeepSeek V4 Flash/Pro for chat; OpenRouter for embeddings and fallback models |
| Parsing | Azure AI Document Intelligence, PyMuPDF, Tesseract OCR, python-docx, python-pptx, openpyxl, LibreOffice |
| PDF translation | RetainPDF sidecar, DeepSeek translation, Paddle/MinerU/Datalab OCR providers |
| Monitoring | Sentry, Vercel Analytics |
Browser ──→ Vercel (Next.js) ──→ Railway (FastAPI) ──→ PostgreSQL
│ │ Qdrant
│ │ Redis
└── API Proxy ──────────┘ Cloudflare R2
(JWT injection)
How it works: The reader is chat-native: users ask in natural language, and an action planner decides whether the request should use ordinary cited RAG, whole-document summary context, structured extraction, table scan/export, template guidance, document comparison clarification, or citation lookup. Documents are still chunked with bounding-box coordinates and embedded into Qdrant for local questions, but async work products return as artifact cards in the same chat instead of separate workspace tabs. Citations map back to exact page locations for real-time highlighting.
Parsing now also writes canonical document elements for headings, paragraphs, and detected tables. Chunk RAG remains the citation anchor and local Q&A path, while summaries, structured extraction, table questions, and semantic diff use element-aware coverage before falling back to chunk retrieval.
For PDF tables, production can use Azure AI Document Intelligence
prebuilt-layout to extract table cells, headers, merged-cell spans, and layout
regions before falling back to PyMuPDF. This keeps table export and table-aware
RAG grounded in table objects rather than ad hoc chunk reconstruction.
For detailed diagrams see docs/ARCHITECTURE.md.
# 1. Clone and configure
git clone https://github.com/Rswcf/DocTalk.git
cd DocTalk
cp .env.example .env # Edit with your keys
# 2. Start infrastructure
docker compose up -d # PostgreSQL, Qdrant, Redis, MinIO
# 3. Backend
cd backend
pip install -r requirements.txt
python3 -m alembic upgrade head
python3 -m uvicorn app.main:app --reload
# 4. Celery worker (separate terminal)
cd backend
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES python3 -m celery \
-A app.workers.celery_app worker --loglevel=info -Q default,parse
# 5. Frontend (separate terminal)
cd frontend
npm install && npm run dev
Open http://localhost:3000.
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YESis only required on macOS.
.env)| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string (postgresql+asyncpg://...) |
OPENROUTER_API_KEY | Yes | OpenRouter API key |
AUTH_SECRET | Yes | Random secret (shared with frontend) |
ADAPTER_SECRET | Yes | Secret for internal auth API |
STRIPE_SECRET_KEY | No | Stripe secret key |
STRIPE_WEBHOOK_SECRET | No | Stripe webhook signing secret |
SENTRY_DSN | No | Sentry DSN for error tracking |
OCR_ENABLED | No | Enable OCR for scanned PDFs (default: true) |
OCR_LANGUAGES | No | Installed Tesseract languages; the parser auto-selects a narrow subset per document by detected script (default: eng+chi_sim+jpn+kor+spa+deu+fra+por+ita+ara+hin+urd) |
FREE_LAYOUT_TRANSLATIONS_LIMIT | No | Free-plan lifetime trial count for layout-preserving PDF translation (default: 2) |
FREE_LAYOUT_TRANSLATION_MAX_PAGES | No | Free-plan page cap per layout-preserving PDF translation (default: 25) |
PLUS_LAYOUT_TRANSLATION_MAX_PAGES | No | Plus-plan page cap per layout-preserving PDF translation (default: 150) |
PRO_LAYOUT_TRANSLATION_MAX_PAGES | No | Pro-plan page cap per layout-preserving PDF translation (default: 300) |
LAYOUT_TRANSLATION_MAX_FILE_SIZE_MB | No | Hard file-size cap for layout-preserving PDF translation (default: 50) |
LAYOUT_TRANSLATION_ENGINE | No | Layout-preserving PDF translation engine. Set to retainpdf to enable the production sidecar flow |
RETAINPDF_API_BASE_URL | If layout translation is enabled |
.env.local)| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_API_BASE | Yes | Backend URL (default: http://localhost:8000) |
BACKEND_INTERNAL_URL | No | Server-side proxy target (private network). Preferred over NEXT_PUBLIC_API_BASE when set. |
AUTH_SECRET | Yes | Must match backend AUTH_SECRET |
ADAPTER_SECRET | Yes | Must match backend ADAPTER_SECRET. Used to HMAC-sign the X-Proxy-IP claim sent to the backend. |
GOOGLE_CLIENT_ID | Yes | Google OAuth client ID |
GOOGLE_CLIENT_SECRET | Yes | Google OAuth client secret |
MICROSOFT_CLIENT_ID | No | Microsoft OAuth client ID |
MICROSOFT_CLIENT_SECRET | No | Microsoft OAuth client secret |
RESEND_API_KEY | No | Resend API key for magic link emails |
DocTalk/
├── backend/
│ ├── app/
│ │ ├── api/ # Route handlers (documents, chat, search, billing, auth, users)
│ │ ├── core/ # Config, dependencies, SSRF protection, security logging
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── schemas/ # Pydantic request/response schemas
│ │ ├── services/ # Business logic (chat, credits, parsing, retrieval, extractors)
│ │ └── workers/ # Celery task definitions
│ ├── alembic/ # Database migrations
│ ├── seed_data/ # Demo PDF files
│ └── tests/
├── frontend/
│ ├── src/
│ │ ├── app/ # Next.js pages
│ │ ├── components/ # React components
│ │ ├── lib/ # API client, auth, SSE, utilities
│ │ ├── i18n/ # 11 language locale files
│ │ ├── store/ # Zustand state management
│ │ └── types/
│ └── public/
├── docs/
│ ├── ARCHITECTURE.md
│ ├── layout-translation-retainpdf.md
│ └── PRODUCT_STRATEGY.md
└── docker-compose.yml
Branching: main (development) / stable (production).
Backend-first ordering is MANDATORY post-C1 (2026-05-20) — see docs/ARCHITECTURE.md §10 for the HMAC IP trust contract migration that requires backend-first deploys. Because pushing stable triggers Vercel auto-deploy, railway up must run BEFORE the push.
git checkout stable && git merge main # merge but do NOT push yet
railway up --detach # 1. backend deploys FIRST (dual-accepts old + new contracts)
curl -fsS https://backend-production-a62e.up.railway.app/health # 2. wait until new build is healthy
git push origin stable # 3. NOW push — Vercel auto-deploys frontend
# 4. Wait for Vercel deployment to show "Ready" in the dashboard.
# 5. (C1 follow-up) Watch `grep proxy.signed_ip.legacy_path_used` in Railway
# logs for 24h before landing the legacy-removal change.
git checkout main
| Target | Method |
|---|---|
| Backend (Railway) | git checkout stable && git merge main && railway up --detach (deploy FIRST) |
| Frontend (Vercel) | After Railway is healthy, git push origin stable → auto-deploys. Root directory: frontend/. |
Railway runs the core services: backend, PostgreSQL, Redis, and Qdrant. Documents are stored in Cloudflare R2. Layout-preserving PDF translation additionally requires the RetainPDF sidecar.
DocTalk uses Semantic Versioning with pre-1.0 release numbers in 0.minor.patch
format. The source of truth is the repository root version.json.
0.2.0 means: major API stability has not been promised yet, but releases still
follow a predictable three-part version.python3 scripts/bump_version.py patch for bug-fix releases such as
0.2.0 -> 0.2.1.python3 scripts/bump_version.py minor for backward-compatible feature
releases such as 0.2.1 -> 0.3.0.python3 scripts/check_version_consistency.py to verify that
version.json, frontend/package.json, frontend/package-lock.json, and the
changelog stay in sync.Runtime release metadata is exposed at backend /version and included in /health.
The frontend footer also shows the current release label.
cd backend && python3 -m pytest tests/test_smoke.py -v # Smoke tests
cd backend && SKIP_INTEGRATION=0 python3 -m pytest -m integration -v # Integration tests
cd backend && python3 -m ruff check app/ tests/ # Lint
python3 scripts/check_version_consistency.py # Version metadata check
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
git checkout -b feature/amazing-feature)RetainPDF sidecar full API URL, usually http://...:41000 |
RETAINPDF_API_KEY | No | Optional RetainPDF sidecar API key |
RETAINPDF_OCR_PROVIDER | If layout translation is enabled | OCR provider for RetainPDF sidecar: datalab, paddle, or mineru |
RETAINPDF_PADDLE_TOKEN | If provider is Paddle | Paddle OCR token used by RetainPDF |
RETAINPDF_MINERU_TOKEN | If provider is MinerU | MinerU OCR token used by RetainPDF |
RETAINPDF_DATALAB_TOKEN | If provider is Datalab | Optional Datalab token override; when empty, PDF translation reuses DATALAB_API_KEY |
RETAINPDF_DATALAB_API_URL | No | Datalab API origin, default https://www.datalab.to |
RETAINPDF_DATALAB_MODE | No | Datalab conversion mode, default balanced |
RETAINPDF_DATALAB_OUTPUT_FORMAT | No | Datalab output formats, default json,markdown |
RETAINPDF_TRANSLATION_API_KEY | No | Optional override; when empty, PDF translation reuses DEEPSEEK_API_KEY |
RETAINPDF_TRANSLATION_BASE_URL | No | Translation API base URL, default https://api.deepseek.com/v1 |
RETAINPDF_TRANSLATION_MODEL | No | Translation model, default deepseek-flash |