Spaces:
Sleeping
Sleeping
| # Web UI Visual Guide | |
| ## Interface Layout | |
| ``` | |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| β ποΈ AI Personas for Urban Planning β | |
| β Explore diverse stakeholder perspectives on urban planning β | |
| β βββββββββββββββββββββββββββββββββββββββββ¦ββββββββββββββββββββββββββββββββββββ£ | |
| β β π₯ Select a Persona β | |
| β π¬ Conversation β Click to start conversation β | |
| β ββββββββββββββββββββββββββββββββββ β β | |
| β β Currently talking with: β β βββββββββββββββββββββββββββ β | |
| β β π± Sarah Chen (Urban Planner) β β β π± β β | |
| β ββββββββββββββββββββββββββββββββββ β β Sarah Chen β β | |
| β β β Urban Planner β β | |
| β ββββββββββββββββββββββββββββββββββ β βProgressive, sustainabilityβ β | |
| β β Your question: ________________β β βββββββββββββββββββββββββββ β | |
| β β [Send] β β β | |
| β ββββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββ β | |
| β β β πͺ β β | |
| β π‘ Try asking: β β Marcus Thompson β β | |
| β ββββββββββββββββββββ βββββββββββββββ β β Business Owner β β | |
| β β What's most β β Should we β β β Pragmatic, economy-first β β | |
| β β important issue? β β allow food β β βββββββββββββββββββββββββββ β | |
| β ββββββββββββββββββββ βββββββββββββββ β β | |
| β ββββββββββββββββββββ βββββββββββββββ β βββββββββββββββββββββββββββ β | |
| β β How to make city β β Affordable β β β π β β | |
| β β sustainable? β β housing? β β β Dr. Elena Rodriguez β β | |
| β ββββββββββββββββββββ βββββββββββββββ β βTransportation Engineer β β | |
| β β β Data-driven, safety-firstβ β | |
| β βββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββ β | |
| β β β | |
| β π Conversation History β βββββββββββββββββββββββββββ β | |
| β β β π‘ β β | |
| β ββββββββββββββββββββββββββββββββββ β β James O'Brien β β | |
| β β π You: β β β Long-time Resident β β | |
| β β What do you think about the β β βTraditional, community- β β | |
| β β bike lane proposal? β β β focused β β | |
| β ββββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββ β | |
| β β β | |
| β ββββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββ β | |
| β β π± Sarah Chen: β β β β β β | |
| β β I strongly support this bike β β β Priya Patel β β | |
| β β lane proposal. As an urban β β β Housing Advocate β β | |
| β β planner focused on β β β Activist, equity-focused β β | |
| β β sustainability, I believe this β β βββββββββββββββββββββββββββ β | |
| β β aligns perfectly with our β β β | |
| β β climate goals. The data shows β β βββββββββββββββββββββββββββ β | |
| β β protected bike lanes reduce... β β β π’ β β | |
| β ββββββββββββββββββββββββββββββββββ β β David Kim β β | |
| β β β Real Estate Developer β β | |
| β ββββββββββββββββββββββββββββββββββ β βMarket-driven, growth- β β | |
| β β ποΈ Clear Conversation β β β oriented β β | |
| β ββββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββ β | |
| β β β | |
| β βββββββββββββββββββββββββββββββββββββββββ©ββββββββββββββββββββββββββββββββββββ£ | |
| β AI Personas β’ Phase 1 β’ Powered by Claude 3 Haiku β’ View Code β | |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| ``` | |
| ## Key Features Illustrated | |
| ### 1. Persona Cards (Right Panel) | |
| Each persona card shows: | |
| - **Avatar emoji** - Visual identifier (π± πͺ π π‘ β π’) | |
| - **Name** - Full name of the persona | |
| - **Role** - Their professional or community role | |
| - **Tagline** - Brief description of their perspective | |
| **Selected State:** | |
| - Cards highlight when selected (blue border) | |
| - Button turns to "primary" style | |
| - Name appears in conversation header | |
| ### 2. Conversation Area (Left Panel - Top) | |
| **Currently Talking With Banner:** | |
| ``` | |
| ββββββββββββββββββββββββββββββββββ | |
| β Currently talking with: β | |
| β π± Sarah Chen (Urban Planner) β | |
| ββββββββββββββββββββββββββββββββββ | |
| ``` | |
| Shows who you're conversing with. | |
| **Question Input:** | |
| ``` | |
| ββββββββββββββββββββββββββββββββββ | |
| β Your question: [Type here...] β | |
| β [Send] β | |
| ββββββββββββββββββββββββββββββββββ | |
| ``` | |
| - Text input field for questions | |
| - Placeholder text guides the user | |
| - Send button to submit | |
| ### 3. Quick Suggestions (Left Panel - Middle) | |
| ``` | |
| π‘ Try asking: | |
| ββββββββββββββββββββ βββββββββββββββ | |
| β What's most β β Should we β | |
| β important issue? β β allow food β | |
| ββββββββββββββββββββ βββββββββββββββ | |
| ``` | |
| Four pre-written questions to get started: | |
| - Click any button to auto-fill the question | |
| - Helpful for first-time users | |
| - Demonstrates good question types | |
| ### 4. Conversation History (Left Panel - Bottom) | |
| **User Messages (Blue):** | |
| ``` | |
| ββββββββββββββββββββββββββββββββββ | |
| β π You: β | |
| β What do you think about the β | |
| β bike lane proposal? β | |
| ββββββββββββββββββββββββββββββββββ | |
| ``` | |
| **Persona Responses (Gray):** | |
| ``` | |
| ββββββββββββββββββββββββββββββββββ | |
| β π± Sarah Chen: β | |
| β I strongly support this bike β | |
| β lane proposal... β | |
| ββββββββββββββββββββββββββββββββββ | |
| ``` | |
| **Clear Button:** | |
| ``` | |
| ββββββββββββββββββββββββββββββββββ | |
| β ποΈ Clear Conversation β | |
| ββββββββββββββββββββββββββββββββββ | |
| ``` | |
| Resets the conversation for a fresh start. | |
| ## User Flow | |
| ### First Visit | |
| ``` | |
| 1. User lands on page | |
| β | |
| 2. Sees 6 persona cards on right | |
| β | |
| 3. Sees "Select a persona" message on left | |
| β | |
| 4. Clicks on a persona (e.g., Sarah Chen) | |
| β | |
| 5. Persona card highlights | |
| β | |
| 6. Left panel shows "Currently talking with Sarah Chen" | |
| β | |
| 7. User sees quick suggestions | |
| β | |
| 8. Clicks suggestion or types question | |
| β | |
| 9. Clicks Send button | |
| β | |
| 10. "π Sarah Chen is thinking..." appears | |
| β | |
| 11. Response appears in conversation history | |
| β | |
| 12. User can ask follow-up or switch persona | |
| ``` | |
| ### Switching Personas | |
| ``` | |
| 1. User clicks different persona (e.g., Marcus) | |
| β | |
| 2. Previous persona card unhighlights | |
| β | |
| 3. New persona card highlights | |
| β | |
| 4. Conversation history clears | |
| β | |
| 5. Banner updates to show Marcus Thompson | |
| β | |
| 6. User can start new conversation | |
| ``` | |
| ## Color Coding | |
| Each persona has a unique color theme: | |
| - **π± Sarah Chen**: Green (#4CAF50) - Sustainability | |
| - **πͺ Marcus Thompson**: Orange (#FF9800) - Business/Commerce | |
| - **π Elena Rodriguez**: Blue (#2196F3) - Technical/Engineering | |
| - **π‘ James O'Brien**: Brown (#795548) - Traditional/Established | |
| - **β Priya Patel**: Pink (#E91E63) - Activism/Energy | |
| - **π’ David Kim**: Gray (#607D8B) - Professional/Corporate | |
| ## Responsive Design | |
| ### Desktop (Wide Screen) | |
| ``` | |
| βββββββββββββββββββββββββββ¬ββββββββββββ | |
| β β Personas β | |
| β Conversation β Cards β | |
| β (2/3 width) β (1/3 width)β | |
| βββββββββββββββββββββββββββ΄ββββββββββββ | |
| ``` | |
| ### Tablet (Medium Screen) | |
| ``` | |
| βββββββββββββββββββββββββββ¬ββββββ | |
| β β P β | |
| β Conversation β e β | |
| β β r β | |
| β β s β | |
| βββββββββββββββββββββββββββ΄ββββββ | |
| ``` | |
| ### Mobile (Narrow Screen) | |
| ``` | |
| βββββββββββββββββ | |
| β Conversation β | |
| β β | |
| βββββββββββββββββ | |
| βββββββββββββββββ | |
| β Persona Cards β | |
| β (Stacked) β | |
| βββββββββββββββββ | |
| ``` | |
| ## Interactive Elements | |
| ### Buttons | |
| **Persona Selection Buttons:** | |
| - Hover: Slight lift effect (translateY) | |
| - Selected: Primary color, bold border | |
| - Unselected: Secondary color, subtle border | |
| **Send Button:** | |
| - Full width of container | |
| - Primary color | |
| - Bold text | |
| - 3rem height for easy clicking | |
| **Suggestion Buttons:** | |
| - Two columns layout | |
| - Full width of container | |
| - Secondary color | |
| - Fills input when clicked | |
| **Clear Conversation:** | |
| - Full width | |
| - Warning/destructive action style | |
| - Icon + text label | |
| ### Input Field | |
| **Text Input:** | |
| - Placeholder: "e.g., What do you think about..." | |
| - Auto-focus when page loads | |
| - Enter key submits | |
| - Clears after sending | |
| ### Loading States | |
| **Thinking Indicator:** | |
| ``` | |
| π Sarah Chen is thinking... | |
| ``` | |
| Shows while waiting for API response. | |
| **System Initialization:** | |
| ``` | |
| π§ Initializing AI Personas system... | |
| ``` | |
| Shows on first page load. | |
| ## Accessibility Features | |
| - **Keyboard Navigation**: Tab through all interactive elements | |
| - **Screen Reader Support**: Semantic HTML with ARIA labels | |
| - **High Contrast**: Text meets WCAG AA standards | |
| - **Focus Indicators**: Visible keyboard focus states | |
| - **Clear Labels**: All buttons have descriptive text | |
| ## Tips for Best Experience | |
| ### 1. Large Screen Recommended | |
| - Best viewed on desktop or tablet (β₯1024px width) | |
| - Mobile works but cards may stack vertically | |
| ### 2. Modern Browser | |
| - Chrome, Firefox, Safari, Edge (recent versions) | |
| - JavaScript must be enabled | |
| ### 3. Stable Internet | |
| - Responses require API calls | |
| - 2-5 seconds per response | |
| ### 4. Clear Conversation | |
| - Click "Clear Conversation" before switching topics | |
| - Or switch personas for fresh start | |
| ## Comparison: CLI vs. Web UI | |
| | Feature | CLI (`src.cli`) | Web UI (`web_app.py`) | | |
| |---------|-----------------|----------------------| | |
| | **Visual** | Text-only | Rich visual interface | | |
| | **Personas** | Text list | Emoji avatars + cards | | |
| | **History** | Scrolling text | Formatted chat boxes | | |
| | **Input** | Command prompt | Text field with Send button | | |
| | **Suggestions** | None | Quick-click buttons | | |
| | **Selection** | Type persona ID | Click card | | |
| | **Mobile** | Terminal only | Web browser | | |
| | **Learning curve** | Higher | Lower | | |
| | **Power user** | Better for scripts | Better for exploration | | |
| ## Future Enhancements | |
| Planned improvements: | |
| - [ ] Export conversation to PDF | |
| - [ ] Dark mode toggle | |
| - [ ] Voice input/output | |
| - [ ] Multi-persona comparison (split view) | |
| - [ ] Conversation templates | |
| - [ ] Mobile app version | |
| - [ ] Real-time typing indicators | |
| - [ ] Emoji reactions to responses | |
| - [ ] Save/load conversations | |
| - [ ] Share conversation links | |
| --- | |
| **The Web UI makes exploring personas intuitive, visual, and engaging! π¨** | |