Commit graph

29 commits

Author SHA1 Message Date
2cc8e34b9d feat(layout): re-enable "Back to hub" with a sticky sheet footer
Reverses the events-only hide (c037d45) now that the link has a real
home. Three parts:

- Add a @brand-hub-logo alias (brandHubLogoAliasEntry) resolving to the
  brand's primary/global logo — the HUB's logo, never the per-standalone
  @brand-app-logo. Wired into all 9 app vite configs since the shared
  ProfileSheetContent renders it.
- Restructure the profile sheet into a fixed-height flex column: a
  flex-1 min-h-0 overflow-y-auto scroll region over a shrink-0 footer,
  so "Back to hub" + the log-in/out bar stay pinned to the bottom while
  the identity/preferences area scrolls.
- Move the edit-profile Dialog out of the flex root (it portals to body,
  so it's not part of the sheet flow).

Logo bumped to w-8 h-8, centered, with tightened footer padding.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 00:26:52 +02:00
5700ac1d1a feat(branding): migrate hardcoded @brand/logo.png to SVG-aware alias
The four shared layout/login components (Login, LoginDemo,
AppSidebar, MobileDrawer) hardcoded `<img src="@brand/logo.png">`,
which means an SVG-only brand kit (like cfaun's) fails the build
with "Could not load @brand/logo.png".

Switch the four to `<img src="@brand-app-logo">` — the alias registered
via brandAppLogoAliasEntry() (already used by events module) resolves
to whichever of logo.{svg,png} exists in BRAND_DIR (SVG preferred),
with per-app overrides under BRAND_DIR/icons/<app>/.

Also register brandAppLogoAliasEntry in the 8 vite configs that
didn't have it (only events did before), converting their alias maps
to array form so the regex-based logo entry doesn't get shadowed by
the bare-string `@brand` and `@` aliases.

Verified:
- AIO default brand (PNG-only): builds, ships logo-<hash>.png — no regression.
- cfaun brand (SVG-only): builds, ships logo-<hash>.svg — previous
  ENOENT on logo.png gone.

Unblocks cfaun deploy with an SVG-only brand kit (no manual
rasterization needed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-11 00:23:01 +02:00
3efae30e84 feat(branding): auto-generate icons on vite build/dev start
vite-branding.ts now exports brandAssetsPlugin() — a Vite plugin
whose buildStart hook runs scripts/generate-pwa-assets.mjs once per
build / dev-server start. All 9 vite configs register it first in
plugins[], so PWA icons under public/icons/ are guaranteed to exist
before VitePWA's includeAssets / manifest.icons get processed and
before the public/ → dist/ copy.

Removes the "did you remember to pnpm generate-pwa-assets?" failure
mode. Dev mode now also auto-populates icons (no more dev 404s on
/icons/favicon.ico).

Verified build from clean state (no public/icons/ pre-existing): the
plugin generates, all 6 icons land in dist-wallet/icons/.

Part of aiolabs/webapp#95.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 23:43:50 +02:00
4e7502b30c refactor(branding): drop VITE_APP_NAME compat shim
Per the pre-public-launch policy in CLAUDE.md, strict-from-the-start.
brand.json is the sole source for app naming; VITE_APP_NAME no longer
overrides.

Migration responsibility moves to aiolabs/server-deploy#8 (Phase 2):
hosts that currently set VITE_APP_NAME (cfaun → "Bouge") must instead
declare BRAND_DIR pointing at a per-host branding/ directory before
their next webapp flake input bump.

process.env.VITE_APP_NAME is still set internally (from brand.name) to
keep Vite's HTML %VITE_APP_NAME% substitution working — but it's
internal wiring now, not a user-facing knob.

Part of aiolabs/webapp#95.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 23:15:58 +02:00
ce5a1a6a56 feat(branding): drive PWA manifest from brand.json
vite-branding.ts now loads brand.json into a typed `brand` object and
exports a `brandManifestName()` helper. Schema:

  { name (required), shortName?, themeColor?, backgroundColor? }

Default brand.json drops themeColor/backgroundColor — they're optional
overrides; per-app accents (wallet yellow, chat green, …) keep working
via `?? '<existing>'` fallbacks in each standalone's vite config.

events: manifest.name/short_name driven by brand. VITE_APP_NAME env
override stays (Phase 2 server-deploy migration still in flight) and,
when set, overrides both name and short_name to preserve pre-#95
behavior. cfaun's VITE_APP_NAME=Bouge keeps working unchanged.

hub (vite.config.ts): brand.name flows into %VITE_APP_NAME% Hub title.

7 other standalones (wallet, chat, market, forum, tasks, restaurant,
libra): only theme_color/background_color get brand overrides. Their
manifest.name/short_name stay hardcoded so multi-PWA home-screen
labels remain differentiated ("Wallet", "Chat", …) rather than all
collapsing to the brand short_name.

Verified default build: events manifest name=AIO; wallet keeps
"Wallet — Lightning" + #eab308 accent.
Verified VITE_APP_NAME=Sortir override: events name+short_name=Sortir.

Part of aiolabs/webapp#95.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 23:11:30 +02:00
eebb566323 feat(branding): add @brand vite alias + migrate in-app img consumers
vite-branding.ts is the shared resolver. Exports BRAND_DIR (absolute,
defaults to ./branding/default) and brandAlias for spreading into each
vite config's resolve.alias map.

All 9 vite configs now spread brandAlias so `@brand/<file>` resolves
to the active brand dir at build time.

Migrates the four <img src="@/assets/logo.png"> consumers
(Login.vue, LoginDemo.vue, AppSidebar.vue, MobileDrawer.vue) to
@brand/logo.png. Unused Navbar.old.vue left as-is.

Build verified: dist/assets/logo-<hash>.png emits from the aliased
import. Future deployers point BRAND_DIR at their brand kit and the
in-app logo follows automatically.

Part of aiolabs/webapp#95.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 22:55:42 +02:00
0a0769115b fix(hub): drop hub PWA install to unblock standalone PWAs (closes #41)
Pre-#41 the hub shipped a Workbox SW with manifest scope `/`, which
claimed the entire app.ariege.io origin and made Chrome treat the
path-mounted standalones at /libra/, /market/, etc. as sub-areas of the
already-installed hub PWA — suppressing the install affordance for each
standalone.

Drop the VitePWA plugin from the hub entirely. The hub is a tile-grid
launcher; users install the standalones they actually use. Add a
decommission helper that runs on every hub boot and unregisters any
legacy hub SW, so users who installed the old hub PWA get cleaned up
automatically. Standalone SWs at deeper scopes are left alone.
2026-05-06 07:48:37 +02:00
442a755a51 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>
2026-05-05 10:44:04 +02:00
ae68eb09c4 fix(vite): give each app its own cacheDir to stop dep-race 504s
VitePWA-disabled was supposed to fix stale dev artefacts but each
of the 8 vite servers was still sharing one node_modules/.vite/deps
directory. Concurrent dep optimization runs (any of: server
restart, config edit, new import) raced for that single cache,
producing intermittent 504 "Outdated Optimize Dep" responses for
hashes the requesting tab still held — followed by Vue Router
"Failed to fetch dynamically imported module" cascades when the
victim was a route component (e.g., MarketPage.vue).

Each app now has its own cache dir:
  hub        node_modules/.vite-hub
  castle     node_modules/.vite-castle
  activities node_modules/.vite-activities
  wallet     node_modules/.vite-wallet
  chat       node_modules/.vite-chat
  forum      node_modules/.vite-forum
  market     node_modules/.vite-market
  tasks      node_modules/.vite-tasks

Set via vite's `cacheDir` option in each config. No more racing.
.gitignore already covers node_modules so the new dirs are ignored
automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 14:56:58 +02:00
51aff8cc87 fix(dev): pin hub port to 5173 with strictPort
The 7 standalone vite configs had server.port + strictPort: true
since commit 9a1e5e3, but the hub config was left on the default
auto-incrementing 5173. When something briefly held 5173 (an
orphaned vite process from a crashed restart, an ENOENT during
concurrent dep optimization, etc.) the hub silently drifted to
5174. The browser's cached SW kept loading the page from
localhost:5173, all in-page asset fetches died with
ERR_CONNECTION_REFUSED, and chakra navigation appeared broken.

Pinning the hub the same way the standalones are pinned eliminates
that drift. If 5173 is genuinely held when dev:all starts, vite
will fail loud (and the user can free the port) instead of moving
the hub silently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 14:20:48 +02:00
613a925e45 fix(pwa): disable service worker in dev across all 8 vite configs
Was: every standalone (and the hub) registered a service worker
during \`npm run dev\` via VitePWA's devOptions.enabled = true.

Problem: the dev SW caches index.html and the JS bundle on first
load and survives across vite restarts. Any code change that
required a server restart (e.g. fixing a vite.config.ts merge
conflict) resulted in browsers continuing to serve the cached
pre-restart bundle until the user manually unregistered the SW.
This caused the hub at localhost:5173 to redirect to /market on
refresh — the cached bundle was from the broken-config period
which still had the old monolithic main app's market route.

PWA features (offline, install prompts, manifest) are still tested
by running:
  npm run preview            # for the hub
  npm run preview:<name>     # for any standalone

against a real production build, which is the more accurate
environment for PWA verification anyway.

Recovery for anyone with a stale SW lingering in their browser
(needed once after pulling, then never again):
  1. DevTools → Application → Service Workers → Unregister
  2. DevTools → Application → Storage → Clear site data
  3. Hard reload (Ctrl-Shift-R)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 10:58:34 +02:00
d37f37a36d fix(vite): resolve stranded merge conflict markers in vite.config.ts
Merge commit 13ad692 ("merge: forum standalone") committed
vite.config.ts with unresolved <<<<<<< / ||||||| / >>>>>>> markers
in the navigateFallbackDenylist regex array. Vite couldn't parse
the file, so the hub dev server failed to restart on config changes
and kept serving stale code from before the merge — including the
old monolithic main app's /market route, which manifested as a
mysterious redirect from / → /market for users testing the hub.

Resolution: keep the union of all three sides
  (sortir, castle, wallet, chat, market, cart, checkout, tasks,
   forum, submit, submission).

Recovery for anyone seeing the stale /market redirect after pulling:
  - hard-reload the browser (Cmd/Ctrl-Shift-R)
  - DevTools → Application → Service Workers → Unregister
  - Re-run npm run dev (or dev:all) — the hub now restarts cleanly

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 10:55:40 +02:00
13ad6927c6 merge: forum standalone (with bottom bar) 2026-05-02 10:10:03 +02:00
0b37518ce2 merge: tasks standalone 2026-05-02 09:15:13 +02:00
c22b5de8bc merge: market standalone 2026-05-02 09:14:56 +02:00
820b2a0e64 merge: chat standalone 2026-05-02 09:14:38 +02:00
55324a0501 feat: add standalone forum PWA build
Adds a standalone forum PWA at forum.${domain}, built from the
existing src/modules/forum plugin (NIP-72 communities + kind 1111
posts + voting). Same standalone pattern as the other modules:
- forum.html entry, vite.forum.config.ts (outDir: dist-forum,
  manifest id: forum-app, theme: blue #2563eb — Vishuddha chakra)
- src/forum-app/{main.ts, app.ts, app.config.ts, App.vue} bootstraps
  base + forum only, with acceptTokenFromUrl for shared auth from hub
- new ForumListPage view + /forum route added to the forum module
  (previously the list was only embedded in Home.vue)
- npm run dev:forum / build:forum / preview:forum
- main app SW denylist extended with /forum/, /submit/, /submission/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 09:00:58 +02:00
3f88ea731e feat: add standalone tasks PWA build
Adds a standalone tasks PWA at tasks.${domain}, built from the
existing src/modules/tasks plugin (Nostr calendar events, kind
31922/31925). Same standalone pattern as the other modules:
- tasks.html entry, vite.tasks.config.ts (outDir: dist-tasks,
  manifest id: tasks-app, theme: indigo #4338ca — Ajna chakra)
- src/tasks-app/{main.ts, app.ts, app.config.ts, App.vue} bootstraps
  base + tasks only, with acceptTokenFromUrl for shared auth from hub
- npm run dev:tasks / build:tasks / preview:tasks
- main app SW denylist extended with /tasks/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 08:58:54 +02:00
455dc6571e feat: add standalone marketplace PWA build
Adds a standalone Nostr marketplace PWA at market.${domain}, built
from the existing src/modules/market plugin. Same standalone pattern
as wallet/chat/castle/activities:
- market.html entry, vite.market.config.ts (outDir: dist-market,
  manifest id: market-app, theme: red #dc2626 — Muladhara chakra)
- src/market-app/{main.ts, app.ts, app.config.ts, App.vue} bootstraps
  base + market only, with acceptTokenFromUrl for shared auth from hub
- npm run dev:market / build:market / preview:market
- main app SW denylist extended with /market/, /cart/, /checkout/

Closes #18.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 08:57:34 +02:00
ee8f1d9ba6 feat: add standalone chat PWA build
Adds a standalone encrypted chat PWA at chat.${domain}, built from
the existing src/modules/chat plugin. Same standalone pattern as
wallet/castle/activities:
- chat.html entry, vite.chat.config.ts (outDir: dist-chat,
  manifest id: chat-app, theme: green #16a34a — Anahata chakra)
- src/chat-app/{main.ts, app.ts, app.config.ts, App.vue} bootstraps
  base + chat only, with acceptTokenFromUrl for shared auth from hub
- npm run dev:chat / build:chat / preview:chat
- main app SW denylist extended with /chat/

Closes #20.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 08:56:13 +02:00
455cfbc764 feat: add standalone wallet PWA build
Adds a standalone Lightning wallet PWA at wallet.${domain}, built
from the existing src/modules/wallet plugin. Mirrors the Castle and
Activities standalone patterns:
- wallet.html entry, vite.wallet.config.ts (outDir: dist-wallet,
  manifest id: wallet-app, theme: yellow #eab308 — Manipura chakra)
- src/wallet-app/{main.ts, app.ts, app.config.ts, App.vue} bootstraps
  base + wallet only, with acceptTokenFromUrl for shared auth from hub
- npm run dev:wallet / build:wallet / preview:wallet
- main app SW denylist extended with /wallet/

Closes #19.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 08:54:36 +02:00
7181b55d52 fix: scope PWA service workers to prevent cross-app interference
When multiple SPAs share the same origin (e.g., /sortir/ and /castle/
on demo.aiolabs.dev), their service workers conflict. Each app's
workbox now scopes its navigateFallback with navigateFallbackAllowlist,
and the main app excludes standalone paths via navigateFallbackDenylist.

- Main app: denylist /sortir/ and /castle/ from its service worker
- Sortir: allowlist only /sortir/ paths, fallback to activities.html
- Castle: allowlist only /castle/ paths, fallback to castle.html
- Icon paths use relative URLs (work with any base path)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 19:48:45 +02:00
c655ce7702 Update index.html and vite.config.ts for dynamic app name and manifest adjustments
- Replace static app name in index.html and use environment variable for dynamic title
- Update Vite configuration to reflect new app name and description
- Modify manifest icons for better clarity and organization
- Remove deprecated logo asset from the project

This commit enhances the app's configurability and aligns with the new branding strategy.
2025-09-06 19:16:24 +02:00
cc6ba2612d feat: Update app configuration and enhance identity management
- Change app manifest details to reflect new branding for "Ario - Nostr Community Hub".
- Add new properties to the manifest, including categories and language support.
- Refactor identity handling in IdentityDialog and PasswordDialog components for improved profile initialization.
- Update event creation functions in events.ts to use the correct event type from nostr-tools.
2025-07-12 18:10:33 +02:00
c05f40f1ec feat: Implement push notification system for admin announcements
- Add a notification manager to handle push notifications and integrate with Nostr events.
- Create a push notification service to manage subscription and permission requests.
- Introduce components for notification settings and permission prompts in the UI.
- Update Nostr store to manage push notification state and enable/disable functionality.
- Enhance NostrFeed to send notifications for new admin announcements.
- Implement test notification functionality for development purposes.
2025-07-12 18:10:33 +02:00
6ffcc759cf feat: Update Vite configuration for PWA support
- Add PWA metadata including app ID, categories, and language settings.
- Enhance configuration for better integration with social and utility features.
2025-07-07 01:53:03 +02:00
c1f32c0ea6 chore: Refactor project setup and remove Nostr-specific components
- Remove Nostr-related components (ConnectionStatus, Login)
- Update package.json with performance and analysis tools
- Configure Vite for improved build optimization
- Simplify i18n locales by removing Atitlán-specific content
- Add .cursorrules file with development guidelines
- Update Navbar and Footer to be more generic
2025-03-09 13:05:33 +01:00
f3927b97a4 PWA 2025-02-11 00:25:47 +01:00
a44ee45a38 initial post-installation commit 2025-01-30 13:26:56 +01:00