Skip to content

Commit 74a055b

Browse files
gitcoder89431claude
andcommitted
feat: initial meshd scaffold with dashboard + pending screens
Built from go-tui-template. Adds syncthing package (REST client, auto API key reader), dashboard screen (split folders/devices panes with detail panel, tuitube-style table rows, 10s polling), and pending screen (accept/dismiss queue). Drops home screen — dashboard is the default. Syncthing started as systemd user service. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 parents  commit 74a055b

46 files changed

Lines changed: 3494 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
.github
3+
dist
4+
go-template-test
5+
*.log

.github/workflows/publish.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Publish
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
bump:
10+
description: Version bump to publish
11+
required: true
12+
default: patch
13+
type: choice
14+
options:
15+
- patch
16+
- minor
17+
- major
18+
19+
permissions:
20+
contents: write
21+
packages: write
22+
23+
concurrency:
24+
group: publish-${{ github.ref }}
25+
cancel-in-progress: false
26+
27+
jobs:
28+
publish:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Check out repository
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Set up Go
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version-file: go.mod
41+
cache: true
42+
43+
- name: Run Go tests
44+
run: go test ./...
45+
46+
- name: Bump version and create tag
47+
id: version
48+
uses: mathieudutour/github-tag-action@v6.2
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
tag_prefix: v
52+
default_bump: ${{ inputs.bump }}
53+
initial_version: 0.1.0
54+
55+
- name: Fetch tags for changelog range
56+
shell: bash
57+
run: git fetch --force --tags origin
58+
59+
- name: Run GoReleaser
60+
uses: goreleaser/goreleaser-action@v7
61+
with:
62+
distribution: goreleaser
63+
version: "~> v2"
64+
args: release --clean
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.new_tag }}
68+
69+
- name: Set up QEMU
70+
uses: docker/setup-qemu-action@v3
71+
72+
- name: Set up Docker Buildx
73+
uses: docker/setup-buildx-action@v3
74+
75+
- name: Log in to GitHub Container Registry
76+
uses: docker/login-action@v3
77+
with:
78+
registry: ghcr.io
79+
username: ${{ github.actor }}
80+
password: ${{ secrets.GITHUB_TOKEN }}
81+
82+
- name: Extract Docker metadata
83+
id: meta
84+
uses: docker/metadata-action@v5
85+
with:
86+
images: ghcr.io/${{ github.repository_owner }}/meshd
87+
tags: |
88+
type=raw,value=latest,enable={{is_default_branch}}
89+
type=raw,value=main
90+
type=raw,value=${{ steps.version.outputs.new_tag }}
91+
type=sha,format=short,prefix=sha-
92+
93+
- name: Build and push Docker image
94+
uses: docker/build-push-action@v6
95+
with:
96+
context: .
97+
platforms: linux/amd64,linux/arm64
98+
push: true
99+
tags: ${{ steps.meta.outputs.tags }}
100+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: release-${{ github.ref }}
13+
cancel-in-progress: false
14+
15+
jobs:
16+
goreleaser:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version-file: go.mod
29+
30+
- name: Test
31+
run: go test ./...
32+
33+
- name: Run GoReleaser
34+
uses: goreleaser/goreleaser-action@v7
35+
with:
36+
distribution: goreleaser
37+
version: "~> v2"
38+
args: release --clean
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
pull_request:
8+
push:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: ci-${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Check out repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version-file: go.mod
31+
cache: true
32+
33+
- name: Check formatting
34+
run: test -z "$(gofmt -l $(git ls-files '*.go'))"
35+
36+
- name: Run Go vet
37+
run: go vet ./...
38+
39+
- name: Run Go tests
40+
run: go test ./...
41+
42+
- name: Build binary
43+
run: go build ./cmd/meshd
44+
45+
coverage:
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- name: Check out repository
50+
uses: actions/checkout@v4
51+
52+
- name: Set up Go
53+
uses: actions/setup-go@v5
54+
with:
55+
go-version-file: go.mod
56+
cache: true
57+
58+
- name: Generate coverage profile
59+
run: go test -coverpkg=./... -coverprofile=cover.out ./...
60+
61+
- name: Print coverage summary
62+
run: go tool cover -func=cover.out
63+
64+
- name: Upload coverage profile
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: cover.out
68+
path: cover.out

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Build artifacts
2+
bin/
3+
dist/
4+
/go-tui-template
5+
*.exe
6+
*.test
7+
8+
# Coverage and profiling
9+
coverage.out
10+
cover.out
11+
*.prof
12+
13+
# Local editor and OS files
14+
.DS_Store
15+
.idea/
16+
.vscode/
17+
18+
# Environment files
19+
.env
20+
.env.*

.goreleaser.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: 2
2+
3+
project_name: meshd
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- id: meshd
11+
main: ./cmd/meshd
12+
binary: meshd
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- linux
17+
- darwin
18+
- windows
19+
goarch:
20+
- amd64
21+
- arm64
22+
ldflags:
23+
- -s -w
24+
- -X main.version={{.Version}}
25+
- -X main.commit={{.Commit}}
26+
- -X main.date={{.Date}}
27+
28+
archives:
29+
- id: default
30+
formats:
31+
- tar.gz
32+
format_overrides:
33+
- goos: windows
34+
formats:
35+
- zip
36+
name_template: >-
37+
{{ .ProjectName }}_
38+
{{- .Version }}_
39+
{{- .Os }}_
40+
{{- .Arch }}
41+
42+
checksum:
43+
name_template: checksums.txt
44+
45+
snapshot:
46+
version_template: "{{ incpatch .Version }}-next"
47+
48+
changelog:
49+
sort: asc

0 commit comments

Comments
 (0)