Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to SPA architecture using Svelte #44

Merged
merged 52 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9746796
Initial work to move to an SPA architecture
toboshii Sep 23, 2021
b540c19
Initial commit
h3mmy Feb 5, 2022
8214073
First sort of draft
h3mmy Feb 6, 2022
bd14b65
Almost MVP
h3mmy Feb 6, 2022
7b7d6b5
Almost MVP
h3mmy Feb 6, 2022
87037c9
MVP
h3mmy Feb 8, 2022
926b669
Bookmark
h3mmy Feb 8, 2022
12e41ba
Bookmark
h3mmy Feb 8, 2022
f7aef72
Minimum viable product
h3mmy Feb 8, 2022
0230e20
Reset log level back to info
h3mmy Feb 9, 2022
88d7b45
Add rudimentary replicaStatusGetter
h3mmy Feb 21, 2022
36f9dfa
Merge branch 'main' into svelte
toboshii Aug 17, 2022
2bc291d
fix: update deps and target go 1.19
toboshii Aug 17, 2022
51a84d7
feat: finalized backend rework
toboshii Aug 29, 2022
000298f
refactor: remove completed todo
toboshii Aug 29, 2022
9e401a5
Merge branch 'svelte' of github.com:h3mmy/hajimari into svelte
h3mmy Aug 31, 2022
71d4b2e
More merging
h3mmy Aug 31, 2022
4ac1949
remove files to match
h3mmy Aug 31, 2022
8ffc08f
Add missing updates
h3mmy Aug 31, 2022
8c93fee
Merge branch 'svelte' of github.com:h3mmy/hajimari into svelte
h3mmy Aug 31, 2022
6812681
Finish backend work for replicaStatus detection
h3mmy Sep 3, 2022
ee40db0
light refactoring to get apps to display
h3mmy Sep 3, 2022
ec7de20
PoC basics done
h3mmy Sep 4, 2022
04d58d3
Finish up basic functionality in front-end. Clean up some leftovers
h3mmy Sep 4, 2022
258aca5
feat: add sveltekit, app groups, client-side greeting
toboshii Sep 8, 2022
6aa2895
Merge branch 'svelte' of github.com:h3mmy/hajimari into h3mmy-svelte
toboshii Sep 8, 2022
6d93aa5
Merge branch 'h3mmy-svelte' into svelte
toboshii Sep 8, 2022
13a4007
fix: hide custom app status, revert app group name change
toboshii Sep 8, 2022
9876346
feat: set loglevel with `LOG_LEVEL`, automatic dev debug
toboshii Sep 8, 2022
5094319
Add info annotation
ullbergm Sep 9, 2022
bec977c
Made the info line work
ullbergm Sep 9, 2022
f028b53
feat: move ingressApp handling to background job (closes #3)
toboshii Sep 9, 2022
8e1e921
Merge pull request #47 from ullbergm/svelte-info-line
toboshii Sep 9, 2022
bf649f4
feat: support icon urls
toboshii Sep 9, 2022
017a99c
feat: new search component
toboshii Sep 11, 2022
1ce7f5c
fix: better app animations
toboshii Sep 11, 2022
891afa4
feat: theme selector, search component, formatting
toboshii Sep 24, 2022
b6edd58
feat: switch frontend api base based on env
toboshii Sep 24, 2022
b1423d0
feat: add frontend build support to dockerfile
toboshii Sep 27, 2022
4245275
fix: improve startpage error handling and logging
toboshii Sep 27, 2022
473c490
refactor: improve settings modal
toboshii Sep 27, 2022
185d7ca
refactor: search fixes, various cleanup, and default config
toboshii Sep 30, 2022
19c2613
feat: targetBlank option for apps and links (#49)
ullbergm Oct 1, 2022
7eedad1
refactor: clean up target handling
toboshii Oct 1, 2022
bc8ac0c
feat: bookmark icon support, app & bookmark toggles
toboshii Oct 1, 2022
a869e3a
feat: error page, greeting fix, default app icon
toboshii Oct 2, 2022
44775cd
feat: disable search, styling cleanup, discord update
toboshii Oct 2, 2022
80b7b18
fix: update dep versions
toboshii Oct 2, 2022
ebeb303
fix: update helm chart
toboshii Oct 2, 2022
9273aa7
refactor: update readme
toboshii Oct 2, 2022
82ea8f0
fix: update ci values
toboshii Oct 2, 2022
cfdf38d
fix: update ct
toboshii Oct 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
root = "."
tmp_dir = "tmp"

[build]
full_bin = "MEMORY=true LOG_LEVEL=debug ./tmp/hajimari"
cmd = "go build -o ./tmp/hajimari ./cmd/hajimari/main.go"
delay = 1000
exclude_dir = ["frontend", "docs", "charts", "tmp", "vendor"]
exclude_file = []
exclude_regex = []
exclude_unchanged = false
follow_symlink = false
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
kill_delay = "0s"
log = "build-errors.log"
send_interrupt = false
stop_on_error = true

[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"

[log]
time = false

[misc]
clean_on_exit = true
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.git
.github/
.vscode/
.gitignore
.kubeconfig
assets/
charts/
data/
docs/
Dockerfile
LICENSE
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint-test-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: 3.7

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.3.1

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -34,6 +34,7 @@ jobs:
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi

- name: Run chart-testing (lint)
run: ct lint

Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.dll
*.so
*.dylib
tmp

# Test binary, built with `go test -c`
*.test
Expand All @@ -12,10 +13,19 @@
*.out

# Project specific
/data
/config.yaml
/hajimari
/.kubeconfig
/bin

# Chart dependencies
charts/hajimari/charts
charts/hajimari/Chart.lock
charts/hajimari/local.yaml
charts/hajimari/local.yaml

# UI dependencies
node_modules
public/build/

.DS_Store
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"svelte.plugin.svelte.compilerWarnings": {
"a11y-autofocus": "ignore"
}
}
20 changes: 17 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
FROM golang:1.16-alpine as build
FROM docker.io/node:16.17-alpine AS build-frontend

WORKDIR /build

COPY . .

WORKDIR /build/frontend

RUN npm install

RUN npm run build

FROM docker.io/golang:1.19.1-alpine as build

ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
Expand All @@ -10,6 +22,8 @@ WORKDIR /build

COPY . .

COPY --from=build-frontend /build/frontend/build /build/frontend/build

RUN \
export GOOS=$(echo ${TARGETPLATFORM} | cut -d / -f1) \
&& \
Expand All @@ -19,11 +33,11 @@ RUN \
&& \
go mod download \
&& \
go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o hajimari /build/main.go \
go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o hajimari /build/cmd/hajimari/main.go \
&& \
chmod +x hajimari

FROM alpine:3.14
FROM docker.io/alpine:3.16

RUN \
apk add --no-cache \
Expand Down
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

.PHONY: deps
deps: ## Install required dependencies
cd frontend/ && npm install

.PHONY: build
build: ## Build the Go project.
go build -ldflags="-s -w" -trimpath -v -o hajimari
npm run build --prefix frontend/
go build -ldflags="-s -w" -trimpath -o ./bin/hajimari ./cmd/hajimari/main.go

.PHONY: run
run: build ## Run the program
./hajimari
./bin/hajimari

.PHONY: dev
dev: ## Run the program in dev mode
(trap 'kill 0' SIGINT; air & sleep 5 && cd frontend/ && npm run dev -- --open)

.PHONY: fmt
fmt: ## Format the project with gofmt
Expand All @@ -23,4 +32,4 @@ lint: ## Lint code with golangci-lint

.PHONY: test
test: ## Run the tests
go test -cover ./...
go test -cover ./...
193 changes: 149 additions & 44 deletions README.md

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/screen01.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 assets/screen02.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 assets/screen03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions charts/hajimari/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
apiVersion: v2
appVersion: v0.2.0
appVersion: v0.3.0
description: |
Hajimari is a beautiful & customizable browser startpage/dashboard with
Kubernetes application discovery
name: hajimari
version: 1.2.0
version: 2.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- hajimari
- startpage
- dashboard
home: https://github.com/toboshii/hajimari/tree/master/charts/hajimari
icon: https://raw.githubusercontent.com/toboshii/hajimari/main/docs/static/img/logo.png
icon: https://raw.githubusercontent.com/toboshii/hajimari/main/assets/logo.png
sources:
- https://github.com/toboshii/hajimari
maintainers:
- name: toboshii
email: toboshii@users.noreply.github.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 4.0.0
version: 0.2.1
repository: https://bjw-s.github.io/helm-charts/
Loading