Add statistics dashboard

This commit is contained in:
Space-Banane
2026-01-17 15:48:05 +01:00
parent 6b73ca4b21
commit 207c5bbf7a
2 changed files with 90 additions and 9 deletions

View File

@@ -5,6 +5,8 @@ A simple clipboard synchronization tool built with Go. It consists of a server a
- Real-time clipboard synchronization
- Cross-platform support (Windows, macOS, Linux)
- Easy to set up and use
- Lightweight and efficient
- Optional statistics dashboard for monitoring connected clients and message relay counts
## Prerequisites
- Go programming language installed (version 1.16 or higher)
@@ -27,6 +29,7 @@ const (
// Update these values before building
EmbeddedServerIP = "0.0.0.0"
EmbeddedServerPort = "8080"
EmbeddedServerStats = true
)
```
@@ -58,6 +61,15 @@ I use this on my home server, which i can connect to with tailscale, so i don't
Clients are identified by the `EmbeddedIdentification` value in the client config file. Make sure to set this to a unique value for each USER you want to sync. If you want to sync multiple devices for the same user, just run multiple instances of the client with the same `EmbeddedIdentification`.
## Statistics Dashboard
If `EmbeddedServerStats` is set, the server will serve a live statistics dashboard at [http://localhost:8080/stats](http://localhost:8080/stats) showing:
- Number of connected clients
- Number of messages relayed
The dashboard uses [Tailwind CSS CDN](https://cdn.tailwindcss.com) for styling and updates live every second.
## License
This project is licensed under the MIT License.