Skip to content

Commit c74a9ea

Browse files
committed
Add local-device setup documentation and configuration
1 parent f17f78c commit c74a9ea

1 file changed

Lines changed: 116 additions & 0 deletions

File tree

QUICK_SETUP_LOCAL.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# ⚡ DAVID AI - 5 Minute Local Setup
2+
3+
## 🎯 What You Get
4+
5+
**Google Login** (No backend needed)
6+
**Local Chat Storage** (120-day auto-cleanup)
7+
**AI Models** (Auto-download from Hugging Face)
8+
**Device Only** (Zero cloud sync)
9+
**Open Source** (No backend code needed)
10+
11+
---
12+
13+
## 🚀 Setup Steps
14+
15+
### Step 1: Get Google Client ID (3 min)
16+
```
17+
1. Go to https://firebase.google.com/console
18+
2. Create new project "DAVID-AI"
19+
3. Add Android app
20+
4. Get Web Client ID from Settings
21+
```
22+
23+
### Step 2: Update Code (1 min)
24+
```kotlin
25+
// File: GoogleAuthManager.kt (Line 22)
26+
.requestIdToken("YOUR_WEB_CLIENT_ID") // ← Paste here
27+
```
28+
29+
### Step 3: Build & Run (1 min)
30+
```bash
31+
./gradlew installDebug
32+
```
33+
34+
### Step 4: First Launch (auto)
35+
- App downloads models
36+
- Google Sign-In works
37+
- Chat stored locally
38+
- **Done!**
39+
40+
---
41+
42+
## 📊 Storage Breakdown
43+
44+
```
45+
Chat History: ~1-10 MB (auto-deletes after 120 days)
46+
Models: ~1.5-3 GB (based on device RAM)
47+
App Size: ~50 MB
48+
49+
Total: 1.5-3.5 GB
50+
```
51+
52+
---
53+
54+
## 🔧 What Changed from Backend Version
55+
56+
| Feature | Backend | Local |
57+
|---------|---------|-------|
58+
| Storage | Cloud | Device |
59+
| Chat | Cloud DB | SQLite |
60+
| Models | Server | Hugging Face |
61+
| Auth | Custom | Google |
62+
| Sync | API | None |
63+
| Cost | $$/month | $0 |
64+
| Privacy | Server | All Local |
65+
66+
---
67+
68+
## ✨ Core Files
69+
70+
`auth/GoogleAuthManager.kt` - Google login
71+
`storage/ChatHistoryManager.kt` - Local chat storage
72+
`models/ModelManager.kt` - Model management
73+
`config/ModelConfig.kt` - Model URLs
74+
75+
---
76+
77+
## 🎓 Usage Examples
78+
79+
### Save Chat
80+
```kotlin
81+
chatHistoryManager.saveChatMessage(
82+
userId = "user123",
83+
userMessage = "Hello",
84+
assistantResponse = "Hi!"
85+
)
86+
```
87+
88+
### Get History
89+
```kotlin
90+
val history = chatHistoryManager.getRecentHistory(userId)
91+
```
92+
93+
### Download Models
94+
```kotlin
95+
val models = modelManager.getRecommendedModels()
96+
modelManager.downloadModel(model) { progress ->
97+
println("$progress%")
98+
}
99+
```
100+
101+
---
102+
103+
## ✅ Checklist
104+
105+
- [ ] Firebase project created
106+
- [ ] Web Client ID obtained
107+
- [ ] Code updated with ID
108+
- [ ] Build successful
109+
- [ ] APK installs
110+
- [ ] Google login works
111+
- [ ] Models download
112+
- [ ] Chat saves locally
113+
114+
---
115+
116+
**Zero Backend. 100% Local. Fully Private.**

0 commit comments

Comments
 (0)