diff options
author | Calvin Morrison <calvin@pobox.com> | 2025-09-03 21:15:36 -0400 |
---|---|---|
committer | Calvin Morrison <calvin@pobox.com> | 2025-09-03 21:15:36 -0400 |
commit | 49fa5aa2a127bdf8924d02bf77e5086b39c7a447 (patch) | |
tree | 61d86a7705dacc9fddccc29fa79d075d83ab8059 /client/README.md |
Diffstat (limited to 'client/README.md')
-rw-r--r-- | client/README.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..ec92fc2 --- /dev/null +++ b/client/README.md @@ -0,0 +1,57 @@ +# JCHAT Web Client + +A pure HTML/JavaScript client for the JCHAT protocol. No build process required - just serve the static files. + +## Quick Start + +### Option 1: Using shttpd (recommended) +```bash +shttpd . --port 3000 +``` + +### Option 2: Using Python +```bash +python3 -m http.server 3000 +``` + +### Option 3: Using any web server +Point your web server (nginx, Apache, etc.) to serve files from this directory. + +## Files + +- `index.html` - Main client interface +- `jmap-client.js` - JMAP protocol client library +- `app.js` - Chat application logic +- `package.json` - Project metadata (no dependencies) + +## Usage + +1. Make sure the JCHAT server is running on `localhost:8080` +2. Serve these files on any port (e.g., 3000) +3. Open `http://localhost:3000` in your browser +4. The client will automatically connect to the JCHAT server + +## Configuration + +The client connects to `http://localhost:8080` by default. To change this, edit the `serverUrl` in `app.js`: + +```javascript +class JChatApp { + constructor() { + this.jmapClient = new JMAPClient('http://your-server:8080'); + // ... + } +} +``` + +## Browser Support + +Works in any modern browser that supports: +- ES6 Classes +- Fetch API +- Arrow functions +- Template literals + +## No Build Required + +This is intentionally a simple, dependency-free client. No webpack, no npm install, no build process. Just HTML, CSS, and vanilla JavaScript. |