1. Project Overview
1.1 Core Value
LexiQuest is an intelligent vocabulary management and memorization system designed for learners preparing for high‑stakes English exams such as IELTS, TOEFL, and postgraduate entrance exams. It integrates efficient word capture + AI analysis + science‑based review + gamified motivation into a continuous learning loop.
1.2 Target Users
-
User profile:
- Age: 18–30
- Identity: University students, working professionals preparing to study abroad, postgraduate English exam candidates
- Traits: Frequently exposed to textbooks, past exam papers, and English articles, with a strong need to “record unknown words as they appear”
-
Usage scenarios:
- Fragmented memorization: On the subway/bus, open the app and complete today’s review task in 5–10 minutes.
- Batch input after reading: After reading practice tests or articles, batch import unknown words via photo capture and generate AI analysis immediately.
- Pre‑exam sprint: Set a daily word target and quickly drill high‑frequency core vocabulary.
-
Estimated user scale: For the MVP phase, target 10,000 seed users; within 3 months, retain 40% monthly active users.
1.3 MVP Scope
-
Included features:
- Quick login (WeChat one‑tap login / anonymous quick start)
- Official vocabulary book subscriptions (IELTS/TOEFL/Postgraduate exams)
- Multi‑modal word input (manual entry, photo OCR, clipboard import)
- AI word analysis (phonetics, definitions, exam‑style example sentences, mnemonics)
- Ebbinghaus‑based spaced repetition engine
- Test‑driven review (spelling, multiple choice, listening comprehension)
- Gamification system (levels, badges, streak calendar)
- Cloud sync (consistent data across devices)
-
Excluded features:
- Social features
- Offline mode
- Pronunciation scoring
-
Success metrics:
- Next‑day retention rate > 40%
- Average daily usage time per user > 15 minutes
- Average number of new words added per user per day > 5
- 7‑day task completion rate > 25%
2. Detailed Feature Requirements
2.1 Core Feature: Intelligent Word Input System
-
Goal: Minimize the cost of “recording new words” while ensuring that user input and AI output remain controllable and high quality.
-
User flow:
- Tap the “+” button on the home screen.
- Choose an input method:
- Manual input: Enter the word; the system provides real‑time suggestions (supports fuzzy matching).
- Photo recognition: Take a photo of test papers or reading materials; OCR automatically detects a list of words.
- Clipboard import: Detect English words or phrases in the clipboard and prompt “One‑tap import.”
- Enter a preview page with the AI‑generated word card.
- The user can choose “Add to vocabulary notebook” or “Ignore.”
-
Input and output definitions:
- Input:
word(string),image(image),clipboard_text(string) - Output: A complete word entry object containing:
spelling(word spelling)phonetic(phonetic transcription)pos(part of speech)definitions(list of definitions in Chinese)examples(exam‑style example sentences + translations)mnemonic(mnemonic phrase)collocations(common collocations, at least one)
- Input:
-
Boundary conditions:
- Spelling errors: The system suggests “Did you mean ___?” and allows the user to confirm.
- Multi‑word phrases: If a phrase is recognized, it is treated as a phrase entry; if it can’t be parsed, show “This phrase is not yet supported.”
- OCR failure: Show “Image could not be recognized” and provide a manual edit entry point.
-
Error handling:
- AI analysis failure: Return “basic word data (POS/definitions)” only; example sentences and mnemonics are left empty, with a hint “You can retry generation later.”
- Network errors: Show “Network unavailable, analysis temporarily not possible” and cache the pending analysis list.
-
UI/UX requirements:
- OCR screen shows a scanning animation; recognized results can be manually selected.
- The preview card provides an “Edit” entry so users can modify definitions or example sentences.
2.2 Core Feature: AI Automated Analysis Engine
2.3 Core Feature: Test‑Driven Review
2.4 Supporting Feature: Gamified Motivation
-
Streak calendar:
- Completing the day’s review task marks a daily check‑in.
- Consecutive check‑ins ≥ 7 days grant extra XP (+50).
-
Level system:
- XP is earned from correct reviews and consecutive streaks.
- Every 100 words mastered increases the user’s level by 1.
-
Badge system:
- Early Bird: Review completed before 8 a.m. for 7 consecutive days.
- Spelling Master: 100 consecutive spelling questions answered correctly.
- Sprint Expert: ≥ 100 new words added within 7 days.
-
Visual feedback:
- When a review succeeds, show an “XP gained” animation.
- When leveling up, play a level‑up animation.
3. Technical Architecture
3.1 Tech Stack
- Frontend: Uni‑app + Vue 3
- Backend: Node.js (NestJS)
- Database: PostgreSQL
- Cache: Redis
- AI Services: OpenAI GPT‑4o‑mini / Claude 3 Haiku
- OCR Services: TextIn / Baidu OCR
3.2 System Architecture
- Access layer: Nginx load balancing, SSL termination
- Business logic layer:
WordService: Word management and AI analysisStudyService: Review plan generation and algorithm calculationGameService: XP, levels, badges
- Data layer: PostgreSQL + Redis
3.3 Security Considerations
- JWT authentication
- AES encryption for sensitive data
- Rate limiting to prevent abuse
- Unified de‑identification and logging for OCR images and AI input content
4. Data Model Design
4.1 Core Entities
User
| Field | Type | Required | Description |
|---|---|---|---|
| id | UUID | Yes | Primary key |
| nickname | String | No | Nickname |
| avatar | String | No | Avatar URL |
| login_type | Enum | Yes | wechat / anonymous |
| created_at | Timestamp | Yes | Creation time |
Word
| Field | Type | Required | Description |
|---|---|---|---|
| id | UUID | Yes | Primary key |
| spelling | String | Yes | Unique index |
| phonetic | String | No | Phonetic transcription |
| definitions | JSONB | Yes | Part‑of‑speech + definitions |
| examples | JSONB | No | Example sentences + translations |
| mnemonic | Text | No | Mnemonic |
| collocations | JSONB | No | Common collocations |
UserWord
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | UUID | Yes | - | Primary key |
| user_id | UUID | Yes | - | User ID |
| word_id | UUID | Yes | - | Word ID |
| status | Enum | Yes | learning | learning / mastered / archived |
| next_review | Timestamp | Yes | now() | Next review time |
| interval | Int | Yes | 0 | Review interval stage |
| ease_factor | Float | Yes | 2.5 | Ease factor |
| wrong_count | Int | Yes | 0 | Number of wrong answers |
ReviewLog
| Field | Type | Required | Description |
|---|---|---|---|
| id | UUID | Yes | Primary key |
| user_word_id | UUID | Yes | Associated UserWord |
| test_type | Enum | Yes | spelling/choice/listen |
| quality | Int | Yes | 0–3 |
| created_at | Timestamp | Yes | Review time |
5. API Design
5.1 Get/Generate Word Analysis
- Path:
/api/v1/words/parse - Method: POST
- Request:
{
"word": "meticulous",
"target_exam": "IELTS",
"example_count": 2
}
{
"code": 200,
"data": {
"spelling": "meticulous",
"phonetic": "/məˈtɪkjələs/",
"definitions": [{"pos": "adj", "meaning": "meticulous; extremely careful"}],
"examples": [
{
"en": "He was meticulous in his preparation.",
"cn": "He prepared with meticulous care."
}
],
"mnemonic": "From the Latin root 'meticulōsus' meaning 'fearful' or 'overly careful' → meticulous, extremely careful.",
"collocations": ["meticulous planning"]
}
}
- Error codes:
- 400:
wordparameter missing - 422: Unable to parse
- 500: AI service failure
- 400:
5.2 Add to Vocabulary Notebook
- Path:
/api/v1/words/add - Method: POST
- Request:
{
"word_id": "uuid",
"user_id": "uuid"
}
{
"code": 200,
"data": {
"user_word_id": "uuid",
"next_review": "2023-10-27T08:00:00Z"
}
}
5.3 Get Today’s Review List
- Path:
/api/v1/study/today - Method: GET
- Response:
{
"code": 200,
"data": {
"total": 20,
"words": [
{
"user_word_id": "uuid",
"spelling": "meticulous",
"definition": "meticulous; extremely careful"
}
]
}
}
5.4 Submit Review Result
- Path:
/api/v1/study/review - Method: POST
- Request:
{
"user_word_id": "uuid",
"quality": 3,
"test_type": "spelling"
}
{
"code": 200,
"data": {
"next_review": "2023-10-27T08:00:00Z",
"exp_gained": 15,
"level_up": false
}
}
6. User Interface Design
6.1 Page Structure
- Home: Shows level progress, streak status, and today’s review workload.
- Vocabulary list: Supports search and categorization.
- Review mode: Immersive test‑style interface.
- Profile: Badge wall and learning statistics.
6.2 Design Guidelines
- Primary color:
#FF8C00 - Secondary color:
#1A237E - Fonts: Inter + PingFang SC
7. Detailed User Flows
7.1 Daily Review Flow
- Open the app; the home screen shows “20 words to review today.”
- Tap “Start review.”
- The system shows the Chinese meaning; the user types the spelling.
- If the spelling is correct: Play pronunciation, grant +5 XP, and move to the next word.
- If the spelling is incorrect: Show the correct spelling and require the user to copy it once.
- After all words are completed, show a daily report and rewards.
8. Non‑Functional Requirements
8.1 Performance
- AI analysis: Single‑word analysis < 3 seconds
- Home screen first paint < 1.5 seconds
8.2 Reliability & Availability
- Daily data backups
- Availability 99.5%
9. Testing Strategy
- Unit tests: Algorithm boundary conditions
- Integration tests: OCR → AI → DB data flow
- End‑to‑end tests: Simulate a full review flow using Appium
- Performance tests: 500 concurrent users reviewing simultaneously