No description
  • Vue 53.5%
  • TypeScript 44%
  • CSS 1.4%
  • HTML 0.8%
  • JavaScript 0.3%
Find a file
Padreug 5541d2bc7a refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94)
## Why

The module was named `activities` originally to avoid colliding with Nostr's `Event` type. In practice that defense added friction without preventing confusion — the backend extension is named `events`, NIP-52 calls them "Calendar Events", and the UI already displayed "Events". The collision with `nostr-tools` `Event` is handled cleanly by the existing `import { Event as NostrEvent }` alias pattern (already in 5 files inside the module). Renaming collapses the 4-way mismatch into one consistent term.

Separately, deployments needed per-instance app names. `VITE_APP_NAME` was already plumbed per-standalone via NixOS `services.webapp-standalones.<app>.displayName` (e.g. cfaun shipped `"Sortir"`, now rebranded to `"Bouge"`), but nothing in the standalone consumed it — PWA manifest, HTML title, and runtime branding were all hardcoded. This PR wires the env through every app-name display point so any deploy can flip `displayName = "Bouge"` (or anything) and pick up the brand end-to-end.

## What

Nine commits on the branch:

1. **`refactor(events): rename activities module to events`** — 70-file rename. `src/modules/activities/` → `src/modules/events/`, `src/activities-app/` → `src/events-app/`, types/services/composables/views/components/store renamed (`Activity`→`Event`, `Activities`→`Events`). Routes `/activities/*` → `/events/*`; the legacy `/events` (ticketing management) moves to `/my-events` so `/events` belongs to the canonical feed. DI tokens `ACTIVITIES_*` → `EVENTS_*`. i18n namespace renamed; English domain strings updated, French/Spanish title key realigned. npm scripts `:activities` → `:events`. Build output `dist-activities/` → `dist-events/`.

2. **`feat(events): wire VITE_APP_NAME through PWA manifest, HTML, runtime`** — PWA manifest `name`/`short_name` template from `process.env.VITE_APP_NAME` with fallback `'Events'`. `events.html` uses Vite's `%VITE_APP_NAME%` substitution. `src/events-app/app.ts` + `main.ts` runtime brand string drives console logs, offline notification, and `acceptTokenFromUrl()`. `events.title` route meta sources from VITE_APP_NAME. `.env.example` updated with per-standalone scoping notes.

3. **`docs(events): update activities→events references`** — `docs/nostr-patterns/*.md` "Canonical: src/modules/activities/composables/useRSVP.ts" anchors point at renamed paths. CLAUDE.md Payment Rails Pattern section updated.

4. **`fix(events): drop lowercase from PWA description brand name`** — minor casing fix caught during verification.

5. **`fix(events): use domain noun in description, not brand name`** — manifest + HTML description switched from `"Discover ${BRAND} near you"` to static `"Discover events near you"`. Description is about *what* the app does, not the brand.

6. **`chore(events): scrub leftover sortir/activities references`** — nginx.conf.example, package.json (concurrently process label + `build:demo` BASE_PATH), router-helpers comment, useMarket comment, and vite.events.config.ts doc-comment.

7. **`refactor(events): conditional brand in console label, tighten docs`** — adds `APP_LABEL` next to `APP_NAME` in `events-app/app.ts`. Reads as `Events` on unbranded builds and `Events (Bouge)` (etc.) when `VITE_APP_NAME` is set to anything other than "Events" (case-insensitive). Used by all four console messages; `acceptTokenFromUrl` keeps the raw `APP_NAME` (it's a token-namespace identifier, not display copy). Also collapses the redundant "cfaun sets X; future deployments can override (e.g. X)" doc-comment.

8. **`i18n(events): finish activité/actividad → événement/evento sweep`** — completes the i18n rename in fr.ts and es.ts (search placeholders, favorites prompts, settings prompt) and fixes five gender-agreement errors that came along with the masculine `événement`/`evento` switch (French: `Aucune ... trouvée`→`Aucun ... trouvé`, `préférées`→`préférés`, `d'une ... la sauvegarder`→`d'un ... le sauvegarder`; Spanish: `favoritas`→`favoritos`, `guardarla`→`guardarlo`).

9. **`chore(events): finish sortir → bouge sweep in .env.example`** — four remaining doc-comment refs in `.env.example` (cfaun branding, ticket-scanner comment, section header, subdomain-mode URL example).

## Cross-repo coordination

This PR has matching changes already pushed to two other repos. They have to land in a coordinated bump because the names are tightly coupled.

- **`aiolabs/webapp-module` main** — commit `9d82016`. Renames `hubActivitiesUrl` → `hubEventsUrl` and `VITE_HUB_ACTIVITIES_URL` → `VITE_HUB_EVENTS_URL`. No backwards-compat shim.
- **`aiolabs/server-deploy` main** — commits `f15e1eb`, `bf4698b`, `d46a520`:
  - `standalones.nix` `apps.events` uses `build:events` / `dist-events` / `events.html`; `hubUrlOption` maps `events → "hubEventsUrl"`; comment + cfaun-as-example doc switched from sortir/Sortir to bouge/Bouge.
  - `hosts/cfaun/default.nix` rebranded: `subdomain = "bouge"` + `displayName = "Bouge"`. (Native-French feedback retired the "Sortir" branding as awkward.)
  - `hosts/atio/default.nix` stale "activities app" comment dropped (atio's `displayName = "Eventos"` config is unchanged).

server-deploy's `flake.lock` still pins the OLD webapp + OLD webapp-module, so nix builds from server-deploy main will fail until the bumps. Suggested order after this PR merges to `dev`: one server-deploy commit that does `nix flake lock --update-input webapp-module` + `--update-input webapp-demo` together. DNS for `bouge.ariege.io` needs to point at the cfaun host before the deploy lands.

## Verification

- `pnpm typecheck` — clean ✓
- `pnpm build:events` (default) — `dist-events/manifest.webmanifest` has `name: "Events"`, description "Discover events near you" ✓
- `VITE_APP_NAME=Bouge pnpm build:events` — `name: "Bouge"`, HTML title "Bouge", console label resolves to `Events (Bouge)` ✓
- Cross-repo grep sweep: no `Sortir`/`sortir`/`activities`/`Activities` references in events-module scope. (Domain false positives — "Market Activity" in market dashboard, "time-based activities" in nostr-feed content filters, "Activity Lifecycle Kills" in CLAUDE.md mobile-browser docs — are unrelated and intentionally left alone.)

Not verified in-browser (no GUI in this session) — needs a manual smoke at `app.ariege.io/bouge/` once the coordinated flake bump lands on cfaun. Watch for: feed loads, `/events/calendar`, `/events/map`, `/events/favorites`, `/events/:id` routes work; "My Events" appears in the user dropdown and `/my-events` shows the management page; PWA install prompt shows "Bouge".

## Out of scope (deferred)

- Backend extension rename — `aiolabs/events` is already named correctly.
- Nix standalone attribute name — `services.webapp-standalones.events` is already correct.
- Overriding domain-noun strings ("Your event was created", RSVP labels) — those stay locale-driven; `VITE_APP_NAME` covers app-name only.
- Backwards-compat redirects from `/activities/*` to `/events/*` — pre-launch, public URL was `/sortir/` (path-mode) or `sortir.ariege.io` (subdomain-mode), never `/activities/`. No external bookmarks to preserve. (`sortir.ariege.io` → `bouge.ariege.io` is a separate decision; up to the deploy operator whether to keep a 301 for word-of-mouth referrers.)

Reviewed-on: #94
2026-06-09 18:18:26 +00:00
.vscode initial post-installation commit 2025-01-30 13:26:56 +01:00
docs refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
electron chore: Set up Electron configuration and update dependencies 2025-03-20 17:26:15 +01:00
public fix(hub): drop hub PWA install to unblock standalone PWAs (closes #41) 2026-05-06 07:48:37 +02:00
src refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
.cursorrules update cursor rules to follow semantic/theme aware color patterns 2025-08-14 15:19:13 +02:00
.env.example refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
.gitignore chore: add .mcp.json and ignore .playwright-mcp/ 2026-05-20 19:48:15 +02:00
.mcp.json chore(mcp): add shadcn-vue MCP server alongside playwright 2026-05-24 00:37:16 +02:00
chat.html fix(dev): self-heal stale service workers + standardize PWA meta 2026-05-02 13:45:04 +02:00
CLAUDE.md refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
components.json update shadcn/tailwind config 2025-03-09 15:40:32 +01:00
events.html refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
forge.config.js chore: Set up Electron configuration and update dependencies 2025-03-20 17:26:15 +01:00
forum.html fix(dev): self-heal stale service workers + standardize PWA meta 2026-05-02 13:45:04 +02:00
index.html fix(dev): self-heal stale service workers + standardize PWA meta 2026-05-02 13:45:04 +02:00
libra.html Rename castle-app to libra-app 2026-05-05 10:44:04 +02:00
market.html fix(dev): self-heal stale service workers + standardize PWA meta 2026-05-02 13:45:04 +02:00
nginx.conf.example refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
package.json refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
pnpm-lock.yaml chore(deps): bump nostr-tools to ^2.23.3 to match lnbits 2026-05-24 00:38:25 +02:00
README.md Enhance README and wallet module documentation with new payment features 2025-09-18 23:23:30 +02:00
restaurant.html feat(webapp): restaurant bundle skeleton 2026-05-11 09:42:21 +02:00
tailwind.config.js refactor: Update color definitions in Tailwind configuration to use oklch color space 2025-08-03 11:20:57 +02:00
tasks.html fix(dev): self-heal stale service workers + standardize PWA meta 2026-05-02 13:45:04 +02:00
test-formatting.html feat: Enhance RelayHub component with subscription count details (still not working) 2025-08-10 18:19:18 +02:00
tsconfig.app.json update shadcn/tailwind config 2025-03-09 15:40:32 +01:00
tsconfig.json initial post-installation commit 2025-01-30 13:26:56 +01:00
tsconfig.node.json initial post-installation commit 2025-01-30 13:26:56 +01:00
vite.chat.config.ts fix(vite): rewrite to <app>.html when query has dots (JWT tokens) 2026-05-03 16:02:06 +02:00
vite.config.ts fix(hub): drop hub PWA install to unblock standalone PWAs (closes #41) 2026-05-06 07:48:37 +02:00
vite.events.config.ts refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
vite.forum.config.ts fix(vite): rewrite to <app>.html when query has dots (JWT tokens) 2026-05-03 16:02:06 +02:00
vite.libra.config.ts Rename castle-app to libra-app 2026-05-05 10:44:04 +02:00
vite.market.config.ts fix(vite): rewrite to <app>.html when query has dots (JWT tokens) 2026-05-03 16:02:06 +02:00
vite.restaurant.config.ts feat(hub): wire Restaurant tile + bump dev port to 5187 2026-05-11 20:17:51 +02:00
vite.tasks.config.ts fix(vite): rewrite to <app>.html when query has dots (JWT tokens) 2026-05-03 16:02:06 +02:00
vite.wallet.config.ts fix(vite): rewrite to <app>.html when query has dots (JWT tokens) 2026-05-03 16:02:06 +02:00
wallet.html fix(dev): self-heal stale service workers + standardize PWA meta 2026-05-02 13:45:04 +02:00

Ario Web App

A modular Vue 3 + TypeScript application with Nostr protocol integration and Lightning Network wallet functionality.

Features

  • Modular Architecture: Plugin-based system with dependency injection
  • Nostr Integration: Decentralized social networking and messaging
  • Lightning Wallet: Real-time balance updates with LNbits WebSocket integration
  • Event Ticketing: Lightning-powered event tickets and marketplace
  • PWA Support: Progressive Web App with offline capabilities
  • Desktop App: Electron-based desktop application

Real-Time Wallet Features

The application provides seamless Lightning Network wallet integration:

  • Lightning Invoice Creation: Create BOLT11 invoices for receiving payments with QR codes
  • Smart Payment Scanning: QR code scanner for Lightning invoices, LNURL, and Lightning addresses
  • Universal Payment Support: Send to Lightning invoices, Lightning addresses (user@domain.com), and LNURL
  • Smart Amount Fields: Amount input only appears when needed (LNURL, Lightning addresses, or zero-amount invoices)
  • Instant Balance Updates: WebSocket connection provides real-time balance updates when payments are sent or received
  • Live Notifications: Toast notifications for incoming payments
  • Connection Management: Automatic reconnection with exponential backoff
  • Battery Optimization: Pauses WebSocket when app is not visible to save battery
  • Multi-Wallet Support: Manages multiple Lightning wallets with the first wallet as default

WebSocket Configuration

Configure WebSocket behavior in src/app.config.ts:

modules: {
  wallet: {
    enabled: true,
    config: {
      websocket: {
        enabled: true,           // Enable/disable real-time updates
        reconnectDelay: 1000,    // Initial reconnection delay (ms)
        maxReconnectAttempts: 5  // Maximum reconnection attempts
      }
    }
  }
}

Development

# Install dependencies
npm install

# Start development server with hot reload
npm run dev

# Build for production
npm run build

# Run Electron desktop app
npm run electron:dev

Environment Setup

Required environment variables:

# LNbits server URL for Lightning wallet functionality
VITE_LNBITS_BASE_URL=http://localhost:5000

# Nostr relay configuration (JSON array)
VITE_NOSTR_RELAYS='["wss://relay1.example.com","wss://relay2.example.com"]'

Architecture

The application follows a modular architecture with the following core modules:

  • Base Module: Authentication, Nostr client, PWA functionality
  • Wallet Module: Lightning payments, WebSocket balance updates, transaction management
  • Events Module: Event ticketing with Lightning payment integration
  • Market Module: Nostr marketplace functionality
  • Chat Module: Encrypted messaging via Nostr

For detailed development guidelines, see CLAUDE.md.