Neale Pickett
·
2023-03-11
README.md
1# Homelab Portal
2
3This repository provide some simple scaffolding to build a landing page for your homelab.
4You can link to all your stuff,
5including pretty icons,
6and your apps will show up under the same top URL,
7like they all work together somehow.
8
9
10
11
12# portal.json
13
14You define all your services in `/web/portal.json`.
15It works like this:
16
17```json
18[
19 {
20 "name": "My Thing",
21 "href": "https://myhost.example.org/path/to/my/thing/",
22 "icon": "https://myhost.example.org/path/to/my/thing/icons.png"
23 },
24 {
25 "name": "Another thing",
26 "href": "https://example.net/",
27 "target": "_blank"
28 },
29 {
30 "name": "Stat",
31 "href": "/stat.html",
32 "app": "stat"
33 }
34]
35```
36
37Some notes:
38
39* `"target": "_blank"` will cause clicks to open in a new tab
40* `"app": "stat"` makes the icon be the built-in CPU stats pie chart
41
42
43# Other uses for this
44
45Since the portal stuff is all static files,
46you could just not use any of that,
47and instead use this as a service to provide CPU stats.
48Just open `/stats.html` instead of `/`.
49Or write your own ECMAScript code that imports `stat.mjs`.
50
51
52# Alternatives
53
54There are lots of other things like this around.
55Probably the shiniest is called "Heimdall".
56
57I made this one because I didn't want to run yet another database
58or a PHP server
59when I am perfectly happy editing a JSON file
60and having my browser do all the work.
61
62Because this runs so much in the browser,
63no resources are used when no users are active,
64and when there are users,
65it's still very light:
66less than 1% CPU on my Raspberry Pi.