**Motivations:**
- Better error handling when endpoints return HTML error pages instead of JSON
- Provide clearer error messages to users
**Root causes:**
- Some NIP-95 endpoints (e.g., nostrimg.com) return HTML error pages instead of JSON
- Current error handling only catches JSON parse errors without detecting HTML responses
- Users get confusing error messages about JSON parsing when the real issue is an HTML response
**Correctifs:**
- Added HTML detection before JSON parsing
- Extract error message from HTML title or h1 tags when possible
- Provide clearer error message indicating HTML response instead of JSON
- Improved error logging with HTML body preview
**Evolutions:**
- None
**Pages affectées:**
- pages/api/nip95-upload.ts
**Motivations:**
- Translate settings page and all its components to French and English
- Provide consistent multilingual experience
**Root causes:**
- Settings page and components were hardcoded in English
- No translation support for key management and NIP-95 configuration
**Correctifs:**
- None (new feature)
**Evolutions:**
- Added translations for settings page title
- Added translations for KeyManagementManager component:
- Public keys display (npub and hex)
- Import form and validation messages
- Recovery phrase display
- All buttons and warnings
- Added translations for Nip95ConfigManager component:
- Endpoint list and management
- Add/edit/remove actions
- Error messages
- Updated both fr.txt and en.txt translation files
- All text now uses t() function for i18n support
**Pages affectées:**
- pages/settings.tsx
- components/KeyManagementManager.tsx
- components/Nip95ConfigManager.tsx
- public/locales/fr.txt
- public/locales/en.txt
- locales/fr.txt
- locales/en.txt
**Motivations:**
- Provide a dedicated interface for managing Nostr keys
- Allow users to view public keys (npub and hex)
- Enable importing private keys via URL or text format
- Respect the existing two-level encryption system
**Root causes:**
- No dedicated interface for key management
- Users need to view their public keys easily
- Users need to import keys in various formats (nsec URL, nsec text, hex)
**Correctifs:**
- None (new feature)
**Evolutions:**
- Created KeyManagementManager component for key management
- Added public key display (npub and hex formats)
- Implemented private key import with support for:
- nostr:// URLs with nsec
- nsec text format (nsec1...)
- hex format (64 characters)
- Automatic key extraction from URLs
- Account replacement warning and confirmation
- Recovery phrase display after import
- Individual copy buttons for each key format
- Integration in settings page
**Pages affectées:**
- components/KeyManagementManager.tsx (new)
- pages/settings.tsx (modified)
- features/key-management-configuration.md (new)
**Motivations:**
- Corriger l'erreur 404 pour favicon.ico demandé par les navigateurs
- Corriger l'erreur 500 de l'API NIP-95 upload empêchant les uploads de fichiers
**Root causes:**
- Fichier favicon.ico manquant dans public/ causant des erreurs 404 répétées
- Incompatibilité entre form-data (npm) et fetch() natif de Node.js dans l'API NIP-95
**Correctifs:**
- Ajout de favicon.svg et mise à jour des références dans les pages
- Remplacement de fetch() par https/http natifs de Node.js dans nip95-upload.ts
- Amélioration de la gestion des erreurs et nettoyage des fichiers temporaires
**Evolutions:**
- Documentation des problèmes et solutions dans fixKnowledge/
**Pages affectées:**
- components/HomeView.tsx
- pages/docs.tsx
- pages/presentation.tsx
- pages/api/nip95-upload.ts
- features/account-creation-buttons-separation.md
- fixKnowledge/favicon-404-error.md (nouveau)
- fixKnowledge/nip95-upload-500-error.md (nouveau)
- public/favicon.svg (nouveau)
- Remove nos2x and NostrConnect support
- Create new NostrAuthService using Alby (window.nostr NIP-07)
- Replace useNostrConnect with useNostrAuth in all components
- Update NostrRemoteSigner to use Alby for signing
- Delete NostrConnect-related files (nostrconnect.ts, handlers, etc.)
- Update documentation to reflect Alby-only authentication
- Remove NOSTRCONNECT_BRIDGE environment variable
- All TypeScript checks pass
- Update NostrConnectService to use nos2x (window.nostr) by default
- Fallback to NostrConnect bridge only if nos2x is not available
- Update NostrRemoteSigner to use window.nostr.signEvent() for signing
- Add TypeScript definitions for NIP-07 window.nostr API
- Update documentation to reflect nos2x as primary authentication method
- Remove default use.nsec.app bridge URL
- All TypeScript checks pass
- Update /presentation page to use dark theme (PageHeader, Footer, bg-cyber-darker)
- Add LanguageSelector component to PageHeader for all pages
- Update AuthorPresentationEditor to use dark theme styling
- Update ArticleField and ArticleFormButtons to use dark theme
- Add locale persistence in localStorage
- Update _app.tsx to load saved locale from localStorage
- All pages now support FR/EN language switching
- Replace DocsHeader with PageHeader and Footer
- Update DocsSidebar with dark cyberpunk theme
- Update DocsContent with dark theme and styled prose
- Use i18n for page title
- All TypeScript checks pass
- Fix unused function warnings by renaming to _unusedExtractTags
- Fix type errors in nostrTagSystem.ts for includes() calls
- Fix type errors in reviews.ts for filter kinds array
- Fix ArrayBuffer type errors in articleEncryption.ts
- Remove unused imports (DecryptionKey, decryptArticleContent, extractTagsFromEvent)
- All TypeScript checks now pass without disabling any controls
- Création lib/platformCommissions.ts : configuration centralisée des commissions
- Articles : 800 sats (700 auteur, 100 plateforme)
- Avis : 70 sats (49 lecteur, 21 plateforme)
- Sponsoring : 0.046 BTC (0.042 auteur, 0.004 plateforme)
- Validation des montants à chaque étape :
- Publication : vérification du montant avant publication
- Paiement : vérification du montant avant acceptation
- Erreurs explicites si montant incorrect
- Tracking des commissions sur Nostr :
- Tags author_amount et platform_commission dans événements
- Interface ContentDeliveryTracking étendue
- Traçabilité complète pour audit
- Logs structurés avec informations de commission
- Documentation complète du système
Les commissions sont maintenant systématiques, validées et traçables.