How live-message/chat works
Purpose and deployment shape
Life Message is a registration-free, temporary room-based chat with browser calling support. The checked-in application surface is primarily static HTML/CSS/JavaScript under web/; deployment is container-oriented via Dockerfile, docker-compose.yml, and nginx.conf. The README describes a Flask/Flask-SocketIO backend, but its app.py and dependency manifest are not present in this tree.
Browser entry and route selection
web/index.html is the browser entry point. Route-to-page mapping is centralized in web/routes.json, with primary views at web/pages/home.html and web/pages/chat.html. The home flow creates or joins a room; the chat page is the active room workspace.
Room lifecycle and sharing
Room management UI is split into reusable menu fragments: web/menus/create-chat.html, web/menus/edit-chat.html, and web/menus/delete-chat.html. Sharing a generated room URL is handled by web/static/scripts/share.js. The intended room identifier model is UUID-based and temporary, per the README; backend ownership of generation, expiry, and deletion is an important boundary not represented in the supplied tree.
Real-time chat and calling transport
Chat orchestration is centered on web/static/scripts/chat/chat.js, with socket lifecycle/event handling in web/static/scripts/chat/websocket.js and presentation behavior in web/static/scripts/chat/ui.js. The client is expected to connect to a Flask-SocketIO/WebSocket service for messages and room events. WebRTC calling is described in the README; signaling would logically traverse this socket layer, while peer media/data traffic bypasses the application server after negotiation.
Client-side identity and local state
Anonymous participant behavior is managed by web/static/scripts/chat/users.js and web/static/scripts/user/login.js. Client persistence/data access is isolated in web/static/scripts/database/db.js, with contact-specific operations in web/static/scripts/database/contacts.js. This separates local browser state from authoritative room membership and message delivery, which must remain server-side for multi-user synchronization.
UI composition and progressive installation
Chat-specific styling and interaction assets live in web/static/css/chat.css and web/static/scripts/chat/. Shared shell styling is in web/static/css/main.css. The project includes a web-app manifest at web/static/manifest.json and installation logic at web/static/scripts/install-app.js, indicating Progressive Web App-oriented browser installation support.
Infrastructure and external boundaries
Nginx configuration in nginx.conf is the likely HTTP/static-file and reverse-proxy boundary, with docker-compose.yml defining local multi-container composition. Dockerfile packages the deployable runtime. Material external/browser services are WebSocket transport (Flask-SocketIO backend), WebRTC peer connections, and browser storage/PWA APIs; HTTPS is required operationally for secure transport and typical WebRTC deployment.
Main entry points: chat.js Chat orchestration · routes.json Route mapping · home.html Home view · chat.html Chat view
Components 18
Browser application
- Browser entry
web/index.html - Route mapping
web/routes.json - Home view · Creates or joins a room.
web/pages/home.html - Chat view · Active room workspace.
web/pages/chat.html - Room menus · Create, edit, and delete room UI.
web/menus/create-chat.html - Room sharing
web/static/scripts/share.js - Anonymous identity
web/static/scripts/chat/users.js - Local data access · Browser persistence and contacts.
web/static/scripts/database/db.js - PWA installation
web/static/manifest.json - Browser storage APIs
Room and real-time flow
- Chat orchestration
web/static/scripts/chat/chat.js - Socket lifecycle · Handles message, room, and signaling events.
web/static/scripts/chat/websocket.js - Chat presentation
web/static/scripts/chat/ui.js - Flask-SocketIO service · Authoritative room membership, messages, expiry, and signaling; not present in tree.
- WebRTC peers · Media and data flow directly after signaling.
Deployment
- Nginx edge · Serves static files and proxies application traffic.
nginx.conf - Container composition
docker-compose.yml - Runtime image
Dockerfile
Connections 18
- Browser entry → Route mapping: loads
- Route mapping → Home view: maps route
- Route mapping → Chat view: maps room route
- Home view → Room menus: uses
- Home view → Room sharing: shares room URL
- Chat view → Chat orchestration: starts
- Chat orchestration → Socket lifecycle: uses
- Chat orchestration → Chat presentation: updates
- Chat orchestration → Anonymous identity: identifies participant
- Anonymous identity → Local data access: persists locally
- Local data access → Browser storage APIs: reads and writes
- Socket lifecycle → Flask-SocketIO service: WebSocket events
- Flask-SocketIO service → WebRTC peers: signaling
- Chat view → PWA installation: install support
- Container composition → Runtime image: builds or runs
- Container composition → Nginx edge: composes
- Nginx edge → Browser entry: serves static app
- Nginx edge → Flask-SocketIO service: reverse proxies