Compare commits
3 Commits
5756770b64
...
ef17fb8e8e
Author | SHA1 | Date |
---|---|---|
Brieuc Dubois | ef17fb8e8e | |
Brieuc Dubois | 4adb510acd | |
Brieuc Dubois | e56bf6becf |
|
@ -1,49 +0,0 @@
|
||||||
name: Backend docker image
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."git.bhasher.com"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.bhasher.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push frontend
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./backend
|
|
||||||
file: ./backend/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
tags: |
|
|
||||||
git.bhasher.com/bhasher/focus-backend:latest
|
|
||||||
git.bhasher.com/bhasher/focus-backend:${{ steps.tagName.outputs.tag }}
|
|
|
@ -1,49 +0,0 @@
|
||||||
name: Frontend and backend docker image
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."git.bhasher.com"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.bhasher.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push frontend
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
tags: |
|
|
||||||
git.bhasher.com/bhasher/focus:latest
|
|
||||||
git.bhasher.com/bhasher/focus:${{ steps.tagName.outputs.tag }}
|
|
|
@ -1,56 +0,0 @@
|
||||||
name: Tauri based desktop app
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri-desktop:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
|
||||||
run: |
|
|
||||||
cd frontend
|
|
||||||
npm install
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Build desktop app
|
|
||||||
run: |
|
|
||||||
cd frontend
|
|
||||||
npm run tauri build
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Publish desktop app
|
|
||||||
uses: akkuman/gitea-release-action@v1
|
|
||||||
with:
|
|
||||||
name: Focus ${{ steps.tagName.outputs.tag }}
|
|
||||||
prerelease: true
|
|
||||||
files: |-
|
|
||||||
frontend/src-tauri/target/release/focus
|
|
||||||
frontend/src-tauri/target/release/bundle/deb/*.deb
|
|
||||||
frontend/src-tauri/target/release/bundle/appimage/*.AppImage
|
|
|
@ -1,49 +0,0 @@
|
||||||
name: Frontend docker image
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Extract tag
|
|
||||||
uses: olegtarasov/get-tag@v2.1.2
|
|
||||||
id: tagName
|
|
||||||
with:
|
|
||||||
tagRegex: "v(.*)"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."git.bhasher.com"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.bhasher.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push frontend
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./frontend
|
|
||||||
file: ./frontend/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
tags: |
|
|
||||||
git.bhasher.com/bhasher/focus-frontend:latest
|
|
||||||
git.bhasher.com/bhasher/focus-frontend:${{ steps.tagName.outputs.tag }}
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
name: Build releases
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- context: ./backend
|
||||||
|
image: focus-backend
|
||||||
|
- context: ./frontend
|
||||||
|
dockerfile: ./frontend/Dockerfile
|
||||||
|
image: focus-frontend
|
||||||
|
- context: .
|
||||||
|
image: focu
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcaches
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract tag
|
||||||
|
uses: olegtarasov/get-tag@v2.1.2
|
||||||
|
id: tagName
|
||||||
|
with:
|
||||||
|
tagRegex: "v(.*)"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
config-inline: |
|
||||||
|
[registry."git.bhasher.com"]
|
||||||
|
http = true
|
||||||
|
insecure = true
|
||||||
|
|
||||||
|
- name: Login
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: git.bhasher.com
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push ${{ matrix.image }}
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ${{ matrix.context }}
|
||||||
|
file: ${{ matrix.context }}/Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
|
tags: |
|
||||||
|
git.bhasher.com/bhasher/${{ matrix.image }}:latest
|
||||||
|
git.bhasher.com/bhasher/${{ matrix.image }}:${{ steps.tagName.outputs.tag }}
|
||||||
|
|
||||||
|
build-tauri:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract tag
|
||||||
|
uses: olegtarasov/get-tag@v2.1.2
|
||||||
|
id: tagName
|
||||||
|
with:
|
||||||
|
tagRegex: "v(.*)"
|
||||||
|
|
||||||
|
- name: Set up node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
|
||||||
|
- name: Install frontend dependencies
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Build desktop app
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
npm run tauri build
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Publish desktop app
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
name: Focus ${{ steps.tagName.outputs.tag }}
|
||||||
|
prerelease: true
|
||||||
|
files: |-
|
||||||
|
frontend/src-tauri/target/release/focus
|
||||||
|
frontend/src-tauri/target/release/bundle/deb/*.deb
|
||||||
|
frontend/src-tauri/target/release/bundle/appimage/*.AppImage
|
59
README.md
59
README.md
|
@ -1,36 +1,91 @@
|
||||||
# Focus
|
# Focus
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> Focus is in alpha development stage. Expect breaking changes in every version.
|
> Focus is in alpha development stage. It is not yet recommended for production use. Please report any bugs or issues you encounter.
|
||||||
|
|
||||||
Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency. The backend is written in go and the frontend is in svelte.
|
Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency. The backend is written in go and the frontend is in svelte.
|
||||||
|
|
||||||
|
The official source code repository is at [git.bhasher.com/Bhasher/focus](https://git.bhasher.com/Bhasher/focus). It runs the CI pipeline and hosts the Docker images and releases. However, a mirror is available at [github.com/Bhasher/focus](https://github.com/Bhasher/focus).
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Kanban-style boards
|
||||||
|
- RESTful API
|
||||||
|
|
||||||
|
### Planned Features
|
||||||
|
|
||||||
|
- Markdown support
|
||||||
|
- Real-time collaboration
|
||||||
|
|
||||||
## KISS Principles
|
## KISS Principles
|
||||||
|
|
||||||
Adhering to [KISS principles](https://en.wikipedia.org/wiki/KISS_principle), Focus boasts a minimalist, efficient codebase, concentrating on essential features. This streamlined approach minimizes complexity, enhancing maintainability and ease of deployment across different architectures.
|
Adhering to [KISS principles](https://en.wikipedia.org/wiki/KISS_principle), Focus boasts a minimalist, efficient codebase, concentrating on essential features. This streamlined approach minimizes complexity, enhancing maintainability and ease of deployment across different architectures.
|
||||||
|
|
||||||
|
Go was chosen for the backend because of its simplicity, speed, and cross-platform support. Svelte was chosen for the frontend because it can be compiled to static HTML, CSS, and JavaScript, which can easily be served by any web server.
|
||||||
|
|
||||||
Certain features are intentionally excluded, left to specialized tools. These include:
|
Certain features are intentionally excluded, left to specialized tools. These include:
|
||||||
|
|
||||||
- Authentication
|
- Authentication
|
||||||
- HTTPS
|
- HTTPS
|
||||||
- Notifications
|
- Notifications
|
||||||
- Mobile App
|
- Mobile App
|
||||||
|
|
||||||
|
HTTPS and authentication have been successfully tested with [traefik](https://traefik.io/) and [authelia](https://www.authelia.com/) middleware but it should work with most reverse proxies and authentication middleware as it is platform-agnostic.
|
||||||
|
|
||||||
Focus offers a comprehensive RESTful API for extensions and integrations.
|
Focus offers a comprehensive RESTful API for extensions and integrations.
|
||||||
|
|
||||||
## Launching Focus in Debug Mode
|
## Installation
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
The easiest way to run Focus is with Docker. There is three images available:
|
||||||
|
|
||||||
|
- `git.bhasher.com/Bhasher/focus-frontend` for the svelte UI frontend
|
||||||
|
- `git.bhasher.com/Bhasher/focus-backend` for the go backend
|
||||||
|
- `git.bhasher.com/Bhasher/focus` for both in one image
|
||||||
|
|
||||||
|
Each image has a `latest` tag and a `vX.Y.Z` tag for each release. The `latest` tag is updated with each release.
|
||||||
|
|
||||||
|
Example `docker-compose.yaml` is available [here](docker-compose.yaml).
|
||||||
|
|
||||||
|
### Desktop App
|
||||||
|
|
||||||
|
Focus is available as a desktop app using [Tauri](https://tauri.app). Automatic releases are only available for Linux as binaries, AppImage, and DEB packages. Download the latest release from the [releases page](https://git.bhasher.com/Bhasher/focus/releases).
|
||||||
|
|
||||||
|
For other platforms, you can build the desktop app yourself using `npm run tauri build` in the `frontend` directory.
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> The desktop app requires the backend to be running. You can specify the backend URL via the `PUBLIC_BACKEND_URL` environment variable. The default is `http://localhost:3000`.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
PUBLIC_BACKEND_URL=http://localhost:3000 ./focus
|
||||||
|
```
|
||||||
|
|
||||||
|
#### AUR
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yay -S focus-desktop-bin
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debug Mode
|
||||||
|
|
||||||
To run Focus locally, follow these steps:
|
To run Focus locally, follow these steps:
|
||||||
|
|
||||||
1. Clone the repository:
|
1. Clone the repository:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://git.bhasher.com/Bhasher/focus
|
git clone https://git.bhasher.com/Bhasher/focus
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Start the backend:
|
2. Start the backend:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd backend
|
cd backend
|
||||||
go run .
|
go run .
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Start the frontend:
|
3. Start the frontend:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd frontend
|
cd frontend
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
services:
|
||||||
|
focus-backend:
|
||||||
|
container_name: focus-backend
|
||||||
|
image: git.bhasher.com/bhasher/focus-backend:latest
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
|
||||||
|
focus-frontend:
|
||||||
|
container_name: focus-frontend
|
||||||
|
image: git.bhasher.com/bhasher/focus-frontend:latest
|
||||||
|
ports:
|
||||||
|
- 8080:80
|
||||||
|
environment:
|
||||||
|
- PUBLIC_BACKEND_URL=http://127.0.0.1:3000
|
|
@ -8,3 +8,4 @@ public
|
||||||
.svelte-kot
|
.svelte-kot
|
||||||
build
|
build
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
src-tauri
|
|
@ -1,3 +1,5 @@
|
||||||
# Generated by Cargo
|
# Generated by Cargo
|
||||||
# will have compiled files and executables
|
# will have compiled files and executables
|
||||||
/target/
|
/target/
|
||||||
|
LICENSE-*
|
||||||
|
*.deb
|
|
@ -0,0 +1,48 @@
|
||||||
|
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
|
||||||
|
pkgname=focus-desktop-bin
|
||||||
|
pkgver=0.3.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
|
||||||
|
arch=('x86_64')
|
||||||
|
license=('MIT')
|
||||||
|
provides=("${pkgname%-bin}=${pkgver}")
|
||||||
|
conflicts=("${pkgname%-bin}")
|
||||||
|
url="https://git.bhasher.com/bhasher/focus"
|
||||||
|
|
||||||
|
depends=(
|
||||||
|
'webkit2gtk'
|
||||||
|
'gtk3'
|
||||||
|
'cairo'
|
||||||
|
'glib2'
|
||||||
|
'hicolor-icon-theme'
|
||||||
|
'gdk-pixbuf2'
|
||||||
|
'libsoup'
|
||||||
|
'gcc-libs'
|
||||||
|
'glibc'
|
||||||
|
'pango'
|
||||||
|
)
|
||||||
|
|
||||||
|
source=(
|
||||||
|
"https://git.bhasher.com/Bhasher/focus/releases/download/v${pkgver}/focus_${pkgver}_amd64.deb"
|
||||||
|
"LICENSE-${pkgver}::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
|
||||||
|
)
|
||||||
|
|
||||||
|
sha256sums=(
|
||||||
|
'64dc3fbd2476ef5ff9b0705c6ec287657ef7ce96c4b72d063088eb05c519f227'
|
||||||
|
'00f70f9c4cb1c351877b690002c21564dc022f7b5d7fd1273ff52c5911356384'
|
||||||
|
)
|
||||||
|
|
||||||
|
build() {
|
||||||
|
bsdtar -xf "${srcdir}/data.tar.gz"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "${srcdir}/usr/bin/focus" "${pkgdir}/usr/bin/focus"
|
||||||
|
install -Dm644 "${srcdir}/usr/share/applications/focus.desktop" "${pkgdir}/usr/share/applications"
|
||||||
|
for _icons in 32x32 128x128 256x256@2;do
|
||||||
|
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/focus.png" \
|
||||||
|
-t "${pkgdir}/usr/share/icons/hicolor/${_icons//@2/}/apps"
|
||||||
|
done
|
||||||
|
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue