AI Development Team Claude Sonnet 4.5 commited on
Commit
de24687
·
1 Parent(s): f051da6

docs: Add HuggingFace Space README for backend

Browse files

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. README.space.md +64 -0
README.space.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: AI Textbook Backend
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---
10
+
11
+ # AI-native Textbook Backend
12
+
13
+ FastAPI backend with RAG (Retrieval-Augmented Generation) capabilities for the Physical AI & Humanoid Robotics textbook platform.
14
+
15
+ ## Features
16
+
17
+ - **RAG Service**: OpenRouter-powered Q&A with Qdrant vector search
18
+ - **ChatKit Integration**: OpenAI ChatKit SDK compatible endpoints
19
+ - **Better-Auth Integration**: JWT authentication with Better-Auth service
20
+ - **Translation API**: Dynamic Urdu translation
21
+ - **Personalization**: User progress tracking and recommendations
22
+
23
+ ## Tech Stack
24
+
25
+ - FastAPI 0.109.0
26
+ - OpenAI SDK 1.12.0 (with OpenRouter)
27
+ - Qdrant Client 1.7.0
28
+ - PostgreSQL (Neon)
29
+ - Better-Auth JWT
30
+
31
+ ## Environment Variables
32
+
33
+ Required environment variables (set in Space Settings):
34
+
35
+ ```
36
+ OPENAI_API_KEY=your_openrouter_api_key
37
+ OPENAI_BASE_URL=https://openrouter.ai/api/v1
38
+ QDRANT_URL=your_qdrant_url
39
+ QDRANT_API_KEY=your_qdrant_api_key
40
+ NEON_DB_URL=your_neon_db_connection_string
41
+ SECRET_KEY=your_jwt_secret_key
42
+ BETTER_AUTH_URL=https://your-auth-space.hf.space
43
+ DEBUG=false
44
+ LOG_LEVEL=info
45
+ ```
46
+
47
+ ## API Endpoints
48
+
49
+ - `GET /` - Welcome message
50
+ - `GET /health` - Health check
51
+ - `POST /api/chatkit/chat` - ChatKit-compatible chat endpoint
52
+ - `POST /api/chat` - Standard chat endpoint
53
+ - `POST /api/auth/login` - User authentication
54
+ - `POST /api/auth/register` - User registration
55
+ - `GET /api/translation/translate` - Translation service
56
+ - `POST /api/rag/search` - RAG search
57
+
58
+ ## Documentation
59
+
60
+ Full API documentation available at: `/docs` (Swagger UI)
61
+
62
+ ## Repository
63
+
64
+ https://github.com/NaveedTechLab/AI-native-textbook1