Commit Graph

19 Commits

Author SHA1 Message Date
Pacerino
2e2eb2fe29 [CI] Add release job: cross-compiled binaries + GitHub release
On version tags, build static pure-Go binaries for linux, macOS and
Windows (amd64 + arm64), package them with checksums and publish a
GitHub release with the artifacts. Grant contents: write for releases.
2026-06-14 12:32:40 +02:00
Pacerino
ca6b2f1e64 [Backend] Switch to pure-Go sqlite driver, drop CGO
Replace gorm.io/driver/sqlite (mattn/go-sqlite3, CGO) with
github.com/glebarez/sqlite (modernc, pure Go). Builds and tests no
longer need a C toolchain, fixing CI on runners without gcc. Drop the
race detector from CI (it requires CGO) and build a static binary in
Docker.
2026-06-14 03:18:28 +02:00
Pacerino
b4a1bff5b8 [CI] Enable CGO for backend tests
go test -race (and the sqlite driver) require CGO; set CGO_ENABLED=1 on
the test-backend job.
2026-06-14 02:57:40 +02:00
Pacerino
51f89454f5 [Docs] Revise README for clarity and structure; update features and quick start instructions 2026-06-14 02:43:31 +02:00
Pacerino
0baeee0fca Merge feature/revival-modernization into develop
Revive the project: modern Go toolchain, Caddy provider abstraction
(Caddyfile + admin API modes), configurable local/OIDC auth, a rewritten
Vite/React/shadcn frontend, Docker image and CI pipeline.
2026-06-14 02:37:44 +02:00
Pacerino
abed2d2c69 [CI] Add Dockerfile, entrypoint and GitHub Actions pipeline
Multi-stage Dockerfile builds the frontend and backend into a single
Alpine image bundling Caddy, started via an entrypoint. CI runs backend
tests (with race detector), builds the frontend and publishes the image
to GHCR on master/tags. Targets a self-hosted runner with a local build
cache. Updates .gitignore (secrets/runtime state) and README.
2026-06-14 02:35:56 +02:00
Pacerino
5e6c6b083c [Frontend] Rewrite SPA with Vite, React, TypeScript, Tailwind and shadcn/ui
Replace the Create React App frontend with a modern Vite stack. Adds a
login page (local form or SSO depending on auth mode), an OIDC callback
page, and a hosts page with create/edit/delete. Build output is emitted
into backend/embed/assets for embedding in the binary.
2026-06-14 02:35:41 +02:00
Pacerino
2bc7cd5a98 [Backend] Wire providers/auth into API and add startup bootstrap
Route host changes through the selected Caddy provider, add auth routes
and the frontend-dir serving toggle, seed a default admin user on first
run, and validate space/comma separated domain lists via a custom
validator. Includes validator tests.
2026-06-14 02:35:28 +02:00
Pacerino
8019bb9861 [Backend] Add configurable authentication (local or OIDC)
Support CPM_AUTH_MODE=local|oidc. OIDC uses go-oidc with JIT user
provisioning and an optional email-domain allowlist. Adds auth config,
login and callback endpoints, a JWT signing-key bootstrap and
Provider/Subject fields on the user model. Includes OIDC allowlist tests.
2026-06-14 02:35:13 +02:00
Pacerino
7ff0949067 [Backend] Add Caddy provider abstraction with Caddyfile and API modes
Introduce a Provider interface selectable via CPM_CADDY_MODE:
- CaddyfileProvider renders per-host snippets (template whitespace fixed)
- APIProvider manages Caddy's JSON config via the admin API
Add configurable reload strategy (systemd/exec/api/none) and a
configurable listen address for the bootstrapped server in API mode.
Includes unit tests for the JSON builder, provider factory and the
API provider (httptest).
2026-06-14 02:34:54 +02:00
Pacerino
401e2520c1 [Backend] Modernize toolchain to Go 1.24 and update dependencies
Bump Go version, update all dependencies and migrate jwx v1 (deprecated)
to jwx v3.
2026-06-14 02:34:40 +02:00
Pacerino
906e8a0ba2 [Backend] Reload Caddy via dbus 2022-10-04 11:49:00 +02:00
Pacerino
766975f52b small changes to error codes and behavior 2022-10-03 22:50:54 +02:00
Pacerino
aaef8a4c97 [Frontend] Implement Login with JWT and axios 2022-10-03 22:50:21 +02:00
Pacerino
e7557515f1 [Backend] Implement Login with JWT 2022-10-03 20:40:58 +02:00
Pacerino
ff1190e8bd rename imports 2022-09-26 15:46:53 +02:00
Pacerino
cd92e72f60 Delete Readme from frontend 2022-09-26 15:43:48 +02:00
Pacerino
935d938aab Adding License 2022-09-26 15:42:26 +02:00
Pacerino
15842e3c45 Initial Upload 2022-09-26 15:41:00 +02:00