chore(openspec): archive completed changes and sync main specs
- archive rename-shared-album-to-galo, add-halo-branding - sync specs: ui-branding (new capability)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
schema: spec-driven
|
||||
created: 2026-10-11
|
||||
skip_specs: true
|
||||
@@ -0,0 +1,56 @@
|
||||
# Design
|
||||
|
||||
## Context
|
||||
|
||||
See proposal.md - Why. Current state that shapes the approach:
|
||||
|
||||
- The Go module is `shared-album` (`backend/go.mod:1`), imported as `shared-album/internal/*` by ~63 files and as `assets "shared-album"` by 9 of them (module-root `backend` package holding `go:embed`).
|
||||
- The name also appears in the binary target (`Makefile`), the systemd unit and its `/opt/shared-album` paths, the nginx upstream, the frontend package name, and the docs.
|
||||
- The real deployment `.env` already uses `PG_DATABASE=galo` and `S3_BUCKET=galo-data`; only the code/sample defaults are stale.
|
||||
- Generated artifacts (`bin/`, `frontend/build/`, `frontend/.svelte-kit/`) are gitignored and pick up the new name from the build.
|
||||
- No user-facing string literal carries the old name: the UI already renders "Galo".
|
||||
|
||||
## Goals / Non-Goals
|
||||
|
||||
**Goals:**
|
||||
- One consistent name `galo` across Go module, build target, deploy unit, config defaults, frontend package, and docs.
|
||||
- Preserve behavior except the intended DB-name default.
|
||||
- Keep the change verifiable by the existing build/test/validate commands.
|
||||
|
||||
**Non-Goals:**
|
||||
- Renaming the immutable archived change `openspec/changes/archive/2026-10-10-shared-album`.
|
||||
- Migrating existing database contents (the default is config-driven; live `.env` is already `galo`).
|
||||
- Any UI/branding change (already "Galo").
|
||||
|
||||
## Decisions
|
||||
|
||||
### D1. Rename the Go module to `galo`
|
||||
Flat path, matching the current style (`module shared-album`, no domain). Alternatives: keep the module name (rejected - stays inconsistent) or adopt a namespaced path like `github.com/.../galo` (rejected - no hosting/import need, larger churn).
|
||||
|
||||
Impact: replace `shared-album` in `backend/go.mod` and every import/alias across the backend, then rely on the compiler (`go build ./...`) to prove completeness.
|
||||
|
||||
### D2. Change the metadata DB-name default to `galo`
|
||||
Update `config.go` default and `.env.example`. Rationale: aligns the code with the live `.env` (`PG_DATABASE=galo`). Alternative: leave the default (rejected - keeps the stale name). Trade-off: installs that omit `PG_DATABASE` will now target `galo`; deployments should set it explicitly.
|
||||
|
||||
### D3. Rename the deploy unit and install path
|
||||
`deploy/shared-album.service` -> `galo.service`, `/opt/shared-album` -> `/opt/galo`, and the nginx upstream `shared_album` -> `galo`. This is an operational change requiring re-install on the server; it stays a single unit with the same flags and `EnvironmentFile`.
|
||||
|
||||
### D4. Leave history intact
|
||||
The archived OpenSpec change keeps its original name - it records what happened, not what the project is called now.
|
||||
|
||||
### D5. Frontend package rename
|
||||
`shared-album-frontend` -> `galo-frontend` in `package.json`; regenerate `package-lock.json` via install so the lock name matches.
|
||||
|
||||
## Risks / Trade-offs
|
||||
|
||||
- [Missed or mistyped import path] -> Compiler-enforced; do the module/import replacement first, then `go build ./... && go test ./...`.
|
||||
- [Deploy breaks on path/unit rename] -> Treat as a documented migration step: stage `/opt/galo`, re-install the unit, disable the old one; keep `.env` authoritative.
|
||||
- [DB-name default surprises a fresh install] -> `.env.example` and docs state it; recommend keeping `PG_DATABASE` explicit in every `.env`.
|
||||
- [Lockfile drift after package rename] -> Regenerate the lock rather than hand-editing only its `name` fields.
|
||||
|
||||
## Migration Plan
|
||||
|
||||
1. Land the rename in one commit: backend module + imports, Makefile, `config.go`/`.env.example`, `deploy/*`, frontend package, docs.
|
||||
2. Verify: `cd backend && go build ./... && go test ./...`, `make build`, `openspec validate rename-shared-album-to-galo`.
|
||||
3. On the server: create `/opt/galo`, place `galo` binary and `.env`, install `galo.service`, `systemctl disable --now shared-album`, then `enable --now galo`.
|
||||
4. Rollback: revert the commit and re-enable the old unit; no data migration is involved.
|
||||
@@ -0,0 +1,33 @@
|
||||
# Proposal
|
||||
|
||||
## Why
|
||||
|
||||
The product is named **galo** — the UI already shows "Galo" and the frontend persists state under `galo.*` keys — yet internal identifiers, build artifacts, the deploy unit, and the docs still carry the old working name `shared-album`. This mismatch confuses operators and readers, and the stale metadata default `shared_album` in `config.go` diverges from the actual deployment, whose `.env` already sets `PG_DATABASE=galo`.
|
||||
|
||||
## What Changes
|
||||
|
||||
- Rename the Go module `shared-album` -> `galo` and update every internal import path (`shared-album/internal/...`, `assets "shared-album"`) across the backend (~63 files).
|
||||
- Rename the built binary `bin/shared-album` -> `bin/galo` in the Makefile.
|
||||
- Rename the systemd unit `deploy/shared-album.service` -> `deploy/galo.service` and its install path `/opt/shared-album` -> `/opt/galo`.
|
||||
- Change the metadata-layer DB name default `shared_album` -> `galo` in `config.go` and `.env.example`, aligning the default with the real deployment.
|
||||
- Rename the nginx upstream `shared_album` -> `galo`.
|
||||
- Rename the frontend package `shared-album-frontend` -> `galo-frontend` (package.json + regenerated lock).
|
||||
- **BREAKING** (operational): the deploy unit name and install path change, so an existing server needs the unit re-installed and the path re-created.
|
||||
- Update docs (`project.md`, including the §18 prompt log, and `README.md`) to the new name.
|
||||
- Leave immutable history untouched: the archived change `openspec/changes/archive/2026-10-10-shared-album` keeps its name.
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
<!-- None: this is a pure identifier/refactor rename with no new behavior. -->
|
||||
|
||||
### Modified Capabilities
|
||||
<!-- None: no spec-level behavior changes. The change's .openspec.yaml must set skip_specs: true. -->
|
||||
|
||||
## Impact
|
||||
|
||||
- **Backend:** `backend/go.mod` module path + all `shared-album/internal/...` imports (~63 Go files); `internal/config/config.go` DB default.
|
||||
- **Build/deploy:** `Makefile`, `deploy/shared-album.service` (renamed), `deploy/nginx-sse.conf`, `.env.example`.
|
||||
- **Frontend:** `frontend/package.json` + `package-lock.json` (name only).
|
||||
- **Docs:** `project.md`, `README.md`.
|
||||
- **Behavior:** none at the API level; the only runtime-visible change is the default `PG_DATABASE` (affects fresh installs that omit the variable — the current `.env` already uses `galo`). Operational change: systemd unit/path rename.
|
||||
@@ -0,0 +1,35 @@
|
||||
# Tasks
|
||||
|
||||
## 1. Go module and imports
|
||||
|
||||
- [x] 1.1 Rename the module in `backend/go.mod` from `shared-album` to `galo` and verify `head -1 backend/go.mod` prints `module galo`
|
||||
- [x] 1.2 Replace every `shared-album/internal/...` import and the `assets "shared-album"` alias across the backend (~63 files) and verify `grep -rn '"shared-album' backend --include='*.go'` returns nothing
|
||||
- [x] 1.3 Build and test the backend after the rename and verify `cd backend && go build ./... && go test ./...` passes
|
||||
|
||||
## 2. Build target
|
||||
|
||||
- [x] 2.1 Rename the binary output in the Makefile (`bin/shared-album` -> `bin/galo`) in both the `backend` and `run` targets and verify `make backend && file bin/galo` reports a statically linked `galo` binary
|
||||
|
||||
## 3. Config defaults
|
||||
|
||||
- [x] 3.1 Change the `PG_DATABASE` default in `backend/internal/config/config.go` and in `.env.example` from `shared_album` to `galo` and verify `grep -rn shared_album backend/internal/config .env.example` returns nothing while `cd backend && go test ./internal/config/` passes
|
||||
|
||||
## 4. Deploy artifacts
|
||||
|
||||
- [x] 4.1 Rename `deploy/shared-album.service` to `deploy/galo.service` and update its `WorkingDirectory`, `EnvironmentFile`, `ExecStart`, and `ReadWritePaths` paths from `/opt/shared-album` to `/opt/galo`, then verify `grep -rn shared-album deploy/` returns nothing
|
||||
- [x] 4.2 Rename the nginx upstream `shared_album` to `galo` in `deploy/nginx-sse.conf` (upstream block and all `proxy_pass`) and verify `grep -rn 'shared_album\|shared-album' deploy/` returns nothing
|
||||
|
||||
## 5. Frontend package
|
||||
|
||||
- [x] 5.1 Rename the package to `galo-frontend` in `frontend/package.json` and regenerate `frontend/package-lock.json`, then verify `grep -n '"name"' frontend/package.json frontend/package-lock.json` shows `galo-frontend` everywhere
|
||||
|
||||
## 6. Documentation
|
||||
|
||||
- [x] 6.1 Update `README.md` and `project.md` (including the §18 step-by-step prompt log) to use `galo` / `/opt/galo` / `galo.service`, and verify `grep -rn shared-album README.md project.md` returns nothing
|
||||
- [x] 6.2 Confirm the archived change is left untouched and verify `git status --porcelain openspec/changes/archive/` prints nothing
|
||||
|
||||
## 7. Integration verification
|
||||
|
||||
- [x] 7.1 Run a repo-wide audit and verify `grep -rn 'shared-album\|shared_album\|shared-album-frontend' --exclude-dir=.git --exclude-dir=bin --exclude-dir=node_modules --exclude-dir=build --exclude-dir=.svelte-kit .` returns hits only under `openspec/changes/archive/2026-10-10-shared-album/` and this change's own directory `openspec/changes/rename-shared-album-to-galo/`
|
||||
- [x] 7.2 Run the full pipeline and verify `make build && make test` succeeds on the renamed codebase
|
||||
- [x] 7.3 Validate the change and verify `openspec validate rename-shared-album-to-galo` passes
|
||||
Reference in New Issue
Block a user