webapp/docs
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
..
.obsidian stop tracking .obsidian files 2025-09-17 11:48:31 +02:00
00-overview Create comprehensive Obsidian-style documentation structure 2025-09-06 14:31:27 +02:00
01-architecture Update modular design documentation and workspace configuration 2025-09-08 12:03:28 +02:00
02-modules Enhance README and wallet module documentation with new payment features 2025-09-18 23:23:30 +02:00
03-core-services Add Wallet Module documentation and WebSocket integration 2025-09-18 09:56:19 +02:00
04-development Create comprehensive Obsidian-style documentation structure 2025-09-06 14:31:27 +02:00
04-migrations Update modular design documentation and workspace configuration 2025-09-08 12:03:28 +02:00
05-api-reference Create comprehensive Obsidian-style documentation structure 2025-09-06 14:31:27 +02:00
06-deployment Create comprehensive Obsidian-style documentation structure 2025-09-06 14:31:27 +02:00
archive Create comprehensive Obsidian-style documentation structure 2025-09-06 14:31:27 +02:00
nostr-patterns refactor(events): rename activities module to events + wire VITE_APP_NAME for per-deployment branding (#94) 2026-06-09 18:18:26 +00:00
chat-audit-summary.md commit misc docs 2025-10-20 06:48:21 +02:00
chat-improvements-report.md commit misc docs 2025-10-20 06:48:21 +02:00
chat-improvements-report.pdf commit misc docs 2025-10-20 06:48:21 +02:00
Market-Recursion-Analysis.md commit misc docs 2025-10-20 06:48:21 +02:00
Product-Model-Analysis.md commit misc docs 2025-10-20 06:48:21 +02:00
Product-Model-Analysis.pdf commit misc docs 2025-10-20 06:48:21 +02:00
README.md Add Wallet Module documentation and WebSocket integration 2025-09-18 09:56:19 +02:00
WEBSOCKET-TROUBLESHOOTING.md commit misc docs 2025-10-20 06:48:21 +02:00
WEBSOCKET-TROUBLESHOOTING.pdf commit misc docs 2025-10-20 06:48:21 +02:00

📚 Ario Web App Documentation

A comprehensive guide to the Ario Web Application - A modular Vue 3 + TypeScript application with Nostr protocol integration and Lightning Network payments.

🗂️ Documentation Structure

This documentation follows an Obsidian-compatible structure with cross-linked markdown files organized by domain.

Quick Navigation

📂 Directory Structure

docs/
├── README.md                    # This file - Documentation hub
├── 00-overview/                 # Project overview and introduction
│   ├── index.md                # Overview index
│   ├── project-goals.md        # Project objectives
│   ├── tech-stack.md           # Technology choices
│   └── getting-started.md      # Quick start guide
│
├── 01-architecture/             # System architecture
│   ├── index.md                # Architecture overview
│   ├── modular-design.md       # Modular architecture patterns
│   ├── dependency-injection.md # DI container system
│   ├── event-bus.md            # Inter-module communication
│   └── relay-hub.md            # Nostr relay management
│
├── 02-modules/                  # Feature modules
│   ├── index.md                # Module system overview
│   ├── base-module/            # Core infrastructure module
│   ├── market-module/          # Marketplace functionality
│   ├── chat-module/            # Encrypted chat system
│   ├── events-module/          # Event ticketing
│   └── nostr-feed-module/      # Social feed
│
├── 03-core-services/           # Shared services
│   ├── index.md               # Services overview
│   ├── authentication.md      # Auth service & LNbits
│   ├── payment-service.md     # Lightning payments
│   ├── storage-service.md     # User-scoped storage
│   ├── toast-service.md       # Notifications
│   └── visibility-service.md  # Component visibility
│
├── 04-development/             # Development guides
│   ├── index.md               # Development overview
│   ├── setup.md               # Environment setup
│   ├── coding-standards.md    # Code conventions
│   ├── testing.md             # Testing strategies
│   └── debugging.md           # Debug techniques
│
├── 05-api-reference/          # External APIs
│   ├── index.md              # API overview
│   ├── nostr-protocol.md     # Nostr implementation
│   ├── lnbits-api.md         # LNbits integration
│   └── events-api.md         # Events system API
│
├── 06-deployment/            # Deployment & operations
│   ├── index.md             # Deployment overview
│   ├── configuration.md     # Environment variables
│   ├── pwa-setup.md        # PWA configuration
│   └── electron.md         # Desktop app packaging
│
└── archive/                  # Deprecated documentation
    ├── legacy-architecture.md
    └── old-relay-system.md

🔗 Key Documentation Files

Essential Reading

  1. 00-overview/getting-started - Set up your development environment
  2. 01-architecture/modular-design - Understand the plugin system
  3. 02-modules/index - Create new feature modules
  4. 04-development/coding-standards - Maintain code quality

Module Documentation

Technical Deep Dives

🏷️ Documentation Tags

Documents are tagged for easy navigation:

  • #architecture - System design documents
  • #module - Feature module documentation
  • #service - Service layer documentation
  • #api - External API references
  • #guide - How-to guides
  • #reference - Technical references
  • #deprecated - Outdated documentation

📝 Documentation Standards

File Naming

  • Use kebab-case for all files: module-name.md
  • Index files for directories: index.md
  • Prefix with numbers for ordering: 01-architecture/

Markdown Structure

# Document Title

> Brief description or important note

## Overview
Introduction to the topic

## Table of Contents
- [[#Section 1]]
- [[#Section 2]]

## Section 1
Content...

## See Also
- [[related-document]]
- [[another-reference]]

---
**Tags:** #architecture #module
**Last Updated:** 2025-09-06
**Author:** Development Team

Cross-Linking

  • Use [[filename]] for internal links (Obsidian-style)
  • Use [[filename#section]] for section links
  • Use [[filename|Display Text]] for custom link text

🔄 Maintenance

Keeping Documentation Current

  1. Update documentation with code changes
  2. Review quarterly for accuracy
  3. Move deprecated docs to archive/
  4. Tag documents with last update date

Contributing

  1. Follow the structure and standards above
  2. Add appropriate tags to new documents
  3. Update index files when adding new docs
  4. Cross-link related documentation

📊 Documentation Coverage

Module Status Coverage
Base Module Complete 100%
Wallet Module Complete 100%
Market Module Complete 100%
Chat Module Complete 100%
Events Module Complete 100%
Nostr Feed Complete 100%
Core Services Complete 100%
Development Guides 🔄 In Progress 80%
API Reference 🔄 In Progress 70%

Welcome to the Ario Web App documentation! Start with the 00-overview/index to begin your journey.