Features
- Real-time Chat: Live messaging with other users
- Drawing Support: Send drawings and doodles
- Multi-user: Connect with multiple people
- External Service: Hosted on chat.aduncan.dev
- Focus Management: Overlay when window not focused
Component Structure
Location:src/WinXP/apps/PictoChat/index.jsx
Configuration
Fromapps/index.jsx:
Focus Overlay
Like other iframe-based apps, PictoChat uses an overlay to manage focus:- Prevents iframe from capturing all mouse events when window is unfocused
- Allows users to drag and resize the window
- Clicking the overlay brings focus to the window
- Overlay is removed when window has focus, allowing full interaction
Styling
#309f6a) provides a fallback while the iframe loads.
External Service
PictoChat loads fromhttps://chat.aduncan.dev, which is an external service. This means:
Advantages
- No hosting required on your end
- Real-time chat server managed externally
- Automatic updates from service provider
- Shared chat rooms with other users of the service
Limitations
- Requires internet connection
- Dependent on external service availability
- Limited customization options
- Cannot access chat data or history
- Service may have its own terms of service
Alternative: Self-Hosted Chat
To host your own PictoChat service:1. Set up a chat server
2. Create client interface
3. Update component
Features of chat.aduncan.dev
The external service typically provides:- Text Chat: Send and receive text messages
- Drawing Canvas: Draw and send images
- User Presence: See who’s online
- Room System: Multiple chat rooms
- Message History: Recent message display
- Emoji Support: Send emoji in messages
Usage Example
Integration Possibilities
If you control the chat service, you could add PostMessage communication:In PictoChat Component
In Chat Service
Privacy Considerations
- Chat messages may be visible to other users
- Service may log conversations
- No end-to-end encryption guarantee
- Review service privacy policy before use
- Consider implementing your own service for sensitive communications
Network Requirements
- Stable internet connection
- WebSocket support (for real-time features)
- Reasonable latency for smooth chat experience
- Service must allow iframe embedding (no X-Frame-Options: DENY)
Error Handling
Handle cases where the service is unavailable:Resizable Window
Unlike some other iframe apps, PictoChat is resizable:- Resize the window to their preferred size
- Maximize for full-screen chat
- Minimize to taskbar
- Only one PictoChat instance can be open
Default Size
The default size (400x600) is optimized for:- Comfortable text reading
- Adequate drawing canvas space
- Chat history visibility
- Vertical orientation (portrait-like)
Performance
- Iframe isolation prevents chat from blocking main thread
- External hosting reduces bandwidth on your server
- WebSocket connections managed by chat service
- Independent rendering context for smooth animations
Accessibility
- Keyboard navigation within chat interface
- Screen reader support (depends on chat service)
- Text-based communication for users who can’t draw
- Resizable interface for visibility preferences
