Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a9b2f60
chore: add sqlite/oidc deps, embed stub, and align golangci-lint v2.15
tracyhatemice Nov 28, 2026
bd8e672
feat(storage): add pure-Go SQLite schema and repositories
tracyhatemice Nov 28, 2026
3e5fc84
feat(ddns,webhook): add delivery result callbacks, ip_version filter,…
tracyhatemice Nov 28, 2026
38230a0
feat: add async batched SQLite access logger
tracyhatemice Nov 28, 2026
02c2ccc
feat: wire SQLite runtime snapshot, optional iam tokens, and IP/deliv…
tracyhatemice Nov 28, 2026
f9d09fa
fix: prevent Store/SQLite split-brain under concurrent ReloadFromDB a…
tracyhatemice Nov 28, 2026
144391c
feat(auth): add OIDC PKCE flow, session management, and CSRF guard
tracyhatemice Nov 28, 2026
af12a90
feat(api): add authenticated /api/v1 management, logs, and backup end…
tracyhatemice Nov 28, 2026
e903f05
feat: wire CLI/env bootstrap, base-path SPA routing, and graceful shu…
tracyhatemice Nov 28, 2026
3bc9819
feat(ui): scaffold Cap-style Svelte 5 shell, login, overview, and rec…
tracyhatemice Nov 28, 2026
8cdd1d9
feat(ui): add integrations, touch, access histogram/drawer, audit log…
tracyhatemice Nov 28, 2026
5cfaa4f
fix(ui): resolve tabpanel hit-testing, webhook secret locking, and al…
tracyhatemice Nov 28, 2026
a0f33c2
fix(ui): key AccessDrawer resultIps loop by index and address
tracyhatemice Nov 28, 2026
da67a6f
chore(docker,ci,docs): add multi-stage UI build, CI test job, and adm…
tracyhatemice Nov 28, 2026
07d0f79
fix(ui,api,storage): resolve alias duplicate-IP crash, mobile dialog …
tracyhatemice Nov 28, 2026
71670d3
chore: ignore sqlite data files and use RFC test placeholders
tracyhatemice Nov 29, 2026
89d4448
fix(ci): generate valid Docker image tags on pull_request runs
tracyhatemice Nov 29, 2026
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
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.git
.claude
.superpowers
.agents
.idea
vendor
GEMINI.md
docs
data
who
whoami
config.json
ui/node_modules
ui/dist/*
!ui/dist/.keep
32 changes: 29 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,35 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run Go tests
run: go test -race -v ./...

build-and-push:
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -22,6 +43,7 @@ jobs:
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -35,18 +57,22 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=sha,prefix={{branch}}-
type=ref,event=pr
type=sha,prefix={{branch}}-,enable=${{ github.event_name != 'pull_request' }}
type=raw,value=latest,enable={{is_default_branch}}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
vendor/
/whoami
/who
dist/
/dist/
config.json
/data/
*.db
*.db-shm
*.db-wal
.claude
docs/
docs/
32 changes: 18 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,41 @@ version: "2"
linters:
default: all
disable:
- canonicalheader
- cyclop
- dupl
- embeddedstructfieldcheck
- err113
- exhaustive
- exhaustruct
- exhaustruct_v5
- forbidigo
- funlen
- gochecknoglobals
- gochecknoinits
- goconst
- gomodguard
- gosec
- lll
- mnd
- modernize
- nilnil
- nlreturn
- noctx
- noinlineerr
- nonamedreturns
- paralleltest
- prealloc
- rowserrcheck
- sqlclosecheck
- tagliatelle
- testpackage
- tparallel
- unparam
- varnamelen
- wrapcheck
- wsl
- wsl_v5
settings:
depguard:
rules:
Expand All @@ -33,20 +46,9 @@ linters:
desc: not allowed
- pkg: github.com/pkg/errors
desc: Should be replaced by standard lib errors package
forbidigo:
forbid:
- pattern: ^print(ln)?$
- pattern: ^panic$
- pattern: ^spew\.Print(f|ln)?$
- pattern: ^spew\.Dump$
funlen:
lines: -1
statements: 40
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks:
- httpNoBody
- sloppyReassign
- rangeValCopy
- octalLiteral
Expand All @@ -69,7 +71,7 @@ linters:
enable-all: true
misspell:
locale: US
exclusions:
exclusions:
presets:
- comments
issues:
Expand All @@ -81,4 +83,6 @@ formatters:
- gofumpt
settings:
gofumpt:
extra-rules: true
extra:
clothe-returns: true
group-params: true
33 changes: 27 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
FROM --platform=$BUILDPLATFORM node:24-alpine AS ui

ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
RUN corepack enable && corepack prepare pnpm@10.33.0 --activate

WORKDIR /ui

COPY ui/package.json ui/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

COPY ui/ ./
RUN pnpm run build

FROM golang:1-alpine AS builder

ENV GOTOOLCHAIN=auto

RUN apk --no-cache --no-progress add ca-certificates tzdata upx \
&& update-ca-certificates \
&& rm -rf /var/cache/apk/*
&& mkdir -p /data

WORKDIR /go/who

COPY go.mod .
COPY go.mod go.sum ./
RUN go mod download

COPY . .
COPY --from=ui /ui/dist ./ui/dist

RUN CGO_ENABLED=0 go build -a --trimpath --installsuffix cgo --ldflags="-s -w" -o who \
&& upx --best --lzma who
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o who . \
&& (upx --best --lzma who || true)

# Create a minimal container to run a Golang static binary
FROM scratch

ENV WHO_DATA_DIR=/data

COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/who/who .
COPY --from=builder /go/who/who /who
COPY --from=builder /data /data

ENTRYPOINT ["/who"]
VOLUME ["/data"]
EXPOSE 80
ENTRYPOINT ["/who"]
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.PHONY: default check test build image
.PHONY: default ui check test build image

IMAGE_NAME := ghcr.io/tracyhatemice/who

default: check test build

build:
CGO_ENABLED=0 go build -a --trimpath --installsuffix cgo --ldflags="-s" -o who
ui:
pnpm --dir ui install --frozen-lockfile && pnpm --dir ui run build

build: ui
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o who .

test:
go test -v -cover ./...
Expand Down
Loading
Loading