dashboard/README.md

231 lines
4.7 KiB
Markdown
Raw Normal View History

2020-05-24 22:17:56 +02:00
# Dashboard
2020-05-20 13:49:49 +02:00
2021-03-06 10:16:31 +01:00
## IMPORTANT: UPDATE
Yesterday, an update has been released that changed a couple of things:
- The serving port has been changed from `3000` to `8080`.
- The structure of `imprint.json` has been changed. Make sure that the format of your `imprint.json`-file matches the format of the ones within this repository.
![Alt text](/screenshot.png?raw=true "screenshot")
2020-05-20 13:49:49 +02:00
2020-05-20 21:00:45 +02:00
Dashboard is just that - a dashboard. It's inspired by [SUI](https://github.com/jeroenpardon/sui) and has all the same features as SUI, such as simple customization through JSON-files and a handy search bar to search the internet more efficiently.
2020-05-20 13:49:49 +02:00
2020-05-20 17:03:19 +02:00
## Features
So what makes this thing better than SUI?
2021-03-06 10:16:31 +01:00
- "Display URL" functionality, in case the URL you want to show is different than the URL you want to be redirected to
- Theming through JSON
- Search providers customizable through JSON (SUI has them both in a JSON and hardcoded)
2020-05-20 17:03:19 +02:00
2020-05-20 13:49:49 +02:00
## Installation
2020-05-20 18:46:58 +02:00
Getting Dashboard to run is fairly simple and can be accomplished with two techniques:
1. Locally
2020-05-24 15:16:20 +02:00
Prerequisites: yarn, npm, node
2020-05-20 18:46:58 +02:00
```
$ git clone https://github.com/phntxx/dashboard.git
$ cd dashboard/
$ yarn
$ yarn build
$ yarn serve:production
2020-05-20 18:46:58 +02:00
```
2. Using Docker
2020-05-20 13:49:49 +02:00
2020-05-20 18:46:58 +02:00
```
$ docker run -d \
-v $(pwd)/data:/app/data
2021-03-19 15:50:59 +01:00
-p 8080:8080 \
--name dashboard \
2020-05-24 22:17:56 +02:00
phntxx/dashboard
2020-05-20 18:46:58 +02:00
```
2020-06-08 13:29:00 +02:00
Sample Docker Compose configuration:
```
version: "3"
services:
dashboard:
image: phntxx/dashboard:latest
restart: unless-stopped
volumes:
- [path to data directory]:/app/data
ports:
2021-03-06 10:16:31 +01:00
- 8080:8080
2020-06-08 13:29:00 +02:00
```
2020-05-24 22:17:56 +02:00
**Note: You might still need to clone the repository in order to get the JSON-files which are required for the
app to run**
2020-05-20 13:49:49 +02:00
## Customization
2020-05-20 18:46:58 +02:00
2020-05-20 13:49:49 +02:00
Dashboard is designed to be customizable. Everything is handled using four .json-files, which can be found at /src/components/data
### Applications
2020-05-20 18:46:58 +02:00
To add an application, append the following to apps.json or simply edit one of the examples given.
2020-05-20 13:49:49 +02:00
```
2020-05-20 17:03:19 +02:00
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
}
...
2020-05-20 13:49:49 +02:00
```
2020-05-20 18:46:58 +02:00
To find icons, simply go to the [Material Design Icon Library](https://material.io/icons/) and copy one of the codes for an icon there.
2020-05-20 13:49:49 +02:00
**NEW FEATURE: CATEGORIES**
To add a category to your dashboard, change apps.json to resemble the following:
```
{
"categories": [
...
],
"apps": [
...
]
}
```
Then, a category can be added by entering the following within the "categories" field:
```
{
"name": "[Name of the category]",
"items": [
[Application goes here]
]
}
```
In the end, your apps.json file should look something like this:
1. Without categories
```
{
"apps": [
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
},
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
},
...
]
}
```
2. With apps and categories
```
{
"categories": [
{
"name": "[Name of the category]",
"items": [
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
},
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
},
...
]
},
...
],
"apps": [
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
},
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
},
...
]
}
```
2020-05-20 13:49:49 +02:00
### Bookmarks
2020-06-08 22:09:46 +02:00
To add a bookmark, append the following to bookmarks.json or simply edit one of the examples given.
2020-05-20 13:49:49 +02:00
```
2020-05-20 17:03:19 +02:00
{
"name": "[Category name]",
"items": [
{
"name": "[Bookmark name]",
"url": "[URL to redirect to]"
},
{
"name": "[Bookmark name]",
"url": "[URL to redirect to]"
},
{
"name": "[Bookmark name]",
"url": "[URL to redirect to]"
}
...
]
},
...
2020-05-20 13:49:49 +02:00
```
### Theming:
2020-05-20 18:46:58 +02:00
2020-05-20 13:49:49 +02:00
Dashboard also supports themes with the help of a simple JSON-file: themes.json. To add a theme, append the following to themes.json:
```
2020-05-20 17:03:19 +02:00
{
"label": "[Theme Name]",
"value": [Number of the theme],
"mainColor": "[Main Color as 6-character hex code]",
"accentColor": "[Accent Color as 6-character hex code]",
"backgroundColor": "[Background Color as 6-character hex code]"
}
```
### Search Providers:
2020-05-20 18:46:58 +02:00
2020-05-20 17:03:19 +02:00
The searchbar on the top supports shortcuts like "/so", just as SUI does. To add one of your own, simply append the following to search.json
```
{
"name":"[Name of the website]",
"url":"[Link that processes searches on that website]",
"prefix":"[a custom prefix]"
},
2020-05-20 13:49:49 +02:00
```