-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectDocumentation.txt
More file actions
71 lines (48 loc) · 2.51 KB
/
Copy pathProjectDocumentation.txt
File metadata and controls
71 lines (48 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Unknown Unknown: Project Documentation
1. Project Overview
**Unknown Unknown** is a mobile-friendly AI chatbot platform for microlearning. Inspired by feed-based content discovery apps, it allows users to browse educational content in a swipable interface — vertically for switching topics, and horizontally for exploring subtopics within each topic. It aims to empower users to learn in fragmented time using interactive, AI-generated knowledge structures.
2. Use Case & User Flow
* Users open the app and scroll through a feed of "topics" (e.g., a book or knowledge theme).
* Each topic contains "subtopics" (e.g., chapters or ideas), which the user swipes through.
* Each subtopic provides a script (text), optional image, and a chatbot interface powered by GPT-4.
* Users can upload images (e.g., a photo of a book cover) or enter a description, and the system generates a new topic and subtopics using AI.
3. System Architecture
Backend
* **Language**: Python 3
* **Framework**: Flask
* **Authentication**: JWT
* **Database**: SQLite
* **AI Provider**: OpenAI (GPT-4)
* **File Handling**: base64 images
Data Model
* `User`: id, username, email, password\_hash
* `Topic`: id, title, description, cover\_image
* `Subtopic`: id, topic\_id, script, image\_url
* `UserSavedSubtopics`: user\_id, subtopic\_id, created\_at
4. Codebase Overview
| File | Responsibility |
| ------------------ | ------------------------------------------ |
| `app.py` | Registers blueprints, starts the Flask app |
| `db.py` | Manages SQLite DB schema and connections |
| `auth_routes.py` | Registration and login logic |
| `topic_routes.py` | Topic and subtopic listing/saving APIs |
| `chat_routes.py` | GPT-4 conversation per subtopic |
| `upload_routes.py` | Upload image via base64, return file path |
5. Functional Modules
5.1 Authentication
* `POST /register`
* `POST /login`
5.2 Topic/Subtopic
* `GET /topics` — all topics
* `GET /subtopics?topic_id=` — all subtopics for a topic
* `POST /save-subtopic` — save to user collection
* `GET /my-subtopics` — fetch saved subtopics
5.3 GPT Chat
* `POST /chat-with-subtopic` — Chat using context from selected subtopic
5.4 Upload
* `POST /upload-image` — Upload base64-encoded image and return image path
6. Future Expansion
* Topic generation via OCR + GPT-4
* Feed optimization and swipe gesture logic (frontend)
* User-generated summaries
* Integration with a persistent cloud DB and user analytics