Spaces:
Running
Running
Commit Β·
894a4c0
1
Parent(s): a43002d
docs: align README.md with Turbovec architecture and link new documents
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ pinned: false
|
|
| 11 |
|
| 12 |
**Tipitaka Web App** β ΰΉΰΈ§ΰΉΰΈΰΈΰΉΰΈ²ΰΈΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ£ΰΈΰΈ΄ΰΈΰΈ ΰΈΰΈΰΈ±ΰΈ ΰΈ‘ΰΈΰΈ£. ΰΉΰΈΰΈΰΈΰΈ΄ΰΈΰΈ§ΰΈ΄ΰΉΰΈ§ΰΈ ΰΈΰΈ£ΰΉΰΈΰΈ‘ AI ΰΈΰΈΉΰΉΰΈΰΉΰΈ§ΰΈ’ΰΈΰΈ±ΰΈΰΈΰΈ£ΰΈ΄ΰΈ’ΰΈ°
|
| 13 |
|
| 14 |
-
> **Stack:** React + Vite | FastAPI + Python | SQLite FTS5 | Qdrant
|
| 15 |
|
| 16 |
---
|
| 17 |
|
|
@@ -20,9 +20,9 @@ pinned: false
|
|
| 20 |
| Feature | Description |
|
| 21 |
|---------|-------------|
|
| 22 |
| **π Reader** | 45+ ΰΉΰΈ₯ΰΉΰΈ‘ΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ£ΰΈΰΈ΄ΰΈΰΈ β ΰΈ«ΰΈΰΉΰΈ²-ΰΈΰΉΰΈ-ΰΈ«ΰΈΰΉΰΈ², ΰΈΰΈ£ΰΈ±ΰΈΰΈΰΈΰΈ²ΰΈΰΈΰΈ±ΰΈ§ΰΈΰΈ±ΰΈΰΈ©ΰΈ£, 3 themes (dark/light/classic) |
|
| 23 |
-
| **π Hybrid Search** | FTS5 + Vector (Qdrant) + ONNX Reranker β ΰΈΰΈΉΰΈΰΈΰΉΰΈΰΈΰΈΰΈ±ΰΉΰΈ keyword ΰΉΰΈ₯ΰΈ°ΰΈΰΈ§ΰΈ²ΰΈ‘ΰΈ«ΰΈ‘ΰΈ²ΰΈ’ |
|
| 24 |
| **π€ AI Assistant** | Floating chat ΰΈΰΈ£ΰΉΰΈΰΈ‘ RAG context, ΰΈ£ΰΈΰΈΰΈ£ΰΈ±ΰΈ DeepSeek-chat / DeepSeek-reasoner |
|
| 25 |
-
| **π Cross-Volume RAG** | ΰΈΰΉΰΈΰΈΰΉΰΈ²ΰΈ‘ΰΉΰΈ₯ΰΉΰΈ‘ΰΈΰΈ²ΰΈ
|
| 26 |
| **π± Responsive** | Desktop + Mobile, swipe gesture, keyboard nav |
|
| 27 |
| **π¨ Markdown Rendering** | AI ΰΈΰΈΰΈΰΉΰΈΰΉΰΈ markdown ΰΈΰΈ£ΰΉΰΈΰΈ‘ prose-invert ΰΈͺΰΈ³ΰΈ«ΰΈ£ΰΈ±ΰΈ dark mode |
|
| 28 |
| **βοΈ Resizable Panel** | ΰΈ₯ΰΈ²ΰΈΰΈΰΈΰΈΰΈΰΈ§ΰΈ²ΰΉΰΈΰΈ·ΰΉΰΈΰΈΰΈ£ΰΈ±ΰΈΰΈΰΈΰΈ²ΰΈ AI chat β persist ΰΈΰΈΰΈ²ΰΈΰΉΰΈ§ΰΉ |
|
|
@@ -30,7 +30,7 @@ pinned: false
|
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
-
## ποΈ Architecture (
|
| 34 |
|
| 35 |
```
|
| 36 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -41,7 +41,7 @@ pinned: false
|
|
| 41 |
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
|
| 42 |
β HTTP / SSE
|
| 43 |
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ
|
| 44 |
-
β Backend (FastAPI Python 3.
|
| 45 |
β β
|
| 46 |
β ββββββββββββββ ββββββββββββββ ββββββββββββββ βββββββββββββ β
|
| 47 |
β β Page β β Search β β RAG β β LLM β β
|
|
@@ -49,12 +49,12 @@ pinned: false
|
|
| 49 |
β βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬ββββββ β
|
| 50 |
β β β β β β
|
| 51 |
β ββββββΌβββββ βββββββΌββββββ ββββββΌβββββ ββββββΌββββββ β
|
| 52 |
-
β β SQLite β β SQLite β β
|
| 53 |
-
β β FTS5 β β LIKE β β
|
| 54 |
-
β β (memory)β β fallback β β
|
| 55 |
-
β βββββββββββ βββββββββββββ
|
| 56 |
-
β
|
| 57 |
-
β Services: page_service Β· search_service Β· pali_utils
|
| 58 |
β rag_service Β· onnx_reranker Β· llm_service β
|
| 59 |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 60 |
```
|
|
@@ -63,7 +63,8 @@ pinned: false
|
|
| 63 |
|
| 64 |
```
|
| 65 |
οΏ½οΏ½οΏ½ΰΈ³ΰΈΰΈ²ΰΈ‘ β Pali Autocorrect β FTS5 (SQLite, 30 results)
|
| 66 |
-
ββ
|
|
|
|
| 67 |
β Merge & Deduplicate
|
| 68 |
β ONNX Rerank (jina-reranker-v2)
|
| 69 |
β Top N β AI context
|
|
@@ -95,10 +96,11 @@ RAG/
|
|
| 95 |
β βββ hooks/ # swipe, keyboard
|
| 96 |
β βββ lib/ # api.ts
|
| 97 |
β
|
| 98 |
-
βββ qdrant_storage/ # Local Qdrant data
|
| 99 |
-
βββ snapshots/ # Qdrant snapshot files
|
| 100 |
βββ Dockerfile # Multi-stage build
|
| 101 |
-
|
|
|
|
| 102 |
```
|
| 103 |
|
| 104 |
---
|
|
@@ -106,10 +108,9 @@ RAG/
|
|
| 106 |
## π Quick Start
|
| 107 |
|
| 108 |
### Prerequisites
|
| 109 |
-
- Python 3.
|
| 110 |
- Node.js 20+
|
| 111 |
-
- Ollama (for embedding β **jina-embeddings-
|
| 112 |
-
- Qdrant (optional β auto-detect localhost:6333)
|
| 113 |
- DeepSeek API key
|
| 114 |
|
| 115 |
### 1. Setup Backend
|
|
@@ -132,8 +133,8 @@ npm run dev # starts on :5173
|
|
| 132 |
|
| 133 |
### 3. Setup Embedding
|
| 134 |
```bash
|
| 135 |
-
# Download jina-embeddings-
|
| 136 |
-
ollama pull hf.co/second-state/jina-embeddings-
|
| 137 |
```
|
| 138 |
|
| 139 |
### 4. Run Tests
|
|
@@ -155,7 +156,7 @@ python -m pytest tests/ -v # 35 tests, all passing
|
|
| 155 |
| `GET` | `/api/search/suggestions?q=` | Autocomplete |
|
| 156 |
| `POST` | `/api/ask/stream` | AI ΰΈΰΈ²ΰΈ‘-ΰΈΰΈΰΈ (SSE streaming) |
|
| 157 |
| `POST` | `/api/ask` | AI ΰΈΰΈ²ΰΈ‘-ΰΈΰΈΰΈ (non-stream β Discord) |
|
| 158 |
-
| `GET` | `/api/ask/rag-status` | ΰΈͺΰΈΰΈ²ΰΈΰΈ° Qdrant |
|
| 159 |
| `GET` | `/health` | Health check |
|
| 160 |
|
| 161 |
---
|
|
@@ -184,8 +185,8 @@ Total: 35 tests β
|
|
| 184 |
| **Markdown** | react-markdown + remark-gfm |
|
| 185 |
| **Backend** | FastAPI, Python 3.11 |
|
| 186 |
| **Database** | SQLite (FTS5, loaded to `:memory:` at startup) |
|
| 187 |
-
| **Vector Store** |
|
| 188 |
-
| **Embedding** | jina-embeddings-
|
| 189 |
| **Reranker** | jina-reranker-v2-base-multilingual (ONNX, CPU) |
|
| 190 |
| **AI** | DeepSeek API (OpenAI-compatible, SSE streaming) |
|
| 191 |
| **CI/CD** | HF Spaces (Docker multi-stage, auto-build) |
|
|
@@ -198,15 +199,18 @@ Total: 35 tests β
|
|
| 198 |
|------|-------------|
|
| 199 |
| `DESIGN.md` | Design system β colors, typography, components, themes |
|
| 200 |
| `PRODUCT.md` | Product vision, users, principles |
|
| 201 |
-
| `
|
| 202 |
-
| `
|
|
|
|
|
|
|
| 203 |
|
| 204 |
---
|
| 205 |
|
| 206 |
## π Acknowledgements
|
| 207 |
|
| 208 |
- **ΰΈ‘ΰΈ«ΰΈ²ΰΈΰΈΈΰΈ¬ΰΈ²ΰΈ₯ΰΈΰΈΰΈ£ΰΈΰΈ£ΰΈ²ΰΈΰΈ§ΰΈ΄ΰΈΰΈ’ΰΈ²ΰΈ₯ΰΈ±ΰΈ’ (MCU)** β ΰΉΰΈΰΈ·ΰΉΰΈΰΈ«ΰΈ²ΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ£ΰΈΰΈ΄ΰΈΰΈ
|
| 209 |
-
- **
|
|
|
|
| 210 |
- **jina.ai** β Embedding + Reranker models
|
| 211 |
- **Ollama** β Local model serving
|
| 212 |
- **Hugging Face Spaces** β Deployment platform
|
|
|
|
| 11 |
|
| 12 |
**Tipitaka Web App** β ΰΉΰΈ§ΰΉΰΈΰΈΰΉΰΈ²ΰΈΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ£ΰΈΰΈ΄ΰΈΰΈ ΰΈΰΈΰΈ±ΰΈ ΰΈ‘ΰΈΰΈ£. ΰΉΰΈΰΈΰΈΰΈ΄ΰΈΰΈ§ΰΈ΄ΰΉΰΈ§ΰΈ ΰΈΰΈ£ΰΉΰΈΰΈ‘ AI ΰΈΰΈΉΰΉΰΈΰΉΰΈ§ΰΈ’ΰΈΰΈ±ΰΈΰΈΰΈ£ΰΈ΄ΰΈ’ΰΈ°
|
| 13 |
|
| 14 |
+
> **Stack:** React + Vite | FastAPI + Python | SQLite FTS5 | Turbovec In-Process (Primary) / Qdrant (Secondary) | ONNX Reranker | DeepSeek API
|
| 15 |
|
| 16 |
---
|
| 17 |
|
|
|
|
| 20 |
| Feature | Description |
|
| 21 |
|---------|-------------|
|
| 22 |
| **π Reader** | 45+ ΰΉΰΈ₯ΰΉΰΈ‘ΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ£ΰΈΰΈ΄ΰΈΰΈ β ΰΈ«ΰΈΰΉΰΈ²-ΰΈΰΉΰΈ-ΰΈ«ΰΈΰΉΰΈ², ΰΈΰΈ£ΰΈ±ΰΈΰΈΰΈΰΈ²ΰΈΰΈΰΈ±ΰΈ§ΰΈΰΈ±ΰΈΰΈ©ΰΈ£, 3 themes (dark/light/classic) |
|
| 23 |
+
| **π Hybrid Search** | FTS5 + Vector (Turbovec / Qdrant) + ONNX Reranker β ΰΈΰΈΉΰΈΰΈΰΉΰΈΰΈΰΈΰΈ±ΰΉΰΈ keyword ΰΉΰΈ₯ΰΈ°ΰΈΰΈ§ΰΈ²ΰΈ‘ΰΈ«ΰΈ‘ΰΈ²ΰΈ’ |
|
| 24 |
| **π€ AI Assistant** | Floating chat ΰΈΰΈ£ΰΉΰΈΰΈ‘ RAG context, ΰΈ£ΰΈΰΈΰΈ£ΰΈ±ΰΈ DeepSeek-chat / DeepSeek-reasoner |
|
| 25 |
+
| **π Cross-Volume RAG** | ΰΈΰΉΰΈΰΈΰΉΰΈ²ΰΈ‘ΰΉΰΈ₯ΰΉΰΈ‘ΰΈΰΈ²ΰΈ Turbovec index / Qdrant + jina-embeddings-v5, rerank ΰΈΰΉΰΈ§ΰΈ’ jina-reranker-v2 |
|
| 26 |
| **π± Responsive** | Desktop + Mobile, swipe gesture, keyboard nav |
|
| 27 |
| **π¨ Markdown Rendering** | AI ΰΈΰΈΰΈΰΉΰΈΰΉΰΈ markdown ΰΈΰΈ£ΰΉΰΈΰΈ‘ prose-invert ΰΈͺΰΈ³ΰΈ«ΰΈ£ΰΈ±ΰΈ dark mode |
|
| 28 |
| **βοΈ Resizable Panel** | ΰΈ₯ΰΈ²ΰΈΰΈΰΈΰΈΰΈΰΈ§ΰΈ²ΰΉΰΈΰΈ·ΰΉΰΈΰΈΰΈ£ΰΈ±ΰΈΰΈΰΈΰΈ²ΰΈ AI chat β persist ΰΈΰΈΰΈ²ΰΈΰΉΰΈ§ΰΉ |
|
|
|
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
## ποΈ Architecture (Turbovec Edition)
|
| 34 |
|
| 35 |
```
|
| 36 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 41 |
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
|
| 42 |
β HTTP / SSE
|
| 43 |
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ
|
| 44 |
+
β Backend (FastAPI Python 3.13) β
|
| 45 |
β β
|
| 46 |
β ββββββββββββββ ββββββββββββββ ββββββββββββββ βββββββββββββ β
|
| 47 |
β β Page β β Search β β RAG β β LLM β β
|
|
|
|
| 49 |
β βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬ββββββ β
|
| 50 |
β β β β β β
|
| 51 |
β ββββββΌβββββ βββββββΌββββββ ββββββΌβββββ ββββββΌββββββ β
|
| 52 |
+
β β SQLite β β SQLite β β Turbovecβ β DeepSeek β β
|
| 53 |
+
β β FTS5 β β LIKE β β Index / β β API β β
|
| 54 |
+
β β (memory)β β fallback β β Qdrant β β Streamingβ β
|
| 55 |
+
β βββββββββββ βββββββββββββ βββββββββββ ββββββββββββ β
|
| 56 |
+
β β
|
| 57 |
+
β Services: page_service Β· search_service Β· pali_utils β
|
| 58 |
β rag_service Β· onnx_reranker Β· llm_service β
|
| 59 |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 60 |
```
|
|
|
|
| 63 |
|
| 64 |
```
|
| 65 |
οΏ½οΏ½οΏ½ΰΈ³ΰΈΰΈ²ΰΈ‘ β Pali Autocorrect β FTS5 (SQLite, 30 results)
|
| 66 |
+
ββ Turbovec Index (jina-embeddings-v5, 30 results)
|
| 67 |
+
β SQLite Content Enrichment
|
| 68 |
β Merge & Deduplicate
|
| 69 |
β ONNX Rerank (jina-reranker-v2)
|
| 70 |
β Top N β AI context
|
|
|
|
| 96 |
β βββ hooks/ # swipe, keyboard
|
| 97 |
β βββ lib/ # api.ts
|
| 98 |
β
|
| 99 |
+
βββ qdrant_storage/ # Local Qdrant data (optional fallback)
|
| 100 |
+
βββ snapshots/ # Qdrant snapshot files (optional fallback)
|
| 101 |
βββ Dockerfile # Multi-stage build
|
| 102 |
+
βββ TIPITAKA_WEB_ARCHITECTURE_TURBOVEC.md # Main architecture doc (Turbovec)
|
| 103 |
+
βββ SEARCH_ARCHITECTURE_TURBOVEC.md # Search specification (Turbovec)
|
| 104 |
```
|
| 105 |
|
| 106 |
---
|
|
|
|
| 108 |
## π Quick Start
|
| 109 |
|
| 110 |
### Prerequisites
|
| 111 |
+
- Python 3.13+
|
| 112 |
- Node.js 20+
|
| 113 |
+
- Ollama (for embedding β **jina-embeddings-v5-small-retrieval**)
|
|
|
|
| 114 |
- DeepSeek API key
|
| 115 |
|
| 116 |
### 1. Setup Backend
|
|
|
|
| 133 |
|
| 134 |
### 3. Setup Embedding
|
| 135 |
```bash
|
| 136 |
+
# Download jina-embeddings-v5 GGUF
|
| 137 |
+
ollama pull hf.co/second-state/jina-embeddings-v5-text-small-retrieval-GGUF:v5-small-retrieval-Q6_K.gguf
|
| 138 |
```
|
| 139 |
|
| 140 |
### 4. Run Tests
|
|
|
|
| 156 |
| `GET` | `/api/search/suggestions?q=` | Autocomplete |
|
| 157 |
| `POST` | `/api/ask/stream` | AI ΰΈΰΈ²ΰΈ‘-ΰΈΰΈΰΈ (SSE streaming) |
|
| 158 |
| `POST` | `/api/ask` | AI ΰΈΰΈ²ΰΈ‘-ΰΈΰΈΰΈ (non-stream β Discord) |
|
| 159 |
+
| `GET` | `/api/ask/rag-status` | ΰΈͺΰΈΰΈ²ΰΈΰΈ° Turbovec/Qdrant |
|
| 160 |
| `GET` | `/health` | Health check |
|
| 161 |
|
| 162 |
---
|
|
|
|
| 185 |
| **Markdown** | react-markdown + remark-gfm |
|
| 186 |
| **Backend** | FastAPI, Python 3.11 |
|
| 187 |
| **Database** | SQLite (FTS5, loaded to `:memory:` at startup) |
|
| 188 |
+
| **Vector Store** | Turbovec (Primary in-process index), Qdrant (Secondary fallback) |
|
| 189 |
+
| **Embedding** | jina-embeddings-v5-small-retrieval (GGUF via Ollama / sentence-transformers) |
|
| 190 |
| **Reranker** | jina-reranker-v2-base-multilingual (ONNX, CPU) |
|
| 191 |
| **AI** | DeepSeek API (OpenAI-compatible, SSE streaming) |
|
| 192 |
| **CI/CD** | HF Spaces (Docker multi-stage, auto-build) |
|
|
|
|
| 199 |
|------|-------------|
|
| 200 |
| `DESIGN.md` | Design system β colors, typography, components, themes |
|
| 201 |
| `PRODUCT.md` | Product vision, users, principles |
|
| 202 |
+
| `TIPITAKA_WEB_ARCHITECTURE_TURBOVEC.md` | Main architecture document (Turbovec Edition) |
|
| 203 |
+
| `SEARCH_ARCHITECTURE_TURBOVEC.md` | Search Architecture Specification (Turbovec Edition) |
|
| 204 |
+
| `Tipitaka-Web-Application-Tech-Stack-TURBOVEC-HF.md` | Tech Stack & HF Spaces Deployment (Turbovec Edition) |
|
| 205 |
+
| `TIPITAKA_WEB_ARCHITECTURE_V2.md` | Full architecture V2 document (Legacy Qdrant version) |
|
| 206 |
|
| 207 |
---
|
| 208 |
|
| 209 |
## π Acknowledgements
|
| 210 |
|
| 211 |
- **ΰΈ‘ΰΈ«ΰΈ²ΰΈΰΈΈΰΈ¬ΰΈ²ΰΈ₯ΰΈΰΈΰΈ£ΰΈΰΈ£ΰΈ²ΰΈΰΈ§ΰΈ΄ΰΈΰΈ’ΰΈ²ΰΈ₯ΰΈ±ΰΈ’ (MCU)** β ΰΉΰΈΰΈ·ΰΉΰΈΰΈ«ΰΈ²ΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ£ΰΈΰΈ΄ΰΈΰΈ
|
| 212 |
+
- **Turbovec** β In-process vector database
|
| 213 |
+
- **Qdrant** β Vector database (Legacy/Alternative)
|
| 214 |
- **jina.ai** β Embedding + Reranker models
|
| 215 |
- **Ollama** β Local model serving
|
| 216 |
- **Hugging Face Spaces** β Deployment platform
|