2021-06-07 11:40:51 +00:00
# Flame
2021-06-10 22:09:25 +00:00
[![JS Badge ](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black )](https://shields.io/)
[![TS Badge ](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white )](https://shields.io/)
2021-06-14 10:13:38 +00:00
[![Node Badge ](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white )](https://shields.io/)
2021-06-10 22:09:25 +00:00
[![React Badge ](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB )](https://shields.io/)
2021-08-03 08:22:55 +00:00
![Homescreen screenshot ](./.github/_home.png )
2021-06-08 10:51:50 +00:00
2021-06-07 11:40:51 +00:00
## Description
2021-08-03 08:22:55 +00:00
2021-06-18 12:12:17 +00:00
Flame is self-hosted startpage for your server. Its design is inspired (heavily) by [SUI ](https://github.com/jeroenpardon/sui ). Flame is very easy to setup and use. With built-in editors it allows you to setup your very own appliaction hub in no time - no file editing necessary.
2021-06-07 11:40:51 +00:00
## Technology
2021-08-03 08:22:55 +00:00
2021-06-07 11:40:51 +00:00
- Backend
- Node.js + Express
- Sequelize ORM + SQLite
- Frontend
2021-08-03 08:22:55 +00:00
- React
2021-06-07 11:40:51 +00:00
- Redux
- TypeScript
- Deployment
- Docker
2021-08-17 08:32:15 +00:00
- Kubernetes
2021-06-07 11:40:51 +00:00
## Development
2021-08-03 08:22:55 +00:00
2021-06-07 11:40:51 +00:00
```sh
2021-06-18 12:12:17 +00:00
# clone repository
2021-06-07 11:40:51 +00:00
git clone https://github.com/pawelmalak/flame
cd flame
# run only once
2021-09-06 12:46:05 +00:00
npm run dev-init
2021-06-07 11:40:51 +00:00
# start backend and frontend development servers
npm run dev
```
2021-08-03 08:22:55 +00:00
## Installation
2021-06-21 11:59:17 +00:00
### With Docker (recommended)
2021-06-27 23:33:27 +00:00
[Docker Hub ](https://hub.docker.com/r/pawelmalak/flame )
2021-06-21 11:59:17 +00:00
#### Building images
2021-08-03 08:22:55 +00:00
2021-06-07 11:40:51 +00:00
```sh
2021-06-18 12:12:17 +00:00
# build image for amd64 only
2021-06-07 11:40:51 +00:00
docker build -t flame .
2021-06-18 12:12:17 +00:00
# build multiarch image for amd64, armv7 and arm64
# building failed multiple times with 2GB memory usage limit so you might want to increase it
docker buildx build \
--platform linux/arm/v7,linux/arm64,linux/amd64 \
-f Dockerfile.multiarch \
-t flame:multiarch .
```
2021-06-21 11:59:17 +00:00
#### Deployment
2021-08-03 08:22:55 +00:00
2021-06-18 12:12:17 +00:00
```sh
2021-06-07 11:40:51 +00:00
# run container
2021-06-18 12:12:17 +00:00
docker run -p 5005:5005 -v /path/to/data:/app/data flame
2021-06-07 11:40:51 +00:00
```
2021-06-27 23:33:27 +00:00
#### Docker-Compose
2021-08-03 08:22:55 +00:00
2021-06-27 23:33:27 +00:00
```yaml
2021-08-03 08:22:55 +00:00
version: '2.1'
2021-06-27 23:33:27 +00:00
services:
flame:
image: pawelmalak/flame:latest
container_name: flame
volumes:
- < host_dir > :/app/data
2021-08-09 10:54:07 +00:00
- /var/run/docker.sock:/var/run/docker.sock # optional but required for Docker integration feature
2021-06-27 23:33:27 +00:00
ports:
- 5005:5005
restart: unless-stopped
```
2021-08-17 08:32:15 +00:00
#### Skaffold
```sh
# use skaffold
skaffold dev
```
2021-06-21 11:59:17 +00:00
### Without Docker
2021-08-03 08:22:55 +00:00
2021-06-21 11:59:17 +00:00
Follow instructions from wiki: [Installation without Docker ](https://github.com/pawelmalak/flame/wiki/Installation-without-docker )
2021-06-07 11:40:51 +00:00
## Functionality
2021-08-03 08:22:55 +00:00
2021-06-08 10:51:50 +00:00
- Applications
2021-06-21 11:59:17 +00:00
- Create, update, delete and organize applications using GUI
2021-06-08 10:51:50 +00:00
- Pin your favourite apps to homescreen
2021-08-03 08:22:55 +00:00
![Homescreen screenshot ](./.github/_apps.png )
2021-06-08 10:51:50 +00:00
- Bookmarks
2021-06-21 11:59:17 +00:00
- Create, update, delete and organize bookmarks and categories using GUI
2021-06-08 10:51:50 +00:00
- Pin your favourite categories to homescreen
2021-08-03 08:22:55 +00:00
![Homescreen screenshot ](./.github/_bookmarks.png )
2021-06-08 10:51:50 +00:00
- Weather
2021-08-03 08:22:55 +00:00
2021-06-08 10:51:50 +00:00
- Get current temperature, cloud coverage and weather status with animated icons
2021-06-21 11:59:17 +00:00
2021-06-08 10:51:50 +00:00
- Themes
2021-08-03 08:22:55 +00:00
- Customize your page by choosing from 12 color themes
2021-06-08 10:51:50 +00:00
2021-08-03 08:22:55 +00:00
![Homescreen screenshot ](./.github/_themes.png )
2021-06-11 13:33:06 +00:00
## Usage
2021-08-03 08:22:55 +00:00
2021-06-24 10:53:45 +00:00
### Search bar
2021-08-03 08:22:55 +00:00
2021-06-25 08:42:44 +00:00
#### Searching
2021-08-03 08:22:55 +00:00
2021-06-25 08:42:44 +00:00
To use search bar you need to type your search query with selected prefix. For example, to search for "what is docker" using google search you would type: `/g what is docker` .
> You can change where to open search results (same/new tab) in the settings
2021-06-24 10:53:45 +00:00
#### Supported search engines
2021-08-03 08:22:55 +00:00
2021-06-24 10:53:45 +00:00
| Name | Prefix | Search URL |
2021-08-03 08:22:55 +00:00
| ---------- | ------ | ----------------------------------- |
2021-06-24 10:53:45 +00:00
| Disroot | /ds | http://search.disroot.org/search?q= |
| DuckDuckGo | /d | https://duckduckgo.com/?q= |
| Google | /g | https://www.google.com/search?q= |
#### Supported services
2021-08-03 08:22:55 +00:00
2021-06-24 10:53:45 +00:00
| Name | Prefix | Search URL |
2021-08-03 08:22:55 +00:00
| ------------------ | ------ | --------------------------------------------- |
2021-06-24 10:53:45 +00:00
| IMDb | /im | https://www.imdb.com/find?q= |
2021-06-25 08:42:44 +00:00
| Reddit | /r | https://www.reddit.com/search?q= |
| Spotify | /sp | https://open.spotify.com/search/ |
2021-06-24 10:53:45 +00:00
| The Movie Database | /mv | https://www.themoviedb.org/search?query= |
| Youtube | /yt | https://www.youtube.com/results?search_query= |
2021-06-21 11:59:17 +00:00
### Setting up weather module
2021-08-03 08:22:55 +00:00
2021-06-21 11:59:17 +00:00
1. Obtain API Key from [Weather API ](https://www.weatherapi.com/pricing.aspx ).
> Free plan allows for 1M calls per month. Flame is making less then 3K API calls per month.
2. Get lat/long for your location. You can get them from [latlong.net ](https://www.latlong.net/convert-address-to-lat-long.html ).
3. Enter and save data. Weather widget will now update and should be visible on Home page.
2021-06-12 23:06:42 +00:00
### Supported URL formats for applications and bookmarks
2021-08-03 08:22:55 +00:00
2021-06-11 13:33:06 +00:00
#### Rules
2021-08-03 08:22:55 +00:00
2021-06-11 13:33:06 +00:00
- URL starts with `http://`
- Format: `http://www.domain.com` , `http://domain.com`
- Redirect: `{dest}`
- URL starts with `https://`
- Format: `https://www.domain.com` , `https://domain.com`
- Redirect: `https://{dest}`
- URL without protocol
- Format: `www.domain.com` , `domain.com` , `sub.domain.com` , `local` , `ip` , `ip:port`
2021-06-18 12:12:17 +00:00
- Redirect: `http://{dest}`
2021-08-04 20:19:35 +00:00
### Docker integration
In order to use the Docker integration, each container must have the following labels:
```yml
labels:
- flame.type=application # "app" works too
- flame.name=My container
- flame.url=https://example.com
- flame.icon=icon-name # Optional, default is "docker"
2021-09-29 20:26:12 +00:00
# - flame.icon=custom to make changes in app. ie: custom icon upload
```
You can set up different apps in the same label adding `;` between each one.
```yml
labels:
- flame.type=application
- flame.name=First App;Second App
- flame.url=https://example1.com;https://example2.com
- flame.icon=icon-name1;icon-name2
2021-08-04 20:19:35 +00:00
```
And you must have activated the Docker sync option in the settings panel.
2021-08-17 08:32:15 +00:00
### Kubernetes integration
In order to use the Kubernetes integration, each ingress must have the following annotations:
```yml
metadata:
annotations:
- flame.pawelmalak/type=application # "app" works too
- flame.pawelmalak/name=My container
- flame.pawelmalak/url=https://example.com
- flame.pawelmalak/icon=icon-name # Optional, default is "kubernetes"
```
And you must have activated the Kubernetes sync option in the settings panel.
2021-06-23 12:15:14 +00:00
### Custom CSS
2021-08-03 08:22:55 +00:00
2021-06-23 12:15:14 +00:00
> This is an experimental feature. Its behaviour might change in the future.
2021-08-03 08:22:55 +00:00
>
2021-08-09 10:54:07 +00:00
> Follow instructions from wiki: [Custom CSS](https://github.com/pawelmalak/flame/wiki/Custom-CSS)