bulma | ||
resources | ||
.gitignore | ||
.gitm.toml | ||
AdvMakefile | ||
config.go | ||
extra.go | ||
go.mod | ||
go.sum | ||
LICENSE | ||
main.go | ||
README.md | ||
routes.go | ||
simpledash-sample.toml | ||
template.go |
simpledash
Simple and fast dashboard with a go backend and a mostly HTML+CSS frontend with a small amount of JS.
Building
Dependencies:
- sqlite3 (and sqlite3-dev if on debian/ubuntu)
- golang (1.14+)
To build, simply run go build
in the repo.
Configuration
Configuration is done in the simpledash.toml
file.
Root
The root section is the one not under any header.
It contains the following fields:
title
: Title used for whole sitetheme
: Theme used for site, can be light or dark.loginRequired
: Boolean denoting whether login is required to see public cardsallowProxy
: Array containing all sites allowed to be proxied by the integrated HTTP proxy
Users
A user can be added under the [users]
section like so:
[users]
[users.admin]
passwordHash = "$2a$10$w00dzQ1PP6nwXLhuzV2pFOUU6m8bcZXtDX3UVxpOYq3fTSwVMqPge"
showPublic = true
passwordHash
should be a bcrypt hash of the desired password with a cost of 10 (default). simpledash --hash <password>
can be used to get a suitable hash
showPublic
should be a boolean denoting whether public cards should be displayed while signed in
Cards
A card can either be public or belong to a user. A public card should be added under [users]
like so:
[users]
[[users._public_.card]]
type = "weather"
title = "Weather"
data = {"woeid" = "2442047"}
A card belonging to a user should be added under that user, like so:
[users.admin]
passwordHash = "$2a$10$w00dzQ1PP6nwXLhuzV2pFOUU6m8bcZXtDX3UVxpOYq3fTSwVMqPge"
showPublic = true
[[users.admin.card]]
type = "status"
title = "Google"
icon = "ion:logo-google"
desc = "Google search engine. Status card example."
url = "https://www.google.com"
The configuration for a card consists of up to six things:
- Type: Type of card to display
- Title: Title to show above card
- Icon: Icon to display on card
- Description: Description for card
- URL: URL to be used inside card
- Data: Extra data for anything not listed
Icons can be anything found on Iconify
There are currently five types of cards included:
- Simple: Simplest type of card, displays title, icon, description, and URL
- Status: Same as simple but also checks and displays status of URL
- Collection: A card containing multiple links to different sites. Links provided in data field.
- Weather: Display weather using data from Metaweather. Gets location via WOEIDs
- API: Gets JSON data from URL and formats according to
format
field in data. At least part of URL must be insideallowedProxy
array.
Examples for each card are included in simpledash-sample.toml
Session
The session cookie name can be set under [session]
like so:
[session]
name = "simpledash-session"