hzl-web 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# hzl-web
|
|
2
|
+
|
|
3
|
+
Web dashboard for [HZL](https://github.com/tmchow/hzl) - a Kanban-style task monitoring UI.
|
|
4
|
+
|
|
5
|
+
This package provides the web server and dashboard for programmatic use. For the CLI (which includes `hzl serve`), install [`hzl-cli`](https://www.npmjs.com/package/hzl-cli) instead.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install hzl-web
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { createConnection, runMigrations, EventStore, ProjectionEngine, TaskService } from 'hzl-core';
|
|
17
|
+
import { createWebServer } from 'hzl-web';
|
|
18
|
+
|
|
19
|
+
// Initialize database and services
|
|
20
|
+
const db = createConnection('/path/to/data.db');
|
|
21
|
+
runMigrations(db);
|
|
22
|
+
const eventStore = new EventStore(db);
|
|
23
|
+
const projectionEngine = new ProjectionEngine(db, eventStore);
|
|
24
|
+
const taskService = new TaskService(db, eventStore, projectionEngine);
|
|
25
|
+
|
|
26
|
+
// Start the web server
|
|
27
|
+
const server = createWebServer({
|
|
28
|
+
port: 3456,
|
|
29
|
+
host: '0.0.0.0', // or '127.0.0.1' for localhost only
|
|
30
|
+
taskService,
|
|
31
|
+
eventStore,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
console.log(`Dashboard running at ${server.url}`);
|
|
35
|
+
|
|
36
|
+
// Stop the server when done
|
|
37
|
+
await server.close();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- **Kanban board**: Columns for Backlog, Blocked, Ready, In Progress, and Done
|
|
43
|
+
- **Date filtering**: Today, Last 3d, 7d, 14d, 30d
|
|
44
|
+
- **Project filtering**: Focus on a single project
|
|
45
|
+
- **Task details**: Click any card to see description, comments, and checkpoints
|
|
46
|
+
- **Activity panel**: Recent status changes and events
|
|
47
|
+
- **Auto-refresh**: Polls for updates (configurable interval)
|
|
48
|
+
|
|
49
|
+
## API Endpoints
|
|
50
|
+
|
|
51
|
+
The server exposes a JSON API:
|
|
52
|
+
|
|
53
|
+
- `GET /api/tasks` - List tasks (query: `since`, `project`)
|
|
54
|
+
- `GET /api/tasks/:id` - Task details
|
|
55
|
+
- `GET /api/tasks/:id/comments` - Task comments
|
|
56
|
+
- `GET /api/tasks/:id/checkpoints` - Task checkpoints
|
|
57
|
+
- `GET /api/events` - Recent events (query: `since` for event ID)
|
|
58
|
+
- `GET /api/stats` - Task statistics
|
|
59
|
+
|
|
60
|
+
## Exports
|
|
61
|
+
|
|
62
|
+
- `createWebServer(options)` - Create and start the web server
|
|
63
|
+
- `ServerOptions` - Configuration type
|
|
64
|
+
- `ServerHandle` - Server control interface (close, port, host, url)
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hzl-web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Web dashboard for HZL - A Kanban-style task monitoring UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md"
|
|
16
17
|
],
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|