-
Notifications
You must be signed in to change notification settings - Fork 2
Update CodeQL actions to v3 #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
f7f376a1fcd0d0e11a10ed1b6577c9
merged 19 commits into
main
from
feature/relay-icon-upload-and-dynamic-urls
Jul 11, 2025
Merged
Update CodeQL actions to v3 #60
f7f376a1fcd0d0e11a10ed1b6577c9
merged 19 commits into
main
from
feature/relay-icon-upload-and-dynamic-urls
Jul 11, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## New Features - **NIP-07 Extension Detection**: Intelligent background detection that only shows helper UI when no extension is found - **Production Build Environment Override**: Support localhost testing with production builds - **Smart Extension Checking**: Auto-detects extensions on load, graceful fallback for missing extensions ## UI Improvements - **Extension Helper Component**: Mobile-responsive guide with direct links to Chrome/Firefox stores - **Background Detection**: Login form shows immediately for users with extensions - **Improved UX**: Only users without extensions see the setup guide ## Technical Improvements - **Config Updates**: Production builds now support environment variable overrides for localhost testing - **Service Worker Management**: Disable caching on localhost to prevent build conflicts - **Better Error Handling**: Proper timeout and cleanup for extension detection ## Documentation Updates - **Production Testing Guide**: Instructions for localhost production build testing - **Environment Examples**: Clear .env.production examples for different scenarios - **Deployment Instructions**: Updated with proper serve commands ## Files Changed - Add: NostrExtensionCheck component with mobile-responsive design - Update: LoginForm with intelligent extension detection - Update: config.ts with environment override support - Update: README.md with production testing instructions - Update: Service worker disabled for localhost testing
…ctions - Add complete .env.development example with all required variables - Emphasize using start-app.sh script for Node.js compatibility - Include proper Nostr relay URLs and asset bucket configuration
- Replace hardcoded relay URLs with generic examples - Show proper comma-separated pattern without bias - Maintain neutrality in relay recommendations
## Major Architecture Change - Panel now integrates directly into relay server (port 9002) - No separate nginx proxy needed for basic deployment - Single origin serves both React app and API endpoints ## Configuration Updates - Simplified dynamic URL detection (same origin for panel + API) - Removed /front and /panel path requirements - Auto-detect WebSocket URL from current domain - Streamlined environment configuration ## Documentation Updates - Updated architecture diagrams for integrated deployment - Simplified environment configuration examples - Clarified development vs production setup - Removed complex reverse proxy requirements ## Benefits - ✅ Simplified deployment (single server) - ✅ No CORS issues (same origin) - ✅ Unified SSL certificate - ✅ Same build works everywhere
- Remove outdated /front/ location block - Keep wallet service proxying at /wallet/ - Maintain relay WebSocket as default location (/) - Panel runs integrated in relay server (port 9002) - no nginx needed
- Add /panel/ location block to proxy to relay server (port 9002) - Handle React Router SPA routing with fallback - Update production .env.production to use /panel basename - Now accessible at https://example.com/panel/ in production Production URLs: - Panel: /panel/ → port 9002 (React app + API) - Relay: / → port 9001 (WebSocket) - Wallet: /wallet/ → port 9003 (API)
- Remove URI path from proxy_pass in named locations (nginx requirement) - Simplify panel routing - Go server handles React Router internally - Update README to match working configuration - Remove complex fallback handling that caused proxy_pass syntax error The panel location now uses simple proxy_pass without URI conflicts.
Development (.env.development): - Direct service connections (ports 9001, 9002, 9003) - No base path - panel runs from root in dev mode - Remove specific relay defaults to maintain neutrality Production (.env.production): - Base path /panel to match nginx routing - Auto-detection for API URLs (same origin through nginx) - Clean configuration for deployment - Commented examples without favoring specific relays
- Remove hardcoded API URLs (now auto-detected) - Set /panel base path for nginx routing - Remove specific relay defaults to maintain neutrality - Align with current .env.production configuration - Clear comments about auto-detection features
Critical fixes based on backend dev feedback: 1. Add trailing slash to proxy_pass to strip /panel/ prefix properly 2. Add required proxy headers for proper request forwarding Before: /panel/login → http://127.0.0.1:9002/panel/login (broken) After: /panel/login → http://127.0.0.1:9002/login (correct) This fixes panel accessibility at https://domain.com/panel/
- Replace specific *.serveo.net with universal server_name _ - Now works with localhost, ngrok, serveo, custom domains, and any tunneling service - Remove service-specific limitations from configuration - Update both fixed config and README documentation
- Back to proven rewrite + break pattern that was working - Keep the added proxy headers for proper forwarding - Remove the trailing slash approach that broke functionality Working pattern: - rewrite ^/panel/(.*)$ / break strips /panel/ prefix - proxy_pass http://127.0.0.1:9002 (no trailing slash) - Restores https://afrihornet.ngrok.io/panel/ functionality
- Remove auto-detection fallback that was causing incorrect URL usage - Always require REACT_APP_WALLET_BASE_URL to be explicitly set - Prevent panel from incorrectly trying localhost:9002/wallet instead of localhost:9003 - Add clear error message when wallet URL environment variable is missing
- Include production environment configuration in repository - Ensures wallet URL is properly configured during build process - Required for automated deployment scripts that clone and build
- Remove auto-detection fallback for relay WebSocket URL - Always require REACT_APP_OWN_RELAY_URL to be explicitly set - Prevent panel from incorrectly connecting to ws://localhost:9002 instead of ws://localhost:9001 - Add clear error message when relay URL environment variable is missing - Update .env.production with correct relay URL: ws://localhost:9001
- Document direct access deployment method that actually works - Remove non-working reverse proxy configurations to prevent confusion - Clarify that service URLs (wallet/relay) require explicit configuration - Note that panel routing can be auto-detected but service URLs cannot - Add note that reverse proxy setup still needs proper configuration example TODO: Create working nginx configuration example for reverse proxy deployment
- Replace complex client-side Blossom upload with simple API call - Use POST /api/relay/icon endpoint with JWT authentication - Send panel_url (auto-detected from window.location.origin) and image file - Backend now handles Kind 117 event creation, Blossom storage, and config updates - Remove dependency on direct Blossom upload utilities - Improve error handling and user feedback
- Add kind 1060 (Double Ratchet DM - NIP-117) to selectable kinds - Add kind 1063 (File Metadata - NIP-94) to selectable kinds - Add kind 30078 (Application-specific Data - NIP-78) to selectable kinds - Update kindMapping.ts with kind 1060 description - All new kinds categorized under Basic Nostr Features - Users can now enable/disable these kinds in relay settings
f7f376a1fcd0d0e11a10ed1b6577c9
approved these changes
Jul 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix deprecated CodeQL Action versions:
This resolves GitHub's deprecation warnings for CodeQL Action v1/v2.
NIP-07 Extension Detection & Production Build Improvements
Overview
This PR adds intelligent NIP-07 browser extension detection and improves the production build configuration for better development and
deployment workflows.
Key Features
NIP-07 Extension Detection
Production Build Improvements
Documentation Updates
Technical Changes
New Components
NostrExtensionCheck: Responsive component with extension detection and installation guidanceUpdated Components
LoginForm: Enhanced with background extension detectionconfig.ts: Added environment override support for production buildsConfiguration
Usage
Development