Rename castle-app to libra-app

Match the upstream LNbits extension rebrand (Castle Accounting → Libra).
Renames the standalone PWA build artifacts and all references:

- castle.html → libra.html
- vite.castle.config.ts → vite.libra.config.ts (PWA name "Libra —
  Team Accounting", short_name "Libra", manifest id libra-accounting)
- npm scripts: build:castle/dev:castle/preview:castle → build:libra
  etc; dev:all and build:demo chains updated; dist-castle → dist-libra
- Hub tile: Lucide icon Castle → Scale (the scales/balance metaphor),
  label "Castle" → "Libra", env var VITE_HUB_CASTLE_URL → VITE_HUB_LIBRA_URL
- ExpensesAPI: /castle/api/v1/* → /libra/api/v1/* (matches the renamed
  LNbits extension's URL prefix)
- Feature flags VITE_CASTLE_INCOME_ENABLED/VITE_CASTLE_BUDGETS_ENABLED →
  VITE_LIBRA_*
- i18n: top-level "castle" namespace → "libra" across en/es/fr; all
  t('castle.*') usages updated
- localStorage key castle-expense-drafts → libra-expense-drafts
- nginx.conf.example: /castle/ routes + castle.<domain> redirect → libra
- Comments and identifiers: castleOwesUser → libraOwesUser, castle.api
  references in docs

Source dir src/accounting-app/ stays as-is (already feature-named, not
brand-named).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-05 10:44:04 +02:00
commit 442a755a51
27 changed files with 116 additions and 116 deletions

View file

@ -21,7 +21,7 @@ http {
# demo.<domain>.<com>/chat/ — chat standalone
# demo.<domain>.<com>/forum/ — forum standalone
# demo.<domain>.<com>/tasks/ — tasks standalone
# demo.<domain>.<com>/castle/ — castle (accounting) standalone
# demo.<domain>.<com>/libra/ — libra (accounting) standalone
#
# Each standalone is built with VITE_BASE_PATH=/<name>/ so its asset URLs
# are prefixed correctly. The hub's chakra tiles point at the canonical
@ -88,11 +88,11 @@ http {
try_files $uri $uri/ /tasks.html;
}
# ── Castle (accounting) ──────────────────────────────────────────
location = /castle { return 301 /castle/$is_args$args; }
location /castle/ {
alias /var/www/aio/dist-castle/;
try_files $uri $uri/ /castle.html;
# ── Libra (accounting) ──────────────────────────────────────────
location = /libra { return 301 /libra/$is_args$args; }
location /libra/ {
alias /var/www/aio/dist-libra/;
try_files $uri $uri/ /libra.html;
}
# ── Static asset MIME / cache (applies to all bundles) ───────────
@ -142,8 +142,8 @@ http {
}
server {
listen 8080;
server_name castle.demo.<domain>.<com>;
return 301 https://demo.<domain>.<com>/castle/$request_uri;
server_name libra.demo.<domain>.<com>;
return 301 https://demo.<domain>.<com>/libra/$request_uri;
}
# ───────────────────────────────────────────────────────────────────────
@ -159,7 +159,7 @@ http {
# server { server_name chat.<domain>; root /var/www/aio/dist-chat; ... }
# server { server_name forum.<domain>; root /var/www/aio/dist-forum; ... }
# server { server_name tasks.<domain>; root /var/www/aio/dist-tasks; ... }
# server { server_name castle.<domain>; root /var/www/aio/dist-castle; ... }
# server { server_name libra.<domain>; root /var/www/aio/dist-libra; ... }
#
# Each block uses `location / { try_files $uri $uri/ /<name>.html; }`.
# In subdomain mode, build each standalone WITHOUT VITE_BASE_PATH (the