This guide explains how to seed a comprehensive demo account with all features and sample data.
-
Set up environment variables
- Ensure
.env.localhas your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
- Ensure
-
Run the seed script
npm run seed:demo # or node scripts/seed-demo.js -
Log in with demo credentials
- Email:
demo@example.com - Password:
Demo@Samvaad2024!
- Email:
The seed script creates a comprehensive demo account with:
- Full name and preferences
- Learning style: Visual
- Communication preference: Professional
- Accessibility settings enabled
- Comprehension Score: 94.5%
- Communication Score: 88.0%
- Adaptability Score: 91.5%
- Learning Velocity: 1.25x
- Optimal Learning Hours: 9:00 AM - 11:00 AM
- Strengths: Visual Learning, Pattern Recognition, Self-Correction, Complex Problem Solving, Technical Concepts
- Areas for Improvement: Public Speaking, Advanced Mathematical Concepts, Social Negotiations
- Neural Patterns: Comprehensive pattern data including learning preferences, feedback responses, and social interaction comfort
-
Master Machine Learning Fundamentals (65% complete)
- Category: Technical
- 4 milestones with progress tracking
-
Improve Public Speaking Skills (45% complete)
- Category: Communication
- 3 milestones
-
Learn Spanish Fluently (80% complete)
- Category: Language
- 4 milestones
-
Financial Literacy Mastery (90% complete)
- Category: Professional
- 4 milestones
-
Conflict Resolution Techniques (75% complete)
- Category: Communication
- 3 milestones
- Introduction to Neural Networks (45 min, 88% comprehension)
- Spanish Verb Conjugations (30 min, 75% comprehension)
- Investment Strategies (60 min, 95% comprehension)
- Presentation Techniques (40 min, 70% comprehension)
- Conflict Resolution (35 min, 82% comprehension)
- Machine Learning - Gradient Descent (50 min, 85% comprehension)
-
Learning Conversation: "Neural Networks Learning Session"
- 4 messages demonstrating learning mode interaction
-
Advocacy Conversation: "Salary Negotiation Discussion"
- 4 messages demonstrating advocacy mode interaction
-
Salary Negotiation - Successful outcome (5 stars)
- Position: Senior Developer
- Requested: $110,000 (from $95,000)
- Result: Approved
-
Fee Extension Request - Successful outcome (5 stars)
- Payment type: Tuition Fee
- Extension granted
- Optimal Learning Time Detected (Medium priority, Actionable)
- Visual Learning Efficiency Increased (Low priority)
- Communication Style Adjustment (High priority, Actionable)
- High Engagement with Hands-On Practice (Medium priority, Actionable)
- Advocacy Success Rate: 100% (Low priority)
- Default voice settings for accessibility
- Language: en-US
- Pitch, rate, and volume configured
All seeded data showcases:
- ✅ Cognitive Twin Engine: Rich neural patterns and learning analytics
- ✅ Learning Analytics: Multiple goals, sessions, and progress tracking
- ✅ Conversations: Both learning and advocacy modes with full message history
- ✅ Advocacy System: Real-world scenarios with outcomes and ratings
- ✅ Neural Insights: Pattern detection, recommendations, and actionable insights
- ✅ Accessibility: Voice profile and accessibility settings
- ✅ Progress Tracking: Goals with milestones, sessions with metrics
- View cognitive twin visualization
- See learning goals progress
- Check neural insights
- View recent activity
- View all learning goals with progress
- See learning session history
- Check cognitive profile scores
- View optimal learning time recommendations
- Switch between Learning and Advocacy modes
- See conversation history
- Use advocacy templates
- Experience personalized AI responses
- View and edit profile settings
- Adjust learning style preferences
- Configure accessibility options
To reset and reseed the demo account:
-
Delete existing data (optional - script will upsert/overwrite):
-- In Supabase SQL Editor DELETE FROM neural_insights WHERE user_id = 'your-user-id'; DELETE FROM advocacy_sessions WHERE user_id = 'your-user-id'; DELETE FROM messages WHERE conversation_id IN ( SELECT id FROM conversations WHERE user_id = 'your-user-id' ); DELETE FROM conversations WHERE user_id = 'your-user-id'; DELETE FROM learning_sessions WHERE user_id = 'your-user-id'; DELETE FROM learning_goals WHERE user_id = 'your-user-id'; DELETE FROM cognitive_twins WHERE user_id = 'your-user-id'; DELETE FROM voice_profiles WHERE user_id = 'your-user-id';
-
Run the seed script again:
npm run seed:demo
The script handles existing users automatically. It will sign in and update/create data.
Ensure .env.local has:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Ensure migrations have been run:
supabase/migrations/20250313212230_init.sql - Check that Row Level Security (RLS) policies are active
- Verify you're using the anon key (not service role key) for this script
- Log out and log back in to refresh session
- Clear browser cache
- Check browser console for errors
- Verify data in Supabase dashboard
After seeding:
- ✅ Log in with demo credentials
- ✅ Explore the dashboard
- ✅ Try the chat interface
- ✅ View learning analytics
- ✅ Check neural insights
- ✅ Review advocacy sessions
For issues or questions:
- Check the main README.md
- Review SETUP_GUIDE.md
- Check Supabase logs in dashboard
- Verify environment variables
Happy Exploring! 🚀