跳到正文
GitHub·· 7 天前AI 评分22

KnowFlow:阿拉伯语与英语双语文档问答 AI 智能体

tornidomaroc-web/knowflow

AI 导读

KnowFlow 是一款支持阿拉伯语(RTL)与英语的文档问答 AI 智能体,可上传 PDF、DOCX 或粘贴 URL,通过 Claude Haiku 实时流式输出带来源的答案,无需配置即可使用。技术栈为 Next.js 15、FastAPI、Claude Haiku、Supabase 与 Railway/Vercel,并设有带用量限制的 PRO 付费层。

正文

Chat with any document — Arabic & English AI agent, no setup required.

Live Demo TypeScript Claude API

Upload a PDF or paste a URL. Ask questions in Arabic or English.
KnowFlow streams answers in real time — sourced directly from your document.

Features

  • Bilingual: Arabic (RTL) + English in the same session
  • Streaming responses via Claude Haiku
  • PDF, DOCX, and URL ingestion
  • Authentication via Supabase
  • PRO tier with usage limits

Stack

Next.js 15 · FastAPI · Claude Haiku · Supabase · Railway · Vercel

Architecture

User → Next.js (Vercel)
         └→ FastAPI (Railway)
               └→ Claude Haiku (streaming)
               └→ Supabase (auth + storage)

Run locally

# Frontend
cd frontend && npm install && npm run dev

# Backend
cd backend && pip install -r requirements.txt
uvicorn main:app --reload
ANTHROPIC_API_KEY=
SUPABASE_URL=
SUPABASE_ANON_KEY=

Live

🌐 tryknowflow.com

Built by

AboJad — Full Stack AI Engineer, Marrakesh 🇲🇦

Secrets & API keys

Standing rule: one named API key per project per environment, living in exactly one location, never copied between projects. Give each environment its own distinctly named key (e.g. knowflow-dev, knowflow-prod) so rotating means replacing a single copy with none left to go stale. The recurring Anthropic key "exposures" across these repos were one key hand-copied between consumers, not a leak.

  • Local secrets live only in .env.local / .env (gitignored), never in a committed file.
  • Deployed secrets live only in the host env store (Vercel / Railway / etc.).
  • A pre-commit secrets scan (scripts/secrets_scan.py) blocks accidental commits; install it once per clone with powershell -ExecutionPolicy Bypass -File scripts/install_hooks.ps1.

来源:GitHub · github.com