Add questionnaire table to schema and HF Hub backup/restore
Mahdi Naser Moghadasi
37ffffc
Track multiple ad clicks per visitor: allow multiple visits per day with different UTM campaigns, add API endpoint to query visits by visitor ID
Mahdi Naser Moghadasi
703eaa8
Add onboarding modal with skill level question and dashboard integration
Mahdi Naser Moghadasi
da85bc8
- Create OnboardingModal component with 3-step flow:
- Step 1: Main goal (Learn basics, Practice problems, Exploring)
- Step 2: Skill level (Beginner/Intermediate/Advanced) for practice-problems
- Step 3: Next action (Tour, Beta signup, Start practicing, Skip)
- Add onboarding_responses table to database schema
- Create /api/onboarding endpoint (POST/GET)
- Integrate onboarding modal into main page (shows on first visit)
- Add onboarding data display to Streamlit dashboard with charts and metrics
Add geographic tracking and map visualizations
Mahdi Naser Moghadasi
f8c10e0
- Add IP geolocation tracking using ip-api.com
- Store country, state, city, and coordinates in database
- Add countryStats and usStateStats to analytics API
- Filter geographic stats by date when date filter is applied
- Create world map and US state map visualizations in dashboard
- Support both total and per-day geographic views
Add comprehensive user activity tracking system
Mahdi Naser Moghadasi
eef698a
- Created user_activity_log database table for storing all user activities
- Added activity tracking API endpoint (POST/GET /api/activity)
- Created client-side activity tracker with functions for:
- Code changes (typing), code execution, code submission
- LLM questions and responses
- Question selection, page navigation, view changes
- Button clicks, beta signups, feedback submissions
- Integrated activity tracking into:
- app/page.tsx (code changes, executions, submissions, navigation)
- components/AIAssistantChat.tsx (LLM interactions)
- Updated dashboard to show activity logs per visitor with timeline view
- All activities tracked with timestamps, device info, and full context
Fix session duration calculation and add engagement analytics
Mahdi Naser Moghadasi
f98fe13
- Fixed session duration bug: now uses created_at timestamps instead of dates
- Added engagement tracking: selector views and bounces
- Added analytics_engagement table to database schema
- Track when users view selector page but don't start questions
- Track when users bounce (leave without starting)
- Added engagement metrics to dashboard: engagement rate, bounce rate, funnel chart
- Dashboard shows insights for high bounce/low engagement rates
- Session duration now shows accurate time spans (days, hours, minutes)
Add button click tracking for Deep Discussion and Ask Question buttons
Mahdi Naser Moghadasi
af25c18
- Added analytics_button_clicks table to database schema
- Created trackButtonClick() function in analytics.ts
- Added button click tracking to both buttons in page.tsx
- Updated analytics API to accept and store button clicks
- Added buttonClicks to AnalyticsData interface
- Added button click statistics section to Streamlit dashboard
- Dashboard shows: total clicks, Deep Discussion clicks, Ask Question clicks
- Includes bar chart and pie chart for button click distribution
Add feedback button and modal with rating system
Mahdi Naser Moghadasi
b8e62af
- Created FeedbackButton component (floating button)
- Created FeedbackModal with 5-star rating and text feedback
- Added /api/feedback endpoint (POST to submit, GET to retrieve)
- Added user_feedback table to database schema
- Integrated feedback persistence with HF Hub Dataset
- Updated loadFromHfHub to load feedback data
- Updated pushToHfHub to sync feedback data
- Adjusted button positioning to avoid overlap
- Feedback includes: rating, text, optional name/email/feature
Add Hugging Face Hub Datasets storage for data persistence
Mahdi Naser Moghadasi
6be1116
- Add HF Hub storage layer with local SQLite cache
- Update beta-signup API to sync to HF Hub asynchronously
- Load data from HF Hub on startup
- Hybrid approach: fast local cache + persistent HF Hub storage
- Works without billing setup, uses existing HF_TOKEN
Fix database initialization with better error handling and fallbacks
Mahdi Naser Moghadasi
8a0a23b
Migrate analytics to SQLite database stored in /data folder for persistence