Skip to content

Commit 58a38de

Browse files
committed
Sitemap + llms.txt
1 parent c210c93 commit 58a38de

6 files changed

Lines changed: 133 additions & 2 deletions

File tree

web-demo/src/app.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
<meta property="twitter:title" content="HapticWebPlugin - MX Master 4 Haptics API" />
2323
<meta property="twitter:description" content="A Logi Actions SDK plugin that exposes MX Master 4 haptic feedback via a local HTTP API, enabling external programs to trigger tactile waveforms." />
2424
<meta property="twitter:image" content="%sveltekit.assets%/og-image.png" />
25+
26+
<!-- LLM documentation -->
27+
<link rel="alternate" type="text/plain" title="LLM documentation" href="/llms.txt" />
28+
2529
%sveltekit.head%
2630
</head>
2731

web-demo/src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<!-- Left: Text content -->
4444
<div class="space-y-6">
4545
<div class="flex items-center gap-3">
46-
<Badge variant="secondary">Logi Actions SDK</Badge>
46+
<Badge variant="outline">Logi Actions SDK</Badge>
4747
<Badge variant="outline">Open Source</Badge>
4848
</div>
4949

web-demo/src/routes/api/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<div class="max-w-6xl mx-auto px-4 py-12">
2828
<!-- Header -->
2929
<div class="space-y-4 mb-12">
30-
<Badge variant="secondary">API Reference</Badge>
3130
<h1 class="text-4xl font-bold">API Documentation</h1>
3231
<p class="text-lg text-muted-foreground">
3332
Complete reference for the REST and WebSocket APIs.

web-demo/static/llms.txt

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# HapticWeb
2+
3+
> A Logi Actions SDK plugin that exposes MX Master 4 haptic feedback via a local HTTPS server and WebSocket API.
4+
5+
HapticWeb enables web applications to trigger haptic feedback on Logitech MX Master 4 mice through a simple REST and WebSocket API running locally.
6+
7+
## Website
8+
9+
- Homepage: https://haptics.jmw.nz
10+
- Source Code: https://github.com/fallstop/HapticWebPlugin
11+
12+
## Pages
13+
14+
- [Home](https://haptics.jmw.nz/): Overview of the HapticWeb plugin and its capabilities
15+
- [Install](https://haptics.jmw.nz/install): Installation guide for the plugin
16+
- [Integrate](https://haptics.jmw.nz/integrate): Developer guide for adding haptics to web apps
17+
- [API Reference](https://haptics.jmw.nz/api): Complete REST and WebSocket API documentation
18+
- [Playground](https://haptics.jmw.nz/playground): Interactive demo to try all 16 haptic waveforms
19+
20+
## Requirements
21+
22+
- Logitech MX Master 4 mouse
23+
- Logi Options+ installed
24+
- Logi Plugin Service running
25+
26+
## API Overview
27+
28+
The plugin runs an HTTPS server on `https://local.jmw.nz:41443/` when loaded.
29+
30+
### REST Endpoints
31+
32+
| Endpoint | Method | Description |
33+
|----------|--------|-------------|
34+
| `/` | GET | Health check with service info and available endpoints |
35+
| `/waveforms` | GET | List all 15 available haptic waveforms |
36+
| `/haptic/{waveform}` | POST | Trigger a specific haptic waveform |
37+
38+
### WebSocket Endpoint
39+
40+
`wss://local.jmw.nz:41443/ws`
41+
42+
Send a single byte containing the waveform index (0-14) to trigger haptic feedback.
43+
44+
## Available Waveforms
45+
46+
| Waveform | Index | Category |
47+
|----------|-------|----------|
48+
| `sharp_collision` | 0 | Precision enhancers |
49+
| `sharp_state_change` | 1 | Progress indicators |
50+
| `knock` | 2 | Incoming events |
51+
| `damp_collision` | 3 | Precision enhancers |
52+
| `mad` | 4 | Progress indicators |
53+
| `ringing` | 5 | Incoming events |
54+
| `subtle_collision` | 6 | Precision enhancers |
55+
| `completed` | 7 | Progress indicators |
56+
| `jingle` | 8 | Incoming events |
57+
| `damp_state_change` | 9 | Precision enhancers |
58+
| `firework` | 10 | Progress indicators |
59+
| `happy_alert` | 11 | Progress indicators |
60+
| `wave` | 12 | Progress indicators |
61+
| `angry_alert` | 13 | Progress indicators |
62+
| `square` | 14 | Progress indicators |
63+
64+
## Quick Start
65+
66+
### REST API Example
67+
68+
```bash
69+
# Trigger haptic feedback
70+
curl -X POST -d '' https://local.jmw.nz:41443/haptic/sharp_collision
71+
```
72+
73+
### WebSocket Example (JavaScript)
74+
75+
```javascript
76+
const ws = new WebSocket('wss://local.jmw.nz:41443/ws');
77+
78+
ws.onopen = () => {
79+
// Trigger "completed" waveform (index 7)
80+
ws.send(new Uint8Array([7]));
81+
};
82+
```
83+
84+
## Technical Details
85+
86+
- **Server:** NetCoreServer-based HTTPS/WSS
87+
- **Port:** 41443 (HTTPS only)
88+
- **Certificate:** Auto-managed, uses local.jmw.nz domain
89+
- **CORS:** Enabled for any origin
90+
- **Binding:** 127.0.0.1 only
91+
92+
## License
93+
94+
MIT License - See https://github.com/fallstop/HapticWebPlugin/blob/main/LICENSE.md

web-demo/static/robots.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# allow crawling everything by default
22
User-agent: *
33
Disallow:
4+
5+
# Sitemap
6+
Sitemap: https://haptics.jmw.nz/sitemap.xml
7+
8+
# LLM documentation
9+
# See https://llmstxt.org/ for more information

web-demo/static/sitemap.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://haptics.jmw.nz/</loc>
5+
<changefreq>weekly</changefreq>
6+
<priority>1.0</priority>
7+
</url>
8+
<url>
9+
<loc>https://haptics.jmw.nz/install</loc>
10+
<changefreq>monthly</changefreq>
11+
<priority>0.8</priority>
12+
</url>
13+
<url>
14+
<loc>https://haptics.jmw.nz/integrate</loc>
15+
<changefreq>monthly</changefreq>
16+
<priority>0.8</priority>
17+
</url>
18+
<url>
19+
<loc>https://haptics.jmw.nz/api</loc>
20+
<changefreq>monthly</changefreq>
21+
<priority>0.9</priority>
22+
</url>
23+
<url>
24+
<loc>https://haptics.jmw.nz/playground</loc>
25+
<changefreq>monthly</changefreq>
26+
<priority>0.7</priority>
27+
</url>
28+
</urlset>

0 commit comments

Comments
 (0)