From 0f38917a6eceadb5d6a11b94ca7a840b3b0b20d2 Mon Sep 17 00:00:00 2001 From: padreug Date: Fri, 7 Nov 2025 14:35:38 +0100 Subject: [PATCH] Updates project documentation Refines project documentation to reflect recent architectural changes and coding standards. Adds detailed explanations of the BaseService pattern, module structure, and JavaScript best practices to enhance developer understanding and consistency. Clarifies CSS styling guidelines, emphasizing semantic classes for theme-aware styling. Includes critical bug prevention techniques related to JavaScript falsy values and correct usage of the nullish coalescing operator. Updates build configuration details, environment variable requirements, and mobile browser workaround strategies. --- CLAUDE.md | 500 ++++++++++++++++++++---------------------------------- 1 file changed, 180 insertions(+), 320 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6fd5d02..2ef2826 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - `npm run preview` - Preview production build locally - `npm run analyze` - Build with bundle analysis (opens visualization) -**Electron Development** +**Electron Development** - `npm run electron:dev` - Run both Vite dev server and Electron concurrently - `npm run electron:build` - Full build and package for Electron - `npm run start` - Start Electron using Forge @@ -26,7 +26,7 @@ This is a modular Vue 3 + TypeScript + Vite application with Electron support, f The application uses a plugin-based modular architecture with dependency injection for service management: **Core Modules:** -- **Base Module** (`src/modules/base/`) - Core infrastructure (Nostr, Auth, PWA) +- **Base Module** (`src/modules/base/`) - Core infrastructure (Nostr, Auth, PWA, Image Upload) - **Wallet Module** (`src/modules/wallet/`) - Lightning wallet management with real-time balance updates - **Nostr Feed Module** (`src/modules/nostr-feed/`) - Social feed functionality - **Chat Module** (`src/modules/chat/`) - Encrypted Nostr chat @@ -90,6 +90,12 @@ const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB) - `SERVICE_TOKENS.VISIBILITY_SERVICE` - App visibility and connection management - `SERVICE_TOKENS.WALLET_SERVICE` - Wallet operations (send, receive, transactions) - `SERVICE_TOKENS.WALLET_WEBSOCKET_SERVICE` - Real-time wallet balance updates via WebSocket +- `SERVICE_TOKENS.STORAGE_SERVICE` - Local storage management +- `SERVICE_TOKENS.TOAST_SERVICE` - Toast notification system +- `SERVICE_TOKENS.INVOICE_SERVICE` - Lightning invoice creation and management +- `SERVICE_TOKENS.LNBITS_API` - LNbits API client +- `SERVICE_TOKENS.IMAGE_UPLOAD_SERVICE` - Image upload to pictrs server +- `SERVICE_TOKENS.NOSTR_METADATA_SERVICE` - Nostr user metadata (NIP-01 kind 0) **Core Stack:** - Vue 3 with Composition API (`