Skip to content

Demo Mode

Demo mode lets anyone explore MealPal instantly without creating an account.

  1. User clicks “Try Demo” on the login page
  2. Frontend calls POST /api/v1/demo/session → gets demo user info
  3. All subsequent API calls include X-Demo-Mode: true and X-Demo-User-Id headers
  4. Backend validates demo user exists with correct auth_id before serving data

The demo account includes 2+ weeks of realistic meal data (4 meals/day) and 3 sample conversations with Swan.

Terminal window
ssh ubuntu@api.tiny-agents.kovacova.ca
cd ~/tiny-agents
docker compose exec backend python scripts/seed_demo.py
  • Server-side validation: demo user must exist in DB with auth_id == "demo_user_mealpal_2024"
  • User isolation: demo user can only access their own data
  • No admin access, no permanent data modification
FilePurpose
backend/scripts/seed_demo.pyCreates demo user and data
backend/app/api/v1/demo.pyDemo session endpoints
backend/app/core/auth.pyget_current_user_or_demo()
frontend/src/lib/api.tsAuto-adds demo headers