Files
tutortool/conductor/demo-plan.md

2.5 KiB

Demo Preparation & Seed Data Plan

Objective

Create an isolated, reproducible demo environment for presenting TutorTool on a Surface Pro 5 (Arch Linux) using Docker. This includes a robust set of seed data to simulate a live application state, which can also be utilized for local end-to-end testing.

Key Files & Context

  • Environment: docker-compose.yml (existing)
  • Database: SQLite (data/attendance.db)
  • New Files:
    • backend/migrations/demo_seed.sql: A standalone SQL script containing isolated test data.
  • Modified Files:
    • Makefile: Update to include a seed-demo target for easy execution.

Implementation Steps

1. Workspace Isolation via Git Worktree

When implementing this plan, the Gemini CLI will automatically utilize its Git worktree feature to spawn a new isolated workspace (e.g., feature/demo-seed). This ensures the backend tooling modifications do not interfere with the frontend-design-overhaul worktree or the main branch.

2. Create the Seed Data Script (backend/migrations/demo_seed.sql)

Create a SQL script that safely injects realistic demo data. It will use INSERT OR IGNORE or handle conflicts to ensure it can be run cleanly for both demo and testing purposes.

  • Admin/Tutor Account:
    • Name: "Demo Admin"
    • Email: admin@tutortool.com
    • Password Hash: A pre-calculated bcrypt hash for the password admin.
  • Course: "Demo Course 101" (Semester: "Current").
  • Room Layout: A valid JSON SVG layout representing a small classroom with a few tables and seats.
  • Students: Generate ~10 distinct student names linked to the course.
  • Session & Slot: Create a session for the current date and an "open" slot linked to the demo room, ensuring the check-in feature can be demonstrated immediately without setup.

3. Update Makefile

Add a seed-demo target to the existing Makefile.

  • The target will execute the SQLite CLI to run demo_seed.sql against the local development database defined by the DATABASE_URL environment variable (defaulting to sqlite:./dev.db for local dev).

4. Demo Run Guide

Provide a short set of instructions on how to start the environment using docker-compose up and the new seed command on the Surface Pro 5.

Verification & Testing

  • Execution: Run make seed-demo against a fresh SQLite database to ensure no foreign key or syntax errors occur.
  • Authentication: Verify that logging in with admin@tutortool.com / admin succeeds against the seeded database.