Add Migadu domain admin with shared lists, compaction, and safer apply.
Build the Go API and React UI for managing domain denylist/allowlist/recipient deny and spam settings, plus shared lists that import/apply across domains with wildcard compaction, entry verification, and Migadu-friendly list encoding (including per-domain recipient filtering and rejection bisect on apply).
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
.PHONY: setup-dev dev build frontend backend run tidy clean
|
||||
|
||||
export PATH := $(HOME)/.local/go/bin:$(HOME)/.local/bin:$(PATH)
|
||||
|
||||
setup-dev:
|
||||
@bash scripts/setup-dev.sh
|
||||
|
||||
dev: setup-dev
|
||||
@echo "API → http://127.0.0.1:8080"
|
||||
@echo "UI → http://127.0.0.1:5173 (live reload; proxies /api → Go)"
|
||||
@echo "Open the UI URL in your browser. Ctrl+C stops both."
|
||||
@bash -c 'set -euo pipefail; \
|
||||
go run ./cmd/server & \
|
||||
api_pid=$$!; \
|
||||
(cd web && npm run dev -- --host 127.0.0.1 --port 5173) & \
|
||||
ui_pid=$$!; \
|
||||
trap "kill $$api_pid $$ui_pid 2>/dev/null; wait $$api_pid $$ui_pid 2>/dev/null" EXIT INT TERM; \
|
||||
wait'
|
||||
|
||||
frontend:
|
||||
cd web && npm install && npm run build
|
||||
rm -rf cmd/server/ui
|
||||
mkdir -p cmd/server/ui
|
||||
cp -R web/dist/. cmd/server/ui/
|
||||
|
||||
backend:
|
||||
go build -o bin/migaduadmin ./cmd/server
|
||||
|
||||
build: frontend backend
|
||||
|
||||
run: build
|
||||
./bin/migaduadmin
|
||||
|
||||
tidy:
|
||||
go mod tidy
|
||||
cd web && npm install
|
||||
|
||||
clean:
|
||||
rm -rf bin web/dist cmd/server/ui
|
||||
mkdir -p cmd/server/ui
|
||||
printf '%s\n' '<!doctype html><html><body><p>UI not built. Run make frontend.</p></body></html>' > cmd/server/ui/index.html
|
||||
Reference in New Issue
Block a user