WebChat Docs
MCJIM workspace support chat app with AI assistant tab and live support queue.
/var/www/html/webchat
apigateway.webtour.ph/webchat/src/App.tsxProtected main chat page. Contains two tabs: AI Assistant and Live Support. Wired by /webchat/src/pages/Chat.tsx.
Agent-only support queue + conversation view. Join as agent, pickup customer sessions, send replies. Wired by /webchat/src/pages/SupportDashboard.tsx.
Guest-only login. Submits to /auth/signin via API.
Guest-only registration. Submits to /auth/signup via API.
Axios base URL: https://apigateway.webtour.ph. Endpoints used: POST /auth/signin, POST /auth/signup. Token is stored and attached as Authorization: Bearer ... on requests.
Uses Socket.IO for live support sessions and queues. Messages flow through socket events: user:join, user:message, agent:join, agent:pickup, agent:message, agent:close. Client listens for session:joined, chat:message, session:status, queue_update, session:history, session:message.
Run npm run build from /var/www/html/webchat. Output goes to /var/www/html/webchat/dist.
Vite proxies /api and /socket.io to http://localhost:3003 via /webchat/vite.config.ts.
Apache vhost: webchat.webtour.ph. Static files served from /var/www/html/webchat/dist. Frontend API/socket calls are forwarded to a backend on port 3004 via Apache proxy.
/webchat/src/App.tsx — route map: login, register, chat, support-dashboard./webchat/src/pages/Chat.tsx — AI Assistant + Live Support tab container./webchat/src/pages/SupportDashboard.tsx — agent queue, pickup, close session./webchat/src/context/SupportContext.tsx — Socket.IO bindings, queue/session state./webchat/src/services/api.ts — axios auth clients to apigateway./webchat/src/store/authStore.ts — logged-in user state.Port 3003 currently belongs to another app on this server, not WebChat. Production site should talk to the WebChat backend on the port configured in Apache, currently 3004. The docs site itself does not depend on chat backend availability.
Local app directory:
/var/www/html/webchat