# KosmoConnect Messaging Client A subscriber-only web application for sending and receiving messages with the Meshtastic mesh network. ## Tech Stack - **React 18** + **Vite** - Plain CSS (no heavy UI framework) ## Running Locally Make sure the **Gateway Service** is running on `http://localhost:8003` (see `backend/gateway/README.md`). ```bash cd web/messaging npm install npm run dev ``` Open http://localhost:3001 in your browser. ## Features (v0.1) - **User switcher** (dev mode): select between test subscription tiers (Wanderer / Guardian) - **Conversation list**: auto-refreshing sidebar with latest message preview and unread badges - **Message thread**: chat-style bubbles with timestamps and delivery status indicators - `⏳` pending / `✓` queued / `✓✓` transmitted or delivered - **Auto-refresh**: polls for new replies every 5 seconds - **Subscription enforcement**: errors surfaced as browser alerts (e.g., quota exceeded, node not allowed) ## Architecture Notes - The Vite dev server proxies `/api` requests to `localhost:8003` to avoid CORS issues during development. - In production, the messaging client is served as static files and talks directly to the API gateway host. - Authentication is currently mocked with a simple `X-User-ID` header selector. Production will use JWT.