Skip to content

Conversation

@Maphikza
Copy link
Member

@Maphikza Maphikza commented Jul 3, 2025

Fix Production Build API Configuration and Add Comprehensive Setup Documentation

Key Changes

Production Build Fixes:

  • Fix API configuration to use environment variables instead of window.location.origin
  • Add configurable REACT_APP_BASENAME for flexible deployment paths
  • Update wallet auth to use config URLs instead of hardcoded localhost
  • Create .env.production.example template and remove .env.production from tracking

Setup Documentation:

  • Add detailed reverse proxy architecture explanation with benefits
  • Provide step-by-step installation and deployment guides
  • Document both reverse proxy and direct access scenarios
  • Include environment configuration examples and troubleshooting
  • Add ngrok tunneling setup with custom domain support

Technical Details

  • Router: Now uses configurable basename from REACT_APP_BASENAME
  • API Calls: Fixed mixed content issues by using proxy paths in production
  • Environment: Secure configuration with example file for new users
  • Documentation: Comprehensive setup guide while preserving original content

Testing

  • ✅ Production build works with reverse proxy setup
  • ✅ API calls properly route through nginx proxy
  • ✅ Wallet authentication uses environment variables
  • ✅ Router handles custom basenames correctly

Resolves production deployment issues and provides clear setup instructions for new users.

Maphikza added 3 commits July 3, 2025 14:44
- Fix baseURL in production to use environment variable instead of window.location.origin
- This prevents API calls from being intercepted by the static server
- Update .env.production with proper configuration
- Add configurable REACT_APP_BASENAME for flexible deployment paths
- Update BrowserRouter to use environment variable for basename
- Fix wallet auth to use config.walletBaseURL instead of hardcoded URLs
- Remove .env.production from tracking and add .env.production.example
- Reset .env.development to localhost URLs for development
- Preserve all original content and credits
- Add detailed architecture explanation with ASCII diagrams
- Document reverse proxy benefits and setup rationale
- Provide step-by-step installation and deployment guides
- Include both reverse proxy and direct access scenarios
- Add environment configuration examples and explanations
- Document ngrok tunneling setup with custom domain support
- Add comprehensive troubleshooting section
- Include security considerations and best practices
- Maintain respect for original authors and template credits
@AnthonyMarin
Copy link
Member

Great ReadMe!

Everything is working great on my end. I'm a little unable to test the changes to the wallet URL right now, but the changes read just fine.

Maphikza added 2 commits July 3, 2025 18:50
- Replace reference to external hornet_services_updated.conf file
- Add complete nginx configuration example directly in README
- Include WebSocket support, health checks, and all service routing
- Remove dependency on external configuration files
- Users can now follow setup instructions completely self-contained
@Maphikza Maphikza merged commit 41eaa60 into main Jul 3, 2025
2 checks passed
@Maphikza Maphikza deleted the feature/api-migration-and-personal-mode branch July 5, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants