# UI/UX Guide - Puzzle Validator ## Visual Layout ``` ┌─────────────────────────────────────────────────────────────┐ │ 🧩 PUZZLE VALIDATOR │ │ Upload your CSV file to validate puzzle entries │ └─────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────┐ │ UPLOAD SECTION │ │ │ │ 📁 │ │ Click to upload CSV or drag and drop │ │ CSV file with 'Complete Phrase' and 'Puzzle' columns │ │ │ │ [Selected file: example.csv] │ │ │ │ [✓ Validate] [Clear] [⬇ Download] │ └─────────────────────────────────────────────────────────────┘ ┌──────────────── VALIDATION IN PROGRESS ────────────────────┐ │ ████████████░░░░░░░░░░░░░░░░░░░░ │ │ Processing your file... │ └─────────────────────────────────────────────────────────────┘ ┌────────────────── ERROR STATISTICS ────────────────────────┐ │ │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │ 100 │ │ 15 │ │ 85 │ │ │ │ Total │ │ Errors │ │ Valid │ │ │ │ Entries │ │ Entries │ │ Entries │ │ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │ │ └─────────────────────────────────────────────────────────────┘ ┌───────────── ERRORS FOUND (15) ───────────────────────────┐ │ │ │ ┌─────┬──────────────┬─────────┬──┬─────────────────────┐ │ │ │ Row │ Phrase │ Puzzle │EC│ Error Description │ │ │ ├─────┼──────────────┼─────────┼──┼─────────────────────┤ │ │ │ #1 │ Hello World │ H___... │ 2│ First letter not... │ │ │ ├─────┼──────────────┼─────────┼──┼─────────────────────┤ │ │ │ #5 │ Test Case │ T___... │ 6│ Missing period │ │ │ ├─────┼──────────────┼─────────┼──┼─────────────────────┤ │ │ │ #12 │ Info Tech │ I___... │ 7│ Unbalanced quotes │ │ │ └─────┴──────────────┴─────────┴──┴─────────────────────┘ │ │ │ │ [⬇ Download Validated]│ └─────────────────────────────────────────────────────────────┘ ``` ## User Workflow ### Step 1: Upload ``` User Action: - Click on upload area - OR Drag-and-drop CSV file System Response: - File name displayed - "Validate" button appears - Progress bar ready ``` ### Step 2: Validate ``` User Action: - Click "Validate" button System Response: - Progress bar animates - Validation runs (backend processes file) - Results appear when complete ``` ### Step 3: Review ``` System Shows: - Statistics cards (Total, Errors, Valid) - Error table with details - OR "All valid!" message if no errors ``` ### Step 4: Download ``` User Action: - Click "Download Validated CSV" System Response: - CSV file downloaded with: * Original columns * Error Code column * Error Description column ``` ## Color Scheme ``` Primary Colors: - Purple-to-Blue Gradient: #667eea → #764ba2 - Used for: Buttons, borders, accents Status Colors: - Valid/Success: #20c997 (Green) - Error: #e74c3c (Red) - Warning/Neutral: #f0f0f0 (Light Gray) - Text: #333333 (Dark Gray) Backgrounds: - Main: White (#ffffff) - Hover: Light Purple (#f8f9ff) - Disabled: Light Gray (#e0e0e0) ``` ## Interactive Elements ### Upload Section ``` Normal State: ┌─ 📁 Click to upload or drag and drop ─┐ │ CSV file with 'Complete Phrase'... │ └───────────────────────────────────────┘ Hover State: ┌─ 📁 Click to upload or drag and drop ─┐ ← Slight scale up │ CSV file with 'Complete Phrase'... │ ← Slightly darker └───────────────────────────────────────┘ Drag-Over State: ┌─ 📁 Click to upload or drag and drop ─┐ ← More pronounced │ CSV file with 'Complete Phrase'... │ ← Purple highlight └───────────────────────────────────────┘ ``` ### Buttons ``` Default: [✓ Validate] [Clear] [⬇ Download] Hover: [✓ Validate]↑ (with shadow) [Clear] [⬇ Download]↑ (with shadow) Disabled: [✓ Validating...] (grayed out, no hover effect) Hover Color on Error Table: │ Entire row becomes light purple (#f8f9ff) │ ``` ## Messages ### Success Message ``` ✓ Validation completed successfully! (Green background, auto-disappears after 5 seconds) ``` ### Error Message ``` ✗ Validation error: [error details] (Red background, auto-disappears after 5 seconds) ``` ## Error Display Table ### Column Widths ``` ┌──────┬──────────────┬──────────────┬──────┬─────────────┐ │ 8% │ 20% │ 20% │ 10% │ 42% │ │ Row# │ Phrase │ Puzzle │ Code │ Description │ └──────┴──────────────┴──────────────┴──────┴─────────────┘ ``` ### Error Code Styling ``` Error Code appears in red pill: ┌─────┐ │2,4,7│ ← Red background, white text, monospace font └─────┘ ``` ## Responsive Design ### Desktop (> 768px) - Full width container (max 1000px) - Columns layout for stats - Full error table with all columns ### Tablet (481px - 768px) - Adjusted padding - Smaller font sizes - Wrapped button group ### Mobile (≤ 480px) - Full-width buttons (stacked vertically) - Single column stats - Horizontal scroll on table - Reduced padding and margins ## Animations ### Progress Bar ``` Width: 0% → 100% (during validation) Opacity pulse: 1 ↔ 0.7 (repeating) Duration: 1.5 seconds ``` ### Button Hover ``` Transform: translateY(-2px) Box-shadow: Fade in from transparent Duration: 300ms ``` ### Message Fade ``` Appears: Instant Duration: 5 seconds Disappears: Fade out ``` ### Loading Dots ``` . . . Dots bounce up and down sequentially Duration: 1.4 seconds total ``` ## Accessibility Features 1. **Semantic HTML**: Proper heading hierarchy (h1, h3) 2. **Color Contrast**: High contrast for readability 3. **Focus States**: Clear focus indicators on buttons 4. **Alt Text**: Proper labels on form inputs 5. **ARIA Labels**: (Can be added for screen readers) ## File Upload Interaction ``` Click or Drop Flow: 1. User clicks upload area ↓ 2. File picker dialog opens ↓ 3. User selects CSV file ↓ 4. File name appears below upload section ↓ 5. "Validate" button appears ↓ 6. User clicks "Validate" ↓ 7. Progress bar shows animation ↓ 8. Results display with error table ↓ 9. "Download" button appears ``` ## Error Code Legend | Code | Color | Meaning | |------|-------|---------| | 1 | Red | Lock logic error | | 2 | Red | Capitalization | | 3 | Red | Structural mismatch | | 4 | Red | Character mismatch | | 5 | Red | Forbidden characters | | 6 | Red | Missing period | | 7 | Red | Unbalanced quotes | | 0 | Green | Valid | ## Performance Indicators - **File Upload**: Instant (file selected) - **Validation**: 1-5 seconds (depending on file size) - **Results Display**: Instant - **Download**: Instant ## Screen States ### 1. Empty State - Upload section visible - No file info - No buttons except for hidden validate/clear - No results ### 2. File Selected State - Upload section visible (user can change file) - File name shown - "Validate" button visible - "Clear" button visible - No progress bar - No results ### 3. Validating State - Upload section disabled - Progress bar visible with animation - "Validate" button disabled with spinner - Results hidden - "Clear" button visible ### 4. Results State - With Errors - Upload section enabled (user can upload new file) - Stats cards displayed - Error table displayed - "Download" button visible - "Clear" button visible - Success/error message shown ### 5. Results State - No Errors - Upload section enabled - "All valid!" message displayed instead of table - "Download" button visible - "Clear" button visible --- **Design Philosophy**: Clean, modern, intuitive, and responsive interface focused on clarity and user feedback.