#!/bin/bash echo "🚀 Starting GoCheck Demo" echo "========================" # Start the server in the background echo "Starting server..." ./gocheck & SERVER_PID=$! # Wait for server to start sleep 2 echo "" echo "✅ Server is running at http://localhost:8080" echo "" echo "🌐 Open your browser and go to: http://localhost:8080" echo "" echo "📋 Demo Features:" echo " • Create a new checklist" echo " • Add items to your checklist" echo " • Check/uncheck items" echo " • Edit item content" echo " • Lock items to prevent conflicts" echo " • Create hierarchical items (sub-items)" echo " • Real-time collaboration (open multiple browser tabs)" echo "" echo "🔧 API Testing:" echo " • Create checklist: POST /api/checklists" echo " • Add item: POST /api/checklists/{uuid}/items" echo " • Get items: GET /api/checklists/{uuid}/items" echo " • Update item: PATCH /api/checklists/{uuid}/items/{id}" echo " • Delete item: DELETE /api/checklists/{uuid}/items/{id}" echo " • Lock item: POST /api/checklists/{uuid}/items/{id}/lock" echo " • Real-time updates: GET /api/checklists/{uuid}/sse" echo "" echo "Press Ctrl+C to stop the server" echo "" # Wait for user to stop trap "echo ''; echo '🛑 Stopping server...'; kill $SERVER_PID; exit" INT wait