Move web UI from /ui/ to /web/ path prefix

The web UI is now mounted at /web/ (previously /ui/) — cmd/server/main.go
wraps web.Server.Handler with http.StripPrefix("/web", ...), so
internal/web's own routes stay unprefixed (/, /login, /logout,
/shares/..., /static/...) and only the outer mux adds the prefix. All
templates, redirects, and cookie paths updated accordingly. The root '/'
route reverts to the original unauthenticated welcome page (linking to
/web/), and /cal/, /card/, /files/ are unaffected.

Also gitignore the bin/ build output directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-19 07:29:32 +02:00
co-authored by Copilot
parent ab3c7f44d5
commit 4dba55c807
15 changed files with 58 additions and 52 deletions
+5 -5
View File
@@ -14,7 +14,7 @@ A self-hosted **CalDAV**, **CardDAV**, and **WebDAV** server written in Go.
- Per-user isolated collections
- **Calendar/address book sharing** — grant other users read or write
access to your calendars/address books
- **Web UI** — a small dashboard (login, manage shares) at `/ui/`, built
- **Web UI** — a small dashboard (login, manage shares) at `/web/`, built
with templ + Tailwind + htmx
- Auto-discovery via `/.well-known/caldav` and `/.well-known/carddav`
- Optional **TLS** (or use a reverse proxy)
@@ -177,17 +177,17 @@ Read-only shares reject any write (PUT/DELETE) with `403 Forbidden`.
## Web UI
A small server-rendered dashboard is served at `/ui/` (separate from the
A small server-rendered dashboard is served at `/web/` (separate from the
DAV endpoints, which stay on HTTP Basic Auth):
- **Login** (`/ui/login`) — cookie-based session, stored server-side in
- **Login** (`/web/login`) — cookie-based session, stored server-side in
`nidus.db` (`web_sessions` table), independent of DAV Basic Auth.
- **Dashboard** (`/ui/`) — lists your own calendars/address books, who
- **Dashboard** (`/web/`) — lists your own calendars/address books, who
they're shared with, and any resources other users have shared with you.
- **Share management** — add/remove shares directly from the dashboard
(same effect as `nidusctl`); updates happen in place via
[htmx](https://htmx.org/) without a full page reload.
- **Logout** (`/ui/logout`).
- **Logout** (`/web/logout`).
Implementation: [templ](https://templ.guide/) for type-safe Go HTML
templates, [Tailwind CSS v4](https://tailwindcss.com/) for styling, and