Product Design Study App - Developer Guide
๐ Overview
This is a single-page web application for studying Product Design coursework. Itโs built with vanilla JavaScript, HTML, and CSS (no frameworks) and includes Firebase authentication and Firestore database for progress tracking. The app provides five study modes: flashcards, quiz questions, long questions, time trials, and Topic Targets (AI-powered personalized practice).
โ
Latest Additions
- Weekly leaderboard on the landing screen combining quiz, time-trial and other logged sessions (top 5 over last 7 days). Data pulled from
leaderboards/weekly, populated by a scheduled aggregation job (see cloud_functions/weeklyLeaderboard.js).
- Long-question marking workspace now supports AI-generated feedback via a Cloudflare Worker (
cloudflare/workers/long-answer-marker.js). The UI stores user answers, shows WWW/EBI feedback, animated โMarkingโฆโ state, and disables the button until at least five words are entered.
- Long-question list + detail layout refresh: slim cards with marks badge, dedicated โShow mark schemeโ button, always-on text area with larger height, and a detailed feedback panel.
- All Topics UI polish: back-button styling matches the neutral All Topics accent; long-question cards grow vertically without stretching horizontally.
- Documentation updates:
docs/weekly-leaderboard-setup.md explains the Firebase Functions deployment (and the current limitation, since Functions isnโt on the free tier).
- Daily streak tracking: client records study streak metadata (current/longest) and surfaces it in the header and account screen, with flame flair from day 3 onward.
๐๏ธ Architecture
Core Files
index.html - Main HTML structure with all screens/sections
app.js - All application logic (state management, navigation, Firebase auth, study modes, Firestore integration)
styles.css - All styling (CSS custom properties, responsive design, animations)
Data Structure
/product_design/
/flashcards/ # JSON files with Q&A flashcards for each topic
/topic_questions/ # JSON files with multiple-choice questions
/long_questions/ # JSON files with extended response questions (optional)
/papers/ # Past papers (not currently used in UI)
/mark_schemes/ # Mark schemes (not currently used in UI)
๐ฅ Firebase Integration
Services Used
- Firebase Authentication - Google Sign-In
- Cloud Firestore - User progress tracking
External helpers
- Cloudflare Worker (
cloudflare/workers/long-answer-marker.js) โ handles AI marking requests securely outside the client.
- Weekly scoreboard job (
cloud_functions/weeklyLeaderboard.js) โ sample Node script to aggregate sessions into leaderboards/weekly. Needs a trusted scheduler (Cloud Functions, Cloud Run Job, etc.).
Configuration
Located at top of app.js:
- Uses Firebase v10.7.1 (compat mode)
- Google Sign-In provider configured
- Auth state persistence enabled
- Firestore database for progress storage
Firestore Data Structure
users/{userId}/
- profile: {
displayName: string,
email: string,
photoURL: string,
lastActivity: timestamp,
updatedAt: timestamp
}
- streak: {
current: number,
longest: number,
lastStudyDate: 'YYYY-MM-DD',
updatedAt: timestamp
}
/progress/{topicId}
- flashcards: {
[cardId]: {
confidence: "easy" | "medium" | "hard",
lastReviewed: timestamp,
reviewCount: number
}
}
- questions: {
[questionId]: {
correct: boolean,
lastAttempted: timestamp,
attemptCount: number,
correctCount: number
}
}
- metadata: {
lastUpdated: timestamp
}
/sessions/{sessionId} // Study session logging (reserved for future use)
leaderboards/
weekly: {
generatedAt: timestamp,
rangeStart: timestamp,
entries: [
{
userId: string,
displayName: string,
photoURL: string | null,
totalScore: number,
totalSessions: number,
breakdown: { [sessionType: string]: number }
}
]
}
Key Features
- Daily streak tracker: Updates after each logged session and surfaces current/best streaks in header/account UI (client-managed within user profile doc).
- Weekly leaderboard feed: Client reads
leaderboards/weekly (public read, write restricted). Aggregation is handled by shared server code (cloud_functions/weeklyLeaderboard.js) or another trusted cron job.
- Progress Syncing: Flashcard ratings and quiz attempts saved to Firestore
- Batched Updates: Efficient flashcard progress syncing (reduces Firestore writes)
- Cross-Device Sync: Progress accessible from any device when signed in
- Topic Breakdown: Visual progress analytics per topic in account page
- Offline Persistence: Firestore offline persistence with tab synchronization
- Cache Optimization: 5-minute TTL cache for topic breakdown to reduce Firebase reads
- Unlimited Cache Size: Firestore configured with CACHE_SIZE_UNLIMITED for optimal performance
๐จ Design System
Colors
- Light Mode:
- Background:
#fafafa
- Surface:
#ffffff
- Accent:
#3b82f6
- Success:
#10b981
- Error:
#ef4444
- Warning:
#f59e0b
- Dark Mode:
- Background:
#1a1a1a
- Surface:
#242424
- Accent:
#5b9cf6
- Success:
#4ade80
- Error:
#f87171
- Warning:
#fbbf24
Topic Colors
6 pastel rainbow colors assigned cyclically to topics:
pastelColors: [
'#E57373', // Soft Red
'#FFB74D', // Soft Orange
'#FFD54F', // Soft Yellow
'#81C784', // Soft Green
'#64B5F6', // Soft Blue
'#BA68C8', // Soft Purple
]
Key Design Elements
- Rounded corners: All elements use border-radius variables
- Smooth transitions: 250ms cubic-bezier animations
- Pill-shaped buttons:
border-radius: var(--radius-full)
- Multi-segment progress bars: Color-coded progress visualization
- Responsive design: Mobile-first approach with breakpoints
๐ Authentication & User Management
Authentication Flow
- User clicks โSign in with Googleโ
- Firebase popup authentication
- User data stored in
app.currentUser
- UI updates to show user info
- Progress data loaded from Firestore
User Interface
- Sign-in button: Google OAuth popup
- Signed-in state: Shows user avatar, name, and account button
- Account page: Profile management, theme selection, progress analytics
Key Functions
initAuth() - Sets up auth state listener
updateAuthUI() - Updates UI based on auth state
signInWithGoogle() - Triggers Google sign-in popup
signOut() - Signs user out and clears local state
๐ Content Structure
10 Topics
Each topic has metadata in app.topicMeta object:
-
| Materials (Topic 1) - Flashcards โ |
Questions โ |
-
| Performance Characteristics (Topic 2) - Flashcards โ |
Questions โ |
-
| Processes & Techniques (Topic 3) - Flashcards โ |
Questions โ (150 questions) |
-
| Digital Technologies (Topic 4) - Flashcards โ |
Questions โ |
-
| Factors Influencing Development (Topic 5) - Flashcards โ |
Questions โ |
-
| Effects of Technological Developments (Topic 6) - Flashcards โ |
Questions โ |
-
| Safe Working Practices & Risk Assessment (Topic 7) - Flashcards โ |
Questions โ |
-
| Features of Manufacturing Industries (Topic 8) - Flashcards โ |
Questions โ |
-
| Designing for Maintenance & Environment (Topic 9) - Flashcards โ |
Questions โ |
- Exam Tips - Flashcards โ
Each topic can have:
- Flashcards file (JSON with question/answer pairs)
- Questions file (JSON with multiple-choice questions)
- Long questions file (JSON with extended response questions)
Data Preloading
- All topic data preloaded in background on app init
- Cached in
app.topicDataCache for instant access
- No loading screens - immediate navigation
๐ฎ Study Modes
1. Flashcards Mode
- Location:
#flashcard-screen
- Features:
- Flip animation (click to reveal answer)
- Traffic light confidence rating (easy/medium/hard)
- Previous/Next navigation
- Keyboard shortcuts (Space to flip, Arrow keys to navigate)
- Progress synced to Firestore (batched updates)
- Progress bar showing position in deck
2. Quiz Questions Mode
- Location:
#question-screen
- Features:
- Multiple choice (4 options)
- Instant feedback (green for correct, red for incorrect)
- Score tracking
- Progress saved to Firestore per question
- Results screen with:
- Final score and percentage
- Grade calculation (A*, A, B, C, D, E, U)
- Time taken
- Question review with answers
- Keyboard shortcuts (1-4 for answers, Arrow keys to navigate)
3. Long Questions Mode
- Location:
#long-question-screen
- Features:
- Extended response practice questions with larger workspace and WWW/EBI feedback panel.
- Separate โShow mark schemeโ button, keeping the main CTA for AI-assisted marking.
- AI marking (via
cloudflare/workers/long-answer-marker.js) submits the question, marks, scheme, and user response to OpenAI and renders marks/feedback inline. Disabled until five words are entered; animated โMarkingโฆโ state while awaiting response.
- Previous/Next navigation and progress bar remain for manual review.
4. Time Trials Mode
- Location:
#time-trials-settings-screen โ #time-trials-quiz-screen
- Features:
- Configurable duration (1, 2, 5, 10 minutes)
- Multi-topic selection
- Optional answer feedback during trial
- Score system: +1 correct, -2 incorrect
- Seeded question shuffling (changes every minute)
- Countdown (3-2-1) before starting
- Timer with visual warnings (amber at 30s, red at 10s)
- Results screen with detailed breakdown
5. Topic Targets Mode โญ NEW
- Location:
#topic-targets-screen
- Description: AI-powered personalized practice based on your progress data
- Requires: User must be signed in with existing progress data
- Features:
- Smart Selection Algorithm:
- Flashcards: Selects 1 easy, 2 medium, 2 hard (5 total)
- Questions: Selects 4 previously incorrect, 1 correct (5 total)
- Mixed Content: Combines flashcards and questions in one session
- Topic-Aware: Pulls from all topics based on actual performance
- Progress Tracking: All ratings/answers saved to Firestore
- Auto-Invalidation: Updates topic breakdown cache automatically
- Disabled State: Button disabled when user not signed in
- Access: Via target icon button in top navigation (when signed in)
- Algorithm:
- Flashcards selected from progress data (confidence ratings)
- Questions selected from progress data (correctness history)
- Falls back to random selection if not enough progress data
- Prioritizes content that needs the most review
Quick Access
- Time Trials button on homepage for direct access
- Topic Targets button in top navigation (requires sign-in)
- Mode cards show available content per topic
๐งญ Navigation System
Screen Management
- Single screen active at a time (
.screen.active)
app.navigateTo(screenId) handles transitions
app.currentScreen tracks current location
- Back button (
app.goBack()) on all sub-screens
- Progress bar visibility managed per screen type
Screen Flow
landing-screen (homepage)
โ select topic
mode-screen (flashcards, questions, or long questions)
โ select mode
flashcard-screen OR question-screen OR long-question-screen
โ complete
results-screen (questions only)
OR
landing-screen
โ click Time Trials
time-trials-settings-screen
โ configure & start
time-trials-countdown-screen (3-2-1)
โ auto-advance
time-trials-quiz-screen
โ time up
time-trials-results-screen
OR
landing-screen
โ click account button
account-screen
โ view profile, theme, progress breakdown
OR โญ NEW
landing-screen
โ click Topic Targets (signed in only)
topic-targets-screen
โ complete personalized practice
landing-screen (auto-return after completion)
All Screens (12 total)
landing-screen - Homepage with topic cards
mode-screen - Study mode selection
flashcard-screen - Flashcard study
question-screen - Quiz questions
long-question-screen - Extended response questions
results-screen - Quiz results
time-trials-settings-screen - Time trials configuration
time-trials-countdown-screen - 3-2-1 countdown
time-trials-quiz-screen - Time trials quiz
time-trials-results-screen - Time trials results
account-screen - User profile and settings
topic-targets-screen - Personalized practice โญ NEW
๐ฏ State Management
App Object (app)
Centralized state in app.js:
{
// User
currentUser: null,
darkMode: false,
// Navigation
currentScreen: 'landing',
currentTopic: null,
currentTopicColor: null,
currentMode: null,
currentIndex: 0,
// Data
topics: [],
flashcards: [],
questions: [],
longQuestions: [],
topicDataCache: {}, // Preloaded topic data for instant access
// Session
score: 0,
totalAnswered: 0,
sessionProgress: {},
quizAnswers: [],
quizStartTime: null,
quizEndTime: null,
// Flashcard progress (batched syncing)
flashcardProgressQueue: {},
progressSyncTimeout: null,
// Topic Breakdown Cache (5-minute TTL) โญ NEW
topicBreakdownCache: {
data: null, // Cached HTML string
timestamp: null, // When cache was created
maxAge: 5 * 60 * 1000 // 5 minutes in milliseconds
},
// Topic Targets โญ NEW
topicTargets: {
flashcards: [], // Selected flashcards (5 total: 1 easy, 2 medium, 2 hard)
questions: [], // Selected questions (5 total: 4 wrong, 1 correct)
currentIndex: 0,
currentType: null, // 'flashcard' or 'question'
score: 0,
totalAnswered: 0
},
// Time Trials
timeTrials: { ... }
}
Data Manager (dataManager)
Firestore operations module with helper functions:
Collection Management:
isFirestoreAvailable() - Check Firestore connection
getUserDoc(userId) - Get user document reference
getUserProgressCollection(userId) - Get progress subcollection
getUserSessionsCollection(userId) - Get sessions subcollection (reserved)
User Operations:
saveUserProfile(userId, data) - Create/update user profile with lastActivity timestamp
Progress Operations:
saveFlashcardProgress(userId, topicId, cardId, confidence) - Save individual flashcard rating
batchSaveFlashcardProgress(userId, topicId, progressQueue) - Efficient batch update
saveQuizQuestionProgress(userId, topicId, questionId, isCorrect) - Save quiz attempt
getAllTopicsProgress(userId) - Fetch all progress data
getTopicProgress(userId, topicId) - Get specific topic progress
Preferences:
savePreferences(userId, preferences) - Save user settings (theme, etc.)
getPreferences(userId) - Load user settings
Progress Syncing Strategy
- Flashcards: Queued and batched every 2 seconds to reduce writes
- Quiz Questions: Saved immediately after each answer
- Force Sync: On navigation away from flashcard screen
- Data Reconstruction: Converts Firestore flat keys to nested objects
- Cache Invalidation: Topic breakdown cache cleared when progress changes โญ NEW
- Offline Support: Firestore persistence allows offline progress tracking
๐จ UI Components
Topic Cards
- Grid layout with auto-fill columns
- Shows available study modes (โ or โ)
- Topic color accent
- Hover effects with scale and shadow
- Click to select topic
Mode Cards
- Flashcards, Quiz Questions, Long Questions
- Icon + title + description
- Card count pills
- Anki download button (flashcards only)
- Location: Top navigation bar (between user info and account button)
- Icon: Target/bullseye SVG with concentric circles
- States:
- Disabled: When user not signed in (greyed out, no hover)
- Enabled: When user signed in (blue accent color, hover effects)
- Styling:
- Pill-shaped button matching design system
- Blue accent color (#3b82f6 light mode, #5b9cf6 dark mode)
- Smooth transitions and transform effects
- Active state with scale animation
Anki Export
- Location: Mode selection screen (flashcards card)
- Format: Tab-separated text file (.txt)
- Structure: Front[TAB]Back[TAB]Tags
- Features:
- UTF-8 encoding for Anki compatibility
- Newlines converted to
<br> tags
- Subtopic-based tagging
- Sanitized filenames
- Usage: Download โ Import in Anki (File โ Import)
Account Page Features
Profile Section
- User avatar (32px circle)
- Display name (editable inline)
- Email address
- Sign out button
Theme Selection
- Light/Dark mode toggle
- Visual theme preview cards
- Instant theme switching
- Preference saved to Firestore
Topic Breakdown
- Visual progress analytics for all topics
- Flashcard Progress Bar:
- Green: Easy confidence
- Yellow: Medium confidence
- Red: Hard confidence
- Grey: Unreviewed
- Quiz Question Progress Bar:
- Green: Correct answers
- Red: Incorrect answers
- Grey: Unattempted
- Count displays (X/Y reviewed, X/Y attempted)
- Color-coded legends
- Per-topic statistics calculation
- 5-minute cache with TTL to reduce Firebase reads โญ NEW
- Auto-invalidation when progress changes โญ NEW
Progress Bars
- Single-segment: Standard progress (0-100%)
- Multi-segment: Color-coded with percentages
- Flashcards: 4 segments (green/yellow/red/grey)
- Questions: 3 segments (green/red/grey)
- Smooth transitions and responsive widths
โจ๏ธ Keyboard Shortcuts
Flashcards
- Space: Flip card
- Left Arrow: Previous card
- Right Arrow: Next card
- Escape: Go back
Questions
- 1-4: Select answer option
- Left Arrow: Previous question (when allowed)
- Right Arrow: Next question (when allowed)
- Escape: Go back
Long Questions
- Left Arrow: Previous question
- Right Arrow: Next question
- Escape: Go back
Time Trials
- 1-4: Select answer option
- Escape: Exit trial (go back)
๐ฑ Responsive Design
Breakpoints
- 640px: Mobile adjustments (single column grids, smaller fonts)
- 768px: Time Trials specific adjustments
- 480px: Extra small mobile
Container
- Max-width: 1200px
- Centered with auto margins
- Responsive padding
Mobile Optimizations
- Stack mode cards vertically
- Adjust flashcard min-height
- Simplified navigation buttons
- Touch-friendly hit areas
Data Loading
- Preloading: All topics loaded on init in background
- Caching: Topic data cached in memory (
topicDataCache)
- Instant Navigation: No loading screens between topics
- Batched Writes: Flashcard progress synced in batches
Firestore Optimization
- Merge Updates: Use
{merge: true} for partial updates
- Field Paths: Dot notation for nested updates
- Increment Operations: Atomic counters for review counts
- Batch Processing: Multiple flashcard updates in single write
- Offline Persistence: Enabled with
synchronizeTabs: true for multi-tab support โญ NEW
- Unlimited Cache:
cacheSizeBytes: CACHE_SIZE_UNLIMITED for better performance โญ NEW
- Query Caching: 5-minute TTL cache for topic breakdown reduces reads by ~92% โญ NEW
Event Handling
- Debounced progress syncing
- Throttled scroll events
- Touch gesture detection for mobile
Animations
- CSS transitions for smooth state changes
- GPU-accelerated transforms
- Staggered animations on results
๐ฏ Design Philosophy
Principles
- Minimalist: Clean, distraction-free interface
- Accessible: High contrast, WCAG AA compliant dark mode
- Responsive: Works on all screen sizes
- Performance: Vanilla JS, minimal dependencies
- Visual Feedback: Clear animations and state changes
- Data Persistence: Cloud sync for seamless experience
User Experience
- Progressive disclosure: Start simple โ add complexity
- Immediate feedback: Instant visual response to actions
- Error prevention: Disabled states, validation
- Consistency: Same patterns across all modes
- Offline-first: localStorage backup, Firestore sync
๐ Known Issues & Considerations
Firestore Data Structure
- Uses dot notation for nested updates (
flashcards.2.confidence)
- Requires reconstruction when reading (flat to nested conversion)
getAllTopicsProgress() handles this transformation
Progress Data
- Flashcards: Latest confidence rating only (no history)
- Questions: Latest attempt result only (no history)
- Consider adding historical tracking for analytics
Anki Export Limitations
- Exports .txt file (not .apkg)
- Requires manual import in Anki
- No media/image support
- Basic front/back format only
๐ Common Tasks
Adding a New Topic
- Add flashcards JSON to
/product_design/flashcards/
- Add questions JSON to
/product_design/topic_questions/
- (Optional) Add long questions JSON
- Add entry to
app.topicMeta object in app.js:
'topic_id': {
name: 'Topic Name',
flashcardsFile: 'path/to/flashcards.json',
questionsFile: 'path/to/questions.json',
longQuestionsFile: 'path/to/long_questions.json' // optional
}
- Topic will auto-appear on homepage
Adding Long Questions to Existing Topic
- Create JSON file in
/product_design/long_questions/
- Format:
[
{
"id": 1,
"question": "Your question here",
"answer": "Model answer here",
"subtopic": "Optional subtopic"
}
]
- Update
topicMeta with longQuestionsFile path
- Long questions card will appear in mode selection
Modifying Theme Colors
- Update CSS custom properties in
:root and [data-theme="dark"]
- Dark mode colors in
app.js line 67-87
- Topic colors in
pastelColors array
Customizing Progress Analytics
calculateFlashcardStats() - Modify flashcard stat logic
calculateQuestionStats() - Modify question stat logic
renderTopicBreakdownItem() - Change visualization
Working with Topic Targets โญ NEW
Key Functions:
openTopicTargets() - Main entry point, loads and prepares personalized content
selectTopicTargetsFlashcards(allProgress) - Selects 1 easy, 2 medium, 2 hard flashcards
selectTopicTargetsQuestions(allProgress) - Selects 4 incorrect, 1 correct questions
renderTopicTargetsItem() - Renders current item (flashcard or question)
renderTopicTargetsFlashcard(flashcard, index, total) - Displays flashcard UI
renderTopicTargetsQuestion(question, index, total) - Displays question UI
flipTopicTargetsCard() - Toggles flashcard flip
rateTopicTargetsConfidence(level) - Saves flashcard rating
selectTopicTargetsAnswer(selectedOption) - Processes question answer
nextTopicTargetsItem() - Advances to next item
showTopicTargetsResults() - Shows completion summary
Selection Algorithm:
- Gather all progress data from Firestore
- Group flashcards by confidence (easy/medium/hard)
- Group questions by correctness (correct/incorrect)
- Select diverse set: 1 easy + 2 medium + 2 hard flashcards
- Select challenging set: 4 incorrect + 1 correct questions
- Fallback to random selection if insufficient progress data
- Combine and present in mixed order
Customization:
- Modify selection counts in
topicTargets state object (lines 504-511)
- Adjust selection ratios in
selectTopicTargetsFlashcards() and selectTopicTargetsQuestions()
- Change alert to custom results screen in
showTopicTargetsResults()
๐ Getting Started
Running Locally
- Start a local server:
python3 -m http.server 8002
- Open browser to
http://localhost:8002
- Firebase auth requires proper domain configuration
- Sign in with Google to enable progress tracking
File Structure
/PD_learn/
index.html # Main HTML
app.js # All JavaScript
styles.css # All CSS
favicon.svg # App icon
/product_design/ # Study content
/flashcards/ # Flashcard JSON files
/topic_questions/ # Question JSON files
/long_questions/ # Long question JSON files
2claude.md # This file
Dependencies
- Firebase: Loaded via CDN (v10.7.1 compat)
firebase-app-compat.js
firebase-auth-compat.js
firebase-firestore-compat.js
Environment Setup
- Firebase configuration in
app.js (lines 1-17)
- Consider using environment variables for production
- Firestore security rules should be configured in Firebase Console
๐ก Tips for Next Developer
Code Quality
- Console logging: Extensive emoji-prefixed logs for debugging
- Error handling: Try-catch blocks with detailed error logs
- Type checking: Validate data before Firestore operations
- State management: Centralized in
app object
Firestore Best Practices
- Batch writes: Use for multiple related updates
- Dot notation: Efficient for nested field updates
- Merge operations: Preserve existing data
- Data validation: Check structure before saving
UI/UX Considerations
- Loading states: Show feedback during async operations
- Error messages: User-friendly error handling
- Accessibility: Keyboard navigation, ARIA labels
- Responsive: Test on various screen sizes
- Preload data: Background loading for instant access
- Cache aggressively: In-memory topic data cache
- Batch operations: Reduce Firestore write costs
- Optimize queries: Minimize database reads
Security
- Firestore rules: Configure proper read/write permissions
- Auth validation: Check user state before operations
- Input sanitization: Validate user inputs
- API keys: Donโt commit sensitive credentials
๐ Code Style
- Naming: camelCase for functions/variables, kebab-case for CSS
- Comments: Section headers with
// === dividers
- Console logs: Emoji prefixes (๐ โ
โ ๏ธ โ ๐พ ๐ ๐)
- CSS: Custom properties for theming, consistent spacing
- JavaScript: ES6+, async/await, modern syntax
๐ Debugging
Browser Console
- Initialization:
๐ Initializing Product Design Study App...
- Auth state:
โ
User signed in: or ๐ค No user signed in
- Firestore ops:
๐พ Saving..., โ
Saved, โ Error...
- Data loading:
๐ฆ Preloading..., โ
Preloaded...
- Analytics:
๐ Loading topic breakdown...
Common Issues
- Firebase errors: Check network tab, auth state, Firestore rules
- Progress not saving: Check user is signed in, console for errors
- Data not loading: Verify JSON file paths in
topicMeta
- Styling issues: Check CSS custom properties, theme state
- Navigation stuck: Check
app.currentScreen in console
Debug Helpers
app object accessible in console for state inspection
- Detailed logging in Firestore operations
- Error catching with stack traces
- Network tab for Firebase requests
๐ Recent Updates
Latest Release (Current)
โญ NEW: Topic Targets - Personalized Practice Mode
- AI-Powered Selection: Analyzes your progress data to select optimal practice items
- Smart Algorithm:
- Flashcards: 1 easy, 2 medium, 2 hard (targets weak areas)
- Questions: 4 incorrect, 1 correct (reinforces mistakes)
- Mixed Content: Combines flashcards and questions in one session
- Adaptive Learning: Pulls from all topics based on actual performance
- Seamless Integration: All progress saved to Firestore with cache invalidation
- UI/UX: Dedicated screen with target icon button in top navigation
- 5-Minute TTL Cache for topic breakdown (92% reduction in Firebase reads)
- Auto-Invalidation when progress changes
- Offline Persistence with multi-tab synchronization
- Unlimited Cache Size for Firestore (better offline support)
- Topic 3 Questions now fully integrated (150 questions on Processes & Techniques)
Previous Major Features
- Long Questions Mode - Extended response practice with model answers
- Anki Export - Download flashcards for Anki import
- Topic Breakdown - Visual progress analytics per topic
- Dark Mode - Full dark theme with WCAG AA compliance
- Progress Syncing - Cloud sync via Firestore
- Account Page - Profile management and analytics
- Time Trials - Timed quiz mode with multi-topic support
- Data preloading for instant navigation
- Batched Firestore writes for flashcard progress
- Efficient progress data reconstruction
- Optimized state management
- Query result caching with smart invalidation
UI Enhancements
- Multi-segment progress bars with color coding
- Responsive account page layout
- Topic Targets button with disabled state
- Improved spacing and padding
- Better mobile experience
The app is production-ready with robust cloud syncing, comprehensive analytics, AI-powered personalized practice, and a polished user experience. ๐