Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
0c8a671
feat: add main application entry point with logger initialization
chojuninengu Jan 14, 2026
76cf74a
feat: enhance server to support WebSocket connections and improve err…
chojuninengu Jan 14, 2026
c96ee13
feat: implement trait-based outbound connection with TCP support
chojuninengu Jan 14, 2026
963c210
feat: add chat message and group structures with WebSocket support
chojuninengu Jan 14, 2026
3cafe98
refactor: simplify main function to focus on TCP server handling
chojuninengu Jan 14, 2026
859c6f8
refactor: remove TcpOutbound implementation and associated traits
chojuninengu Jan 14, 2026
12b2021
feat: add initial HTML structure for the web UI
chojuninengu Jan 14, 2026
dcb3255
chore(web-ui): add Cargo.toml for async-chat-web project
chojuninengu Jan 14, 2026
64f57d5
chore(build): add initial Trunk.toml configuration
chojuninengu Jan 14, 2026
416b326
feat(app): implement main application component with connection handling
chojuninengu Jan 14, 2026
5597e12
feat(header): add responsive header with user info and theme toggle
chojuninengu Jan 14, 2026
659d3d9
chore(git): add .claude to .gitignore
chojuninengu Jan 14, 2026
eae6339
feat(components): add mod declarations and re-exports
chojuninengu Jan 14, 2026
e0e9e33
feat(websocket): add WebSocket and HTTP fallback services for server …
chojuninengu Jan 14, 2026
e8b819d
feat(services): add websocket module with public export
chojuninengu Jan 14, 2026
1e3cfad
style(styles): add global CSS variables and utility classes
chojuninengu Jan 14, 2026
b4c87eb
feat(group-sidebar): add group sidebar component with join and select…
chojuninengu Jan 14, 2026
ae24b43
feat(message-input): add new message input component with styling and…
chojuninengu Jan 14, 2026
c65ee06
feat(message_list): implement chat message list UI with date grouping
chojuninengu Jan 14, 2026
68102fa
feat(chat): add chat room component with message list and input
chojuninengu Jan 14, 2026
9f5b450
feat(styles): add global styles module
chojuninengu Jan 14, 2026
3743f17
chore(web-ui): add Cargo.lock with updated Rust dependencies
chojuninengu Jan 14, 2026
57e93b8
chore(web-ui): remove unused web-sys dependency
chojuninengu Jan 14, 2026
3e247f3
chore(git): update .gitignore for web-ui directories
chojuninengu Jan 14, 2026
023988a
chore(deps): enable serde support for chrono crate
chojuninengu Jan 14, 2026
007653a
refactor(header): rename Header function to lowercase
chojuninengu Jan 14, 2026
3854260
refactor(group_sidebar): rename component function to use snake_case
chojuninengu Jan 14, 2026
a01c855
refactor(chat_room): rename ChatRoom function to chat_room
chojuninengu Jan 14, 2026
fae5d57
refactor(message_input): rename component function to use snake_case
chojuninengu Jan 14, 2026
1d032ac
refactor(message_list): rename component function to snake_case
chojuninengu Jan 14, 2026
c1f78d4
refactor(chat_room): update import paths for MessageInput and Message…
chojuninengu Jan 14, 2026
fe5b449
refactor(components): simplify module imports in mod.rs
chojuninengu Jan 14, 2026
2914cbb
feat(styles): add global CSS styles reference
chojuninengu Jan 14, 2026
799d4da
refactor(app): rename and update component imports and usage
chojuninengu Jan 14, 2026
e9c7344
style(app): fix component tag casing in app component
chojuninengu Jan 14, 2026
9f8a06c
fix(app): update state setting to use struct update syntax
chojuninengu Jan 14, 2026
f9d0162
refactor(app): rename App component reference to app_component
chojuninengu Jan 14, 2026
2911546
style(styles): remove trailing whitespace in mod.rs
chojuninengu Jan 14, 2026
e3e5c07
fix(app): correct app component reference for renderer
chojuninengu Jan 14, 2026
806bc42
refactor(app): update style reference to use fully qualified path
chojuninengu Jan 14, 2026
4e9f431
fix(app): correct group selection state update logic
chojuninengu Jan 14, 2026
6440965
fix(app): handle connection status updates and clean server message p…
chojuninengu Jan 14, 2026
f0b10da
fix(app): improve server message and connection status handling
chojuninengu Jan 14, 2026
bb60655
refactor(app): simplify app component and cleanup message handling
chojuninengu Jan 14, 2026
6001b80
refactor(components): reorganize module exports and declarations
chojuninengu Jan 14, 2026
6bc3aa5
fix(web-ui): correct app component initialization and logger setup
chojuninengu Jan 14, 2026
228e324
feat(web-ui): add components module declaration
chojuninengu Jan 14, 2026
c5fc093
chore(types): move all type definitions to a separate module
chojuninengu Jan 14, 2026
4e6a3dc
🎨 Implement beautiful Yew web UI
chojuninengu Jan 14, 2026
ad354ce
refactor: Rename main Yew component to `App` and simplify module decl…
chojuninengu Jan 14, 2026
98837a1
refactor: Simplify `mod.rs` files by replacing submodule declarations…
chojuninengu Jan 14, 2026
8979c0c
refactor: Replace `pub mod` declarations with comments in `services` …
chojuninengu Jan 14, 2026
3b4ce36
Refactor: remove redundant module declaration and add file-level comm…
chojuninengu Jan 14, 2026
4ec77c5
refactor: replace `components` module declaration with public `app` m…
chojuninengu Jan 14, 2026
7f18528
refactor: Remove app module declaration.
chojuninengu Jan 14, 2026
cee9149
Remove favicon link from index.html.
chojuninengu Jan 14, 2026
c61001f
feat: Implement WebSocket communication for server-client interaction…
chojuninengu Jan 14, 2026
59b5909
feat: Introduce WebAssembly-based web UI and update server to handle …
chojuninengu Jan 14, 2026
620ad44
feat: Introduce a web-based user interface for the async chat applica…
chojuninengu Jan 14, 2026
cf4f63f
feat: Implement WebSocket-based chat client UI with message display, …
chojuninengu Jan 14, 2026
c77afe4
Refactor: Reimplement WebSocket connection logic in the Yew UI, simpl…
chojuninengu Jan 14, 2026
d94ced7
feat: Implement WebSocket communication in the web UI.
chojuninengu Jan 14, 2026
a614633
feat: Implement WebSocket communication for the web UI, adding `Clone…
chojuninengu Jan 14, 2026
96fbfa4
feat: Introduce WebAssembly build output for the web UI and update pr…
chojuninengu Jan 14, 2026
7de5fef
feat: Implement web UI with WASM and add async dependencies for non-W…
chojuninengu Jan 14, 2026
df7dac0
feat: Introduce WebAssembly build artifacts and add `futures` depende…
chojuninengu Jan 14, 2026
9607257
refactor: Refactor server connection message processing for improved …
chojuninengu Jan 14, 2026
623add7
chore(deps): add async-tungstenite and futures-util for non-wasm targets
chojuninengu Jan 14, 2026
1c6e4ba
chore(deps): add futures crate version 0.3 dependency
chojuninengu Jan 14, 2026
e200df3
refactor: Split WebSocket stream for improved server concurrency and …
chojuninengu Jan 14, 2026
e90a28a
feat: Implement initial web UI with improved WebSocket error handling…
chojuninengu Jan 14, 2026
8766d7f
feat: Implement initial WebAssembly web UI with generated build artif…
chojuninengu Jan 14, 2026
2213e33
feat: Implement initial web UI with structured chat state management,…
chojuninengu Jan 14, 2026
91d31f2
Refactor UI styling in `app.rs` using `css!` and `classes!` macros fo…
chojuninengu Jan 14, 2026
685986f
feat: Generate web UI build artifacts and update the main application…
chojuninengu Jan 14, 2026
8bb9346
feat(protocol): add author field to client and server message structs
chojuninengu Jan 14, 2026
3a8d92a
feat(chat): implement user name handling and update message styling
chojuninengu Jan 14, 2026
f482caf
fix(server): pass author to group post method
chojuninengu Jan 14, 2026
f232e7a
refactor(server): change group broadcast to send ChatMessage struct
chojuninengu Jan 14, 2026
2bd6aee
feat: Add web UI build artifacts and update client application.
chojuninengu Jan 14, 2026
211673d
feat: Add logging for message sending and receiving in web UI and ser…
chojuninengu Jan 14, 2026
3eaecfa
feat: Add server-side and client-side logging for chat messages and t…
chojuninengu Jan 14, 2026
5d9263f
fix(server): correct indentation in message handling block
chojuninengu Jan 14, 2026
8412e4b
fix(server): dereference group_name before lookup in group table
chojuninengu Jan 14, 2026
78c48aa
fix(server): add debug logs for group message broadcasting
chojuninengu Jan 14, 2026
543d423
fix(app): trim input values and improve message sending logs
chojuninengu Jan 14, 2026
ec81f27
fix(server): correct indentation in log statement
chojuninengu Jan 14, 2026
3800f74
feat: Generate web UI build output and update `index.html` to include…
chojuninengu Jan 15, 2026
509e2c1
feat: implement the async chat web UI client using Yew and WebSockets.
chojuninengu Jan 15, 2026
b9bd1b4
build: Regenerate web UI build artifacts and update dependencies afte…
chojuninengu Jan 15, 2026
0d9e828
feat: Implement async chat web UI and generate initial build assets.
chojuninengu Jan 15, 2026
dc155c6
feat: implement Rust WebAssembly web UI with updated application comp…
chojuninengu Jan 15, 2026
6f7b049
feat: Introduce a Rust/WebAssembly web user interface and update serv…
chojuninengu Jan 15, 2026
6c4c56f
feat: Introduce WASM-based web UI and update server group management.
chojuninengu Jan 15, 2026
23fd22f
feat: Enable file message content and integrate group state into the …
chojuninengu Jan 15, 2026
610a5c3
feat: Introduce web UI with build artifacts and server-side group man…
chojuninengu Jan 15, 2026
563f70f
feat: Introduce group listing and joining in the UI, and add support …
chojuninengu Jan 15, 2026
e6bf9e8
feat: Add emoji selection and file upload functionality to the web UI.
chojuninengu Jan 15, 2026
4dbf874
feat: Add initial web UI using WebAssembly and update dependencies.
chojuninengu Jan 15, 2026
1de9c2a
feat: Add initial web UI build artifacts and introduce file and group…
chojuninengu Jan 15, 2026
ed79d29
feat: Integrate WebAssembly build for web UI, adding initial HTML and…
chojuninengu Jan 15, 2026
3ee5395
feat: Add web UI build output, update client and server group logic, …
chojuninengu Jan 15, 2026
4d126c4
feat: Add initial web UI build artifacts and update server group logic.
chojuninengu Jan 15, 2026
abda6b9
chore: Update web UI application component, dependencies, and regener…
chojuninengu Jan 15, 2026
40e7827
feat: Introduce dynamic sidebar toggling and remove file upload funct…
chojuninengu Jan 15, 2026
a381782
feat: Introduce web UI application and its compiled assets, updating …
chojuninengu Jan 15, 2026
3f819f8
feat: Implement dynamic user profile display and add left sidebar tog…
chojuninengu Jan 15, 2026
59644f3
feat: Implement collapsible sidebars, voice recording UI, and initial…
chojuninengu Jan 15, 2026
3a5c205
feat: Generate web UI build artifacts and update the main application…
chojuninengu Jan 15, 2026
3da708d
refactor: clone closure variables for event handlers in the App compo…
chojuninengu Jan 15, 2026
ec396a1
chore(serve): change serve address to 100.106.16.106
chojuninengu Jan 15, 2026
93ac147
feat(chat): add message reactions and typing indicators with dark mode
chojuninengu Jan 15, 2026
1eefbeb
feat(ui): add dark mode theme and chat reactions support
chojuninengu Jan 15, 2026
170055e
feat(app): add desktop notifications and responsive styles
chojuninengu Jan 15, 2026
4094fd5
chore(deps): add js-sys crate and HtmlAudioElement feature
chojuninengu Jan 15, 2026
5c07ff8
style(app): update emoji hover effect and typing indicator styles
chojuninengu Jan 15, 2026
2f93ad0
fix(web-ui): improve notification permission and constructor handling
chojuninengu Jan 15, 2026
c829c9c
fix(app): simplify notification to improve compatibility
chojuninengu Jan 15, 2026
186bc40
feat(protocol): add voice and reaction message types
chojuninengu Jan 15, 2026
b402bc7
feat(server): add voice and reaction posting handlers to group messages
chojuninengu Jan 15, 2026
4cdbf43
feat(server): add voice message and reaction broadcasting
chojuninengu Jan 15, 2026
0183ce7
feat(chat): add voice message and reaction support
chojuninengu Jan 15, 2026
5ce0d60
feat(app): add voice message support and remote reaction posting
chojuninengu Jan 15, 2026
bc10842
refactor(app): remove unused voice recording states
chojuninengu Jan 15, 2026
147ed7d
feat(web-ui): add media and blob related features
chojuninengu Jan 15, 2026
dd7e510
fix(app): update reaction handling to use local state dispatch
chojuninengu Jan 15, 2026
800b84b
feat(client): add voice and reaction message handling in CLI
chojuninengu Jan 15, 2026
97e7408
refactor(app): replace file confirm state with emoji picker and recor…
chojuninengu Jan 15, 2026
2ea1e26
feat(app): add voice recording start and stop functionality
chojuninengu Jan 15, 2026
10f04dc
refactor(app): replace Arc with Rc and RefCell for state management
chojuninengu Jan 15, 2026
8dfdf27
fix(app): improve audio recording stop and data retrieval logic
chojuninengu Jan 15, 2026
1a26481
style(app): remove unused import of Rc in app component
chojuninengu Jan 15, 2026
a230bb0
fix(app): use new_with_media_stream for MediaRecorder initialization
chojuninengu Jan 15, 2026
2250a6f
feat(deps): add async-tungstenite and futures-util dependencies
chojuninengu Jan 15, 2026
8afc73f
feat(app): add searchable group list and enhance emoji picker
chojuninengu Jan 15, 2026
923b68d
fix(app): correct sidebar width and styles for hidden state
chojuninengu Jan 15, 2026
625296c
style(app): enhance sidebar toggle button appearance and interaction
chojuninengu Jan 15, 2026
5071dca
feat(app): replace Rust MediaRecorder with JS-based audio recording
chojuninengu Jan 15, 2026
5042bb4
refactor(app): remove voice recording functionality from component
chojuninengu Jan 15, 2026
ec00e74
feat(audio): add voice recording feature in chat component
chojuninengu Jan 15, 2026
ac9528b
feat(app): add Enter key handling to send input
chojuninengu Jan 15, 2026
e8bc5ef
feat: Add chat reply, user presence, and online user list functionali…
chojuninengu Jan 16, 2026
041b237
feat: Add message reply and user presence update capabilities to chat…
chojuninengu Jan 16, 2026
ba01b79
feat: Implement message replies, user presence, and online user reque…
chojuninengu Jan 16, 2026
638f532
feat: Add web UI build artifacts and implement new chat features incl…
chojuninengu Jan 16, 2026
448b95b
build: Update web UI build artifacts, dependencies, and configure Tru…
chojuninengu Jan 16, 2026
bddbf78
feat: Add WebAssembly web UI build output and update project dependen…
chojuninengu Jan 16, 2026
39309ad
feat: Add initial web UI with Wasm bindings and simplify server-side …
chojuninengu Jan 16, 2026
2d7d9e1
feat: set up initial web UI with Trunk and implement message reply an…
chojuninengu Jan 16, 2026
48f78f6
feat(app): add reply-to message feature support
chojuninengu Jan 16, 2026
325dc57
fix(app): remove duplicate reply_to field in message initialization
chojuninengu Jan 16, 2026
e6cc1a1
feat(chat): handle reply messages and update online user presence
chojuninengu Jan 16, 2026
49221f0
feat(ui): add online users section to chat interface
chojuninengu Jan 16, 2026
9d0ed31
feat(chat): add reply preview and reply button to messages
chojuninengu Jan 16, 2026
20e8b94
refactor(app): remove reply button from message component
chojuninengu Jan 16, 2026
a885726
feat(web-ui): add PWA support and loading screen to index.html
chojuninengu Jan 16, 2026
b487ac0
feat(chat): add favorites and user presence tracking
chojuninengu Jan 16, 2026
e315163
refactor(server): update string formatting to use Rust 1.58+ syntax
chojuninengu Jan 16, 2026
188337b
feat(audio): add web audio notification and UI feedback sounds
chojuninengu Jan 16, 2026
18f373c
feat(chat): add chat state management with message and user handling
chojuninengu Jan 16, 2026
30eea2c
chore(components): add types, styles, and audio modules
chojuninengu Jan 16, 2026
b58626f
feat(styles): add styled components for dark mode and responsive layout
chojuninengu Jan 16, 2026
841742e
feat(audio): add audio-related features to Cargo.toml
chojuninengu Jan 16, 2026
b772e71
feat(chat): add support for multiple chat groups with separate histories
chojuninengu Jan 16, 2026
71aabda
chore(web-ui): ignore dist directory in .gitignore
chojuninengu Jan 16, 2026
3f8f1ff
refactor(app): replace HtmlAudioElement with Web Audio API for notifi…
chojuninengu Jan 16, 2026
2fb71d5
fix(app): improve notification sound playback and fix reaction update
chojuninengu Jan 16, 2026
f676c30
refactor(styles): replace style strings with StyleSource for app comp…
chojuninengu Jan 16, 2026
728ed08
refactor(components): remove unused module imports
chojuninengu Jan 16, 2026
0277385
refactor(app): separate selected item style from base class
chojuninengu Jan 16, 2026
9c1b2c9
refactor(styles): remove all AppStyles component styling
chojuninengu Jan 16, 2026
3afb3c6
refactor(chat): remove ChatState and related chat types
chojuninengu Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
/target
.claude
/web-ui/target
/web-ui/node_modules
/web-ui/.env
/web-ui/.env.local
/web-ui/dist
18 changes: 14 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ tokio = { version = "1.0", features = ["sync"] }
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
anyhow = "1.0.97"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
async-tungstenite = { version = "0.28", features = ["async-std-runtime"] }
futures-util = "0.3"
186 changes: 186 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# 🎨 Feature Request: Beautiful Web UI with Yew Framework

## 📋 Summary
Transform the current CLI-based async-chat into a modern, beautiful web application using Yew (Rust + WebAssembly) for the frontend while keeping the existing Rust server backend.

## 🎯 Motivation
- **Better User Experience**: Move from CLI to intuitive web interface
- **Full Rust Stack**: Showcase Rust's capabilities for both frontend and backend
- **Modern Chat Experience**: WhatsApp/Discord-like interface
- **Learning Opportunity**: Demonstrate Yew + WebAssembly in a real project
- **Community Showcase**: Highlight Rust-Cameroon's technical capabilities

## 🚀 Proposed Solution

### **Tech Stack**
- **Frontend**: Yew + WebAssembly (WASM)
- **Backend**: Keep existing async-std Rust server
- **Communication**: WebSocket for real-time messaging
- **Styling**: TailwindCSS + CSS modules
- **Build Tool**: Trunk for WASM bundling
- **State Management**: Yewdux or built-in Yew state
- **Icons**: Lucide icons or similar
- **WebSocket Client**: gloo-net for browser APIs

### **Architecture**
```
┌─────────────────────┐ WebSocket ┌──────────────────┐
│ Yew Frontend │ ◄─────────────► │ Rust Server │
│ (WebAssembly) │ (JSON msgs) │ (async-std) │
│ │ │ │
│ ┌─────────────────┐ │ │ ┌──────────────┐ │
│ │ Chat Component │ │ │ │ Group Table │ │
│ │ Group Component │ │ │ │ Connections │ │
│ │ Message List │ │ │ │ Broadcasting │ │
│ └─────────────────┘ │ │ └──────────────┘ │
└─────────────────────┘ └──────────────────┘
```

## 🎨 UI/UX Features

### **Core Features**
- [ ] **Modern Chat Interface**: Clean, responsive design
- [ ] **Real-time Messaging**: Live message updates via WebSocket
- [ ] **Group Management**: Create, join, and switch between groups
- [ ] **Message Bubbles**: Proper chat bubble styling with timestamps
- [ ] **User Identification**: Display usernames/IDs for messages
- [ ] **Responsive Design**: Works on desktop, tablet, and mobile

### **Enhanced Features**
- [ ] **Dark/Light Theme**: Toggle between themes
- [ ] **Message History**: Scroll through previous messages
- [ ] **Typing Indicators**: Show when someone is typing
- [ ] **Online Status**: Show active users in groups
- [ ] **Notifications**: Browser notifications for new messages
- [ ] **Emoji Support**: Basic emoji picker and rendering
- [ ] **Search Functionality**: Search messages and groups

### **Advanced Features** (Future)
- [ ] **File Sharing**: Drag & drop file uploads
- [ ] **Voice Messages**: Audio message support
- [ ] **Message Reactions**: React to messages with emojis
- [ ] **User Profiles**: Avatar and profile management
- [ ] **Message Threading**: Reply to specific messages
- [ ] **PWA Support**: Installable web app

## 🏗️ Implementation Plan

### **Phase 1: Foundation** (Week 1-2)
- [ ] Set up Yew project structure with Trunk
- [ ] Create basic components (App, ChatRoom, MessageList)
- [ ] Implement WebSocket connection to existing server
- [ ] Basic message sending and receiving
- [ ] Simple styling with TailwindCSS

### **Phase 2: Core Features** (Week 3-4)
- [ ] Group management UI (join/create groups)
- [ ] Message bubble styling and timestamps
- [ ] Responsive layout for different screen sizes
- [ ] Error handling and connection status
- [ ] Message input with Enter key support

### **Phase 3: Enhanced UX** (Week 5-6)
- [ ] Dark/light theme implementation
- [ ] Message history and scrolling
- [ ] User identification and display
- [ ] Notifications and browser integration
- [ ] Loading states and animations

### **Phase 4: Polish & Deploy** (Week 7-8)
- [ ] Performance optimizations
- [ ] Cross-browser testing
- [ ] Documentation and setup guides
- [ ] Deployment configuration
- [ ] Demo deployment

## 🛠️ Technical Details

### **Project Structure**
```
async-chat/
├── server/ # Existing Rust server
│ ├── src/
│ └── Cargo.toml
├── web-ui/ # New Yew frontend
│ ├── src/
│ │ ├── components/
│ │ ├── services/
│ │ ├── styles/
│ │ └── main.rs
│ ├── static/
│ ├── Cargo.toml
│ └── Trunk.toml
└── README.md
```

### **Key Components**
```rust
// Main app component
#[function_component(App)]
fn app() -> Html {
html! {
<div class="app">
<Header />
<main class="chat-container">
<GroupSidebar />
<ChatRoom />
</main>
</div>
}
}

// Chat message component
#[function_component(ChatMessage)]
fn chat_message(props: &MessageProps) -> Html {
html! {
<div class={classes!("message", props.is_own.then(|| "own"))}>
<div class="message-bubble">
<span class="sender">{&props.sender}</span>
<p class="text">{&props.content}</p>
<span class="timestamp">{&props.timestamp}</span>
</div>
</div>
}
}
```

### **WebSocket Integration**
- Extend existing server to handle WebSocket connections
- Implement JSON message protocol for web clients
- Maintain compatibility with existing CLI clients
- Real-time bidirectional communication

## 📚 Learning Resources
- [Yew Official Guide](https://yew.rs/)
- [WebAssembly Book](https://rustwasm.github.io/docs/book/)
- [Trunk Build Tool](https://trunkrs.dev/)
- [TailwindCSS](https://tailwindcss.com/)

## 🎯 Success Criteria
- [ ] Functional web UI that matches CLI functionality
- [ ] Real-time messaging works smoothly
- [ ] Responsive design on all devices
- [ ] Clean, modern, and intuitive interface
- [ ] Good performance (fast loading, smooth interactions)
- [ ] Well-documented code and setup process

## 🤝 Contributing
This is a great opportunity for:
- **Rust developers** wanting to learn frontend development
- **Web developers** interested in Rust and WebAssembly
- **UI/UX designers** to contribute design ideas
- **Anyone** interested in modern web technologies

## 📝 Additional Notes
- Keep the existing CLI interface working alongside the web UI
- Ensure the server can handle both CLI and web clients simultaneously
- Focus on code quality and documentation for educational value
- Consider this as a showcase project for the Rust-Cameroon community

---

**Labels**: `enhancement`, `frontend`, `yew`, `webassembly`, `ui/ux`, `good first issue`, `help wanted`

**Assignees**: TBD

**Milestone**: v2.0 - Web UI Release
108 changes: 108 additions & 0 deletions docs/yew-ui-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# 🎨 Yew UI Setup Guide

## 🚀 Quick Start for Yew Frontend Development

### Prerequisites
```bash
# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Add WebAssembly target
rustup target add wasm32-unknown-unknown

# Install Trunk (build tool for Yew)
cargo install trunk

# Install wasm-bindgen-cli
cargo install wasm-bindgen-cli
```

### Project Structure (Proposed)
```
async-chat/
├── server/ # Existing server code
├── web-ui/ # New Yew frontend
│ ├── src/
│ │ ├── components/
│ │ │ ├── app.rs
│ │ │ ├── chat_room.rs
│ │ │ ├── message.rs
│ │ │ └── mod.rs
│ │ ├── services/
│ │ │ ├── websocket.rs
│ │ │ └── mod.rs
│ │ ├── styles/
│ │ │ └── main.css
│ │ └── main.rs
│ ├── static/
│ │ └── index.html
│ ├── Cargo.toml
│ └── Trunk.toml
└── README.md
```

### Initial Cargo.toml for web-ui
```toml
[package]
name = "async-chat-web"
version = "0.1.0"
edition = "2021"

[dependencies]
yew = { version = "0.21", features = ["csr"] }
yewdux = "0.10"
gloo = "0.11"
gloo-net = "0.5"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = "0.3"
js-sys = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
log = "0.4"
wasm-logger = "0.2"

[dependencies.web-sys]
version = "0.3"
features = [
"console",
"WebSocket",
"MessageEvent",
"CloseEvent",
"ErrorEvent",
]
```

### Development Commands
```bash
# Navigate to web-ui directory
cd web-ui

# Start development server with hot reload
trunk serve

# Build for production
trunk build --release

# Run server (in separate terminal)
cd ../server
cargo run --release --bin server -- localhost:8000
```

### Getting Started Steps

1. **Create the web-ui directory structure**
2. **Set up basic Yew app with WebSocket connection**
3. **Implement message sending/receiving**
4. **Add styling with TailwindCSS**
5. **Create responsive chat interface**

### Useful Resources
- [Yew Examples](https://github.com/yewstack/yew/tree/master/examples)
- [WebSocket Example](https://github.com/yewstack/yew/tree/master/examples/websocket)
- [Trunk Configuration](https://trunkrs.dev/#configuration)
- [TailwindCSS with Trunk](https://trunkrs.dev/assets/#tailwind-css)

---

This will be an exciting project showcasing Rust's full-stack capabilities! 🦀✨
Loading
Loading