Simple chat frontend for the reusable messaging backend service.
This repository is frontend only.
Backend repository:
https://github.com/almas-alright/messaging-service
Build a simple WhatsApp-like chat UI that can run on your Ubuntu PC and connect to the local messaging backend through configurable URLs.
Standalone local chat:
- Vite + React + TypeScript
- Configurable backend API base URL
- Configurable WebSocket URL
- Email/password registration, OTP verification, and login through the messaging backend
- Messaging access/refresh token session lifecycle
- Authenticated contacts and one-to-one conversations
- Message list
- Emoji support
- File upload/send
- Attachment preview/link
- Local network testing from other computers
Future direction:
- Compact floating chat window
- Voice message sending
- Optional AI bot per chat side
- Human takeover from AI bot
- Full marketplace frontend
- AI bot implementation
- Voice messages
- Production support-agent dashboard
Those are future phases.
Both backend and frontend can run on the same Ubuntu PC.
Prerequisites:
- Node.js 20 or newer
- npm
- Docker with Docker Compose
- Running messaging backend on port
8080
Backend example:
git clone https://github.com/almas-alright/messaging-service.git
cd messaging-service
docker compose up --buildFrontend local run:
git clone https://github.com/almas-alright/messaging-web-front.git
cd messaging-web-front
cp .env.example .env.local
npm install
npm run dev -- --host 0.0.0.0The app defaults to:
VITE_API_BASE_URL=http://localhost:8080
VITE_WS_BASE_URL=ws://localhost:8080/wsFor LAN testing, create a local .env.local file:
VITE_API_BASE_URL=http://192.168.1.10:8080
VITE_WS_BASE_URL=ws://192.168.1.10:8080/wsUse your Ubuntu PC LAN IP instead of 192.168.1.10.
Other computers on the same local network can open:
http://192.168.1.10:5173
Use this when the backend and frontend run on one Ubuntu PC and other devices on the same Wi-Fi/LAN need to test the chat.
- Find the Ubuntu PC LAN IP:
hostname -IUse the first address that matches your local network, for example
192.168.1.10 or 10.10.33.97.
- Start the backend from the backend repository:
cd ../messaging-service
docker compose up --buildBackend URLs should be reachable from the Ubuntu PC:
http://<host-ip>:8080/health
http://<host-ip>:8080/ready
- Configure the frontend for LAN access.
Create .env.local in this repository:
cp .env.example .env.localThen edit .env.local:
VITE_API_BASE_URL=http://<host-ip>:8080
VITE_WS_BASE_URL=ws://<host-ip>:8080/ws- Start the frontend dev server:
npm install
npm run dev -- --host 0.0.0.0Open from the Ubuntu PC:
http://localhost:5173
Open from another device on the same network:
http://<host-ip>:5173
- Authenticated organization chat flow:
- Register two accounts in separate browser sessions and complete OTP verification, or sign in to two verified accounts.
- Search for the other user by email or username and add them as a contact.
- Select the contact to resolve the direct conversation and connect live chat.
- Confirm message history loads, then send text and file messages.
- Confirm delivered/seen receipts update in both browser sessions.
The main app is served at /.
Make sure firewall rules allow inbound traffic to ports 5173 and 8080 on
the Ubuntu PC during local testing.
For a repeatable walkthrough, use docs/local-test-checklist.md.
For frontend/backend ownership details, see docs/config-boundary.md.
Release notes are in docs/release-notes.md.
Run:
npm install
npm run buildnpm run lint is not configured yet.
Build and run the frontend as a static Nginx container:
docker compose up --buildOpen:
http://localhost:5173
For LAN test builds, pass the backend URLs at build time:
VITE_API_BASE_URL=http://<host-ip>:8080 \
VITE_WS_BASE_URL=ws://<host-ip>:8080/ws \
FRONTEND_PORT=5173 \
docker compose up --buildVite embeds these values during the Docker image build.
The backend must allow local frontend origins during LAN testing, for example:
http://localhost:5173
http://127.0.0.1:5173
http://192.168.1.10:5173
For production, CORS should be restricted to approved domains only.
Start from:
AGENTS.md
.agent/CURRENT_PLAN.md
<active-plan>/TASKS.md
Rules:
- One plan = one branch
- One task = one commit
- Stop after each task
- Keep this repository frontend-only