Skip to content

Commit

Permalink
Merge pull request #169 from pawelmalak/v2
Browse files Browse the repository at this point in the history
Version 2.0.0
  • Loading branch information
pawelmalak authored Nov 15, 2021
2 parents 08afaec + cb2326b commit 7eb8ec2
Show file tree
Hide file tree
Showing 159 changed files with 3,648 additions and 2,785 deletions.
1 change: 1 addition & 0 deletions Dockerfile → .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ WORKDIR /app
EXPOSE 5005

ENV NODE_ENV=production
ENV PASSWORD=flame_password

CMD ["node", "server.js"]
12 changes: 11 additions & 1 deletion Dockerfile.dev → .docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
FROM node:lts-alpine as build-front

RUN apk add --no-cache curl

WORKDIR /app

COPY ./client .

RUN npm install --production \
&& npm run build

FROM node:lts-alpine

WORKDIR /app

RUN mkdir -p ./public

COPY --from=build-front /app/build/ ./public

COPY package*.json ./

RUN npm install

COPY . .
CMD ["npm", "run", "skaffold"]

CMD ["npm", "run", "skaffold"]
10 changes: 6 additions & 4 deletions Dockerfile.multiarch → .docker/Dockerfile.multiarch
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:14 as builder
FROM node:14-alpine3.11 as builder

WORKDIR /app

COPY package*.json ./

RUN npm install --production
RUN apk --no-cache --virtual build-dependencies add python make g++ \
&& npm install --production

COPY . .

Expand All @@ -16,7 +17,7 @@ RUN mkdir -p ./public ./data \
&& mv ./client/build/* ./public \
&& rm -rf ./client

FROM node:14-alpine
FROM node:14-alpine3.11

COPY --from=builder /app /app

Expand All @@ -25,5 +26,6 @@ WORKDIR /app
EXPOSE 5005

ENV NODE_ENV=production
ENV PASSWORD=flame_password

CMD ["node", "server.js"]
CMD ["node", "server.js"]
2 changes: 2 additions & 0 deletions docker-compose.yml → .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ services:
- /path/to/data:/app/data
ports:
- 5005:5005
environment:
- PASSWORD=flame_password
restart: unless-stopped
5 changes: 2 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
github
.github
public
build.sh
k8s
skaffold.yaml
skaffold.yaml
4 changes: 3 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PORT=5005
NODE_ENV=development
VERSION=1.7.4
VERSION=2.0.0
PASSWORD=flame_password
SECRET=e02eb43d69953658c6d07311d6313f2d4467672cb881f96b29368ba1f3f4da4b
Binary file removed .github/_apps.png
Binary file not shown.
Binary file removed .github/_bookmarks.png
Binary file not shown.
Binary file removed .github/_home.png
Binary file not shown.
Binary file added .github/apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/bookmarks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
29 changes: 22 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
### v2.0.0 (2021-11-15)
- Added authentication system:
- Only logged in user can access settings ([#33](https://github.com/pawelmalak/flame/issues/33))
- User can set which apps, categories and bookmarks should be available for guest users ([#45](https://github.com/pawelmalak/flame/issues/45))
- Visit [project wiki](https://github.com/pawelmalak/flame/wiki/Authentication) to read more about this feature
- Docker images will now be versioned ([#110](https://github.com/pawelmalak/flame/issues/110))
- Icons can now be set via URL ([#138](https://github.com/pawelmalak/flame/issues/138))
- Added current time to the header ([#157](https://github.com/pawelmalak/flame/issues/157))
- Fixed bug where typing certain characters in the search bar would result in a blank page ([#158](https://github.com/pawelmalak/flame/issues/158))
- Fixed bug with MDI icon name not being properly parsed if there was leading or trailing whitespace ([#164](https://github.com/pawelmalak/flame/issues/164))
- Added new shortcut to clear search bar and focus on it ([#170](https://github.com/pawelmalak/flame/issues/170))
- Added Wikipedia to search queries
- Updated project wiki
- Lots of changes and refactors under the hood to make future development easier

### v1.7.4 (2021-11-08)
- Added option to set custom greetings and date ([#103](https://github.com/pawelmalak/flame/issues/103))
- Fallback to web search if local search has zero results ([#129](https://github.com/pawelmalak/flame/issues/129))
Expand Down Expand Up @@ -62,20 +77,20 @@
- Fixed custom icons not updating ([#58](https://github.com/pawelmalak/flame/issues/58))
- Added changelog file

### v1.6 (2021-07-17)
### v1.6.0 (2021-07-17)
- Added support for Steam URLs ([#62](https://github.com/pawelmalak/flame/issues/62))
- Fixed bug with custom CSS not persisting ([#64](https://github.com/pawelmalak/flame/issues/64))
- Added option to set default prefix for search bar ([#65](https://github.com/pawelmalak/flame/issues/65))

### v1.5 (2021-06-24)
### v1.5.0 (2021-06-24)
- Added ability to set custom CSS from settings ([#8](https://github.com/pawelmalak/flame/issues/8) and [#17](https://github.com/pawelmalak/flame/issues/17)) (experimental)
- Added option to upload custom icons ([#12](https://github.com/pawelmalak/flame/issues/12))
- Added option to open links in a new or the same tab ([#27](https://github.com/pawelmalak/flame/issues/27))
- Added Search bar with support for 3 search engines and 4 services ([#44](https://github.com/pawelmalak/flame/issues/44))
- Added option to hide applications and categories ([#48](https://github.com/pawelmalak/flame/issues/48))
- Improved Logger

### v1.4 (2021-06-18)
### v1.4.0 (2021-06-18)
- Added more sorting options. User can now choose to sort apps and categories by name, creation time or to use custom order ([#13](https://github.com/pawelmalak/flame/issues/13))
- Added reordering functionality. User can now set custom order for apps and categories from their 'edit tables' ([#13](https://github.com/pawelmalak/flame/issues/13))
- Changed get all controllers for applications and categories to use case-insensitive ordering ([#36](https://github.com/pawelmalak/flame/issues/36))
Expand All @@ -84,14 +99,14 @@
- Added update check on app start ([#38](https://github.com/pawelmalak/flame/issues/38))
- Fixed bug with decimal input values in Safari browser ([#40](https://github.com/pawelmalak/flame/issues/40))

### v1.3 (2021-06-14)
### v1.3.0 (2021-06-14)
- Added reverse proxy support ([#23](https://github.com/pawelmalak/flame/issues/23) and [#24](https://github.com/pawelmalak/flame/issues/24))
- Added support for more url formats ([#26](https://github.com/pawelmalak/flame/issues/26))
- Added ability to hide main header ([#28](https://github.com/pawelmalak/flame/issues/28))
- Fixed settings not being synchronized ([#29](https://github.com/pawelmalak/flame/issues/29))
- Added auto-refresh for greeting and date ([#34](https://github.com/pawelmalak/flame/issues/34))

### v1.2 (2021-06-10)
### v1.2.0 (2021-06-10)
- Added simple check to the weather module settings to inform user if the api key is missing ([#2](https://github.com/pawelmalak/flame/issues/2))
- Added ability to set optional icons to the bookmarks ([#7](https://github.com/pawelmalak/flame/issues/7))
- Added option to pin new applications and categories to the homescreen by default ([#11](https://github.com/pawelmalak/flame/issues/11))
Expand All @@ -100,11 +115,11 @@
- Added proxy for websocket instead of using hard coded host ([#18](https://github.com/pawelmalak/flame/issues/18))
- Fixed bug with overwriting opened tabs ([#20](https://github.com/pawelmalak/flame/issues/20))

### v1.1 (2021-06-09)
### v1.1.0 (2021-06-09)
- Added custom favicon and changed page title ([#3](https://github.com/pawelmalak/flame/issues/3))
- Added functionality to set custom page title ([#3](https://github.com/pawelmalak/flame/issues/3))
- Changed messages on the homescreen when there are apps/bookmarks created but not pinned to the homescreen ([#4](https://github.com/pawelmalak/flame/issues/4))
- Added 'warnings' to apps and bookmarks forms about supported url formats ([#5](https://github.com/pawelmalak/flame/issues/5))

### v1.0 (2021-06-08)
### v1.0.0 (2021-06-08)
Initial release of Flame - self-hosted startpage using Node.js on backend and React on frontend.
119 changes: 61 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
# Flame

![Homescreen screenshot](./.github/_home.png)
![Homescreen screenshot](.github/home.png)

## Description

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 application hub in no time - no file editing necessary.
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 application hub in no time - no file editing necessary.

## Technology

- Backend
- Node.js + Express
- Sequelize ORM + SQLite
- Frontend
- React
- Redux
- TypeScript
- Deployment
- Docker
- Kubernetes

## Development

```sh
# clone repository
git clone https://github.com/pawelmalak/flame
cd flame

# run only once
npm run dev-init

# start backend and frontend development servers
npm run dev
```
## Functionality
- 📝 Create, update, delete your applications and bookmarks directly from the app using built-in GUI editors
- 📌 Pin your favourite items to the homescreen for quick and easy access
- 🔍 Integrated search bar with local filtering, 11 web search providers and ability to add your own
- 🔑 Authentication system to protect your settings, apps and bookmarks
- 🔨 Dozens of option to customize Flame interface to your needs, including support for custom CSS and 15 built-in color themes
- ☀️ Weather widget with current temperature, cloud coverage and animated weather status
- 🐳 Docker integration to automatically pick and add apps based on their labels

## Installation

Expand All @@ -40,34 +22,36 @@ npm run dev
[Docker Hub link](https://hub.docker.com/r/pawelmalak/flame)

```sh
docker pull pawelmalak/flame:latest
docker pull pawelmalak/flame

# for ARM architecture (e.g. RaspberryPi)
docker pull pawelmalak/flame:multiarch

# installing specific version
docker pull pawelmalak/flame:2.0.0
```

#### Deployment

```sh
# run container
docker run -p 5005:5005 -v /path/to/data:/app/data -e PASSWORD=flame_password flame
```

#### Building images

```sh
# build image for amd64 only
docker build -t flame .
docker build -t flame -f .docker/Dockerfile .

# 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 \
-f .docker/Dockerfile.multiarch \
-t flame:multiarch .
```

#### Deployment

```sh
# run container
docker run -p 5005:5005 -v /path/to/data:/app/data flame
```

#### Docker-Compose

```yaml
Expand All @@ -81,6 +65,8 @@ services:
- /var/run/docker.sock:/var/run/docker.sock # optional but required for Docker integration feature
ports:
- 5005:5005
environment:
- PASSWORD=flame_password
restart: unless-stopped
```
Expand All @@ -95,39 +81,56 @@ skaffold dev

Follow instructions from wiki: [Installation without Docker](https://github.com/pawelmalak/flame/wiki/Installation-without-docker)

## Functionality
## Development

### Technology

- Backend
- Node.js + Express
- Sequelize ORM + SQLite
- Frontend
- React
- Redux
- TypeScript
- Deployment
- Docker
- Kubernetes

### Creating dev environment

- Applications
- Create, update, delete and organize applications using GUI
- Pin your favourite apps to the homescreen
```sh
# clone repository
git clone https://github.com/pawelmalak/flame
cd flame

![Homescreen screenshot](./.github/_apps.png)
# run only once
npm run dev-init

- Bookmarks
- Create, update, delete and organize bookmarks and categories using GUI
- Pin your favourite categories to the homescreen
- Import html bookmarks (experimental)
# start backend and frontend development servers
npm run dev
```

![Homescreen screenshot](./.github/_bookmarks.png)
## Screenshots

- Weather
![Apps screenshot](.github/apps.png)

- Get current temperature, cloud coverage and weather status with animated icons
![Bookmarks screenshot](.github/bookmarks.png)

- Themes
- Customize your page by choosing from 15 color themes
![Settings screenshot](.github/settings.png)

![Homescreen screenshot](./.github/_themes.png)
![Themes screenshot](.github/themes.png)

## Usage

### Authentication

Visit [project wiki](https://github.com/pawelmalak/flame/wiki/Authentication) to read more about authentication

### Search bar

#### Searching

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
The default search setting is to search through all your apps and bookmarks. If you want to search using specific search engine, 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`.

For list of supported search engines, shortcuts and more about searching functionality visit [project wiki](https://github.com/pawelmalak/flame/wiki/Search-bar).

Expand All @@ -151,7 +154,7 @@ labels:
# - flame.icon=custom to make changes in app. ie: custom icon upload
```

> "Use Docker API" option must be enabled for this to work. You can find it in Settings > Other > Docker section
> "Use Docker API" option must be enabled for this to work. You can find it in Settings > Docker
You can also set up different apps in the same label adding `;` between each one.

Expand Down Expand Up @@ -199,7 +202,7 @@ metadata:
- flame.pawelmalak/icon=icon-name # optional, default is "kubernetes"
```

> "Use Kubernetes Ingress API" option must be enabled for this to work. You can find it in Settings > Other > Kubernetes section
> "Use Kubernetes Ingress API" option must be enabled for this to work. You can find it in Settings > Docker

### Import HTML Bookmarks (Experimental)

Expand Down
3 changes: 2 additions & 1 deletion api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { join } = require('path');
const express = require('express');
const errorHandler = require('./middleware/errorHandler');
const { errorHandler } = require('./middleware');

const api = express();

Expand All @@ -21,6 +21,7 @@ api.use('/api/weather', require('./routes/weather'));
api.use('/api/categories', require('./routes/category'));
api.use('/api/bookmarks', require('./routes/bookmark'));
api.use('/api/queries', require('./routes/queries'));
api.use('/api/auth', require('./routes/auth'));

// Custom error handler
api.use(errorHandler);
Expand Down
2 changes: 1 addition & 1 deletion client/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_VERSION=1.7.4
REACT_APP_VERSION=2.0.0
Loading

0 comments on commit 7eb8ec2

Please sign in to comment.